ro.isdc.wro.manager.factory
Class ConfigurableWroManagerFactory

java.lang.Object
  extended by ro.isdc.wro.manager.factory.BaseWroManagerFactory
      extended by ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory
All Implemented Interfaces:
WroConfigurationChangeListener, CacheChangeCallbackAware, WroManagerFactory, ObjectFactory<WroManager>

public class ConfigurableWroManagerFactory
extends BaseWroManagerFactory

Allow configuring uriLocators & processors to add using initParams of the filter.

Author:
Alex Objelean

Field Summary
static String PARAM_URI_LOCATORS
          Name of init param used to specify uri locators.
 
Constructor Summary
ConfigurableWroManagerFactory()
           
 
Method Summary
protected  void contributeLocators(Map<String,UriLocator> map)
          Allow subclasses to contribute with it's own locators.
protected  void contributePostProcessors(Map<String,ResourcePostProcessor> map)
          Allow subclasses to contribute with it's own processors.
protected  void contributePreProcessors(Map<String,ResourcePreProcessor> map)
          Allow subclasses to contribute with it's own pre processors.
protected  Properties newConfigProperties()
          Override this method to provide a different config properties file location.
protected  ProcessorsFactory newProcessorsFactory()
          Reuse ConfigurableProcessorsFactory for processors lookup.
protected  UriLocatorFactory newUriLocatorFactory()
          Override to provide a different or modified factory.
 ConfigurableWroManagerFactory setConfigProperties(Properties configProperties)
          Setter is useful for unit tests.
 
Methods inherited from class ro.isdc.wro.manager.factory.BaseWroManagerFactory
addModelTransformer, create, destroy, getNamingStrategy, newCacheStrategy, newGroupExtractor, newHashBuilder, newModelFactory, newModelTransformers, onCachePeriodChanged, onModelPeriodChanged, registerCallback, setCacheStrategy, setGroupExtractor, setHashBuilder, setModelFactory, setModelTransformers, setNamingStrategy, setProcessorsFactory, setUriLocatorFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_URI_LOCATORS

public static final String PARAM_URI_LOCATORS
Name of init param used to specify uri locators.

See Also:
Constant Field Values
Constructor Detail

ConfigurableWroManagerFactory

public ConfigurableWroManagerFactory()
Method Detail

contributeLocators

protected void contributeLocators(Map<String,UriLocator> map)
Allow subclasses to contribute with it's own locators.

Parameters:
map - containing locator mappings.

contributePreProcessors

protected void contributePreProcessors(Map<String,ResourcePreProcessor> map)
Allow subclasses to contribute with it's own pre processors.

It is implementor responsibility to add a ResourcePreProcessor instance.

Parameters:
map - containing processor mappings.

contributePostProcessors

protected void contributePostProcessors(Map<String,ResourcePostProcessor> map)
Allow subclasses to contribute with it's own processors.

It is implementor responsibility to add a ResourcePostProcessor instance.

Parameters:
map - containing processor mappings.

newUriLocatorFactory

protected UriLocatorFactory newUriLocatorFactory()
Override to provide a different or modified factory.

Overrides:
newUriLocatorFactory in class BaseWroManagerFactory
Returns:
UriLocatorFactory object.

newProcessorsFactory

protected ProcessorsFactory newProcessorsFactory()
Reuse ConfigurableProcessorsFactory for processors lookup.

Overrides:
newProcessorsFactory in class BaseWroManagerFactory
Returns:
ProcessorsFactory object.

newConfigProperties

protected Properties newConfigProperties()
Override this method to provide a different config properties file location. It is very likely that you would like it to be the same as the one used by the FilterConfigWroConfigurationFactory. The default properties file location is /WEB-INF/wro.properties.

Returns:
a not null properties object used as a secondary configuration option for processors if these are not configured in init-param.

setConfigProperties

public ConfigurableWroManagerFactory setConfigProperties(Properties configProperties)
Setter is useful for unit tests.



Copyright © 2008-2011. All Rights Reserved.