ro.isdc.wro.model.factory
Class ConfigurableModelFactory
java.lang.Object
ro.isdc.wro.model.resource.support.AbstractConfigurableStrategySupport<S,P>
ro.isdc.wro.model.resource.support.AbstractConfigurableSingleStrategy<WroModelFactory,ModelFactoryProvider>
ro.isdc.wro.model.factory.ConfigurableModelFactory
- All Implemented Interfaces:
- WroModelFactory, ObjectFactory<WroModel>
public class ConfigurableModelFactory
- extends AbstractConfigurableSingleStrategy<WroModelFactory,ModelFactoryProvider>
- implements WroModelFactory
- Since:
- 1.6.3
- Author:
- Alex Objelean
|
Field Summary |
static String |
KEY
Property name to specify alias. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY
public static final String KEY
- Property name to specify alias.
- See Also:
- Constant Field Values
ConfigurableModelFactory
public ConfigurableModelFactory()
getDefaultStrategy
protected WroModelFactory getDefaultStrategy()
-
- Specified by:
getDefaultStrategy in class AbstractConfigurableSingleStrategy<WroModelFactory,ModelFactoryProvider>
- Returns:
- the default strategy implementation to use when no key is configured is provided.
getStrategies
protected Map<String,WroModelFactory> getStrategies(ModelFactoryProvider provider)
-
- Specified by:
getStrategies in class AbstractConfigurableStrategySupport<WroModelFactory,ModelFactoryProvider>
- Parameters:
provider - the instance responsible for strategy lookup.
- Returns:
- the map of provided strategies.
getProviderClass
protected Class<ModelFactoryProvider> getProviderClass()
- Overrides:
getProviderClass in class AbstractConfigurableStrategySupport<WroModelFactory,ModelFactoryProvider>
- Returns:
- the class of the provider of type P. Uses
ParameterizedType to compute the class. Override it to
support anonymous classes which do not play well with ParameterizedType's.
getStrategyKey
protected String getStrategyKey()
-
- Specified by:
getStrategyKey in class AbstractConfigurableStrategySupport<WroModelFactory,ModelFactoryProvider>
- Returns:
- the key of the strategy property.
create
public WroModel create()
-
- Specified by:
create in interface ObjectFactory<WroModel>
destroy
public void destroy()
- Called to indicate that the factory is being taken out of service.
- Specified by:
destroy in interface WroModelFactory
Copyright © 2008-2013. All Rights Reserved.