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, WroManagerFactory, ObjectFactory<WroManager>
Direct Known Subclasses:
ExtensionsConfigurableWroManagerFactory

public class ConfigurableWroManagerFactory
extends BaseWroManagerFactory

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

Author:
Alex Objelean

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  CacheStrategy<CacheKey,CacheValue> newCacheStrategy()
          
protected  Properties newConfigProperties()
          Override this method to provide a different config properties file location.
protected  HashStrategy newHashStrategy()
          
protected  WroModelFactory newModelFactory()
          
protected  NamingStrategy newNamingStrategy()
          
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, newAuthorizationManager, newCacheKeyFactory, newGroupExtractor, newMetaDataFactory, newModelTransformers, onAfterInitializeManager, onCachePeriodChanged, onModelPeriodChanged, setCacheKeyFactory, setCacheStrategy, setGroupExtractor, setHashBuilder, setHashStrategy, setMetaDataFactory, setModelFactory, setModelTransformers, setNamingStrategy, setProcessorsFactory, setResourceAuthorizationManager, setUriLocatorFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

newNamingStrategy

protected NamingStrategy newNamingStrategy()

Overrides:
newNamingStrategy in class BaseWroManagerFactory
Returns:
default NamingStrategy to be used by this WroManagerFactory

newHashStrategy

protected HashStrategy newHashStrategy()

Overrides:
newHashStrategy in class BaseWroManagerFactory
Returns:
HashStrategy instance.

newCacheStrategy

protected CacheStrategy<CacheKey,CacheValue> newCacheStrategy()

Overrides:
newCacheStrategy in class BaseWroManagerFactory
Returns:
CacheStrategy instance for resources' group caching.

newModelFactory

protected WroModelFactory newModelFactory()

Overrides:
newModelFactory in class BaseWroManagerFactory
Returns:
WroModelFactory implementation

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-2013. All Rights Reserved.