ro.isdc.wro.model.resource.support
Class AbstractConfigurableSingleStrategy<S,P>
java.lang.Object
ro.isdc.wro.model.resource.support.AbstractConfigurableStrategySupport<S,P>
ro.isdc.wro.model.resource.support.AbstractConfigurableSingleStrategy<S,P>
- Direct Known Subclasses:
- ConfigurableCacheStrategy, ConfigurableHashStrategy, ConfigurableModelFactory, ConfigurableNamingStrategy
public abstract class AbstractConfigurableSingleStrategy<S,P>
- extends AbstractConfigurableStrategySupport<S,P>
Abstracts the configurable creation of the strategies. Responsible for configuration of a single strategy. If no
configured strategy is found, a default one is used.
- Since:
- 1.4.7
- Author:
- Alex Objelean
Method Summary |
S |
getConfiguredStrategy()
The reeturned object will be injected (if injector is available) and will be cached, meaning that only the first
invocation of this method will instantiate a fresh strategy and any subsequent invocation will return the same
object. |
protected abstract S |
getDefaultStrategy()
|
Methods inherited from class ro.isdc.wro.model.resource.support.AbstractConfigurableStrategySupport |
copyAll, getAvailableAliases, getAvailableStrategies, getConfiguredValue, getProviderClass, getProviderFinder, getStrategies, getStrategyForAlias, getStrategyKey, newProperties, overrideDefaultStrategyMap, setProperties |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConfigurableSingleStrategy
public AbstractConfigurableSingleStrategy()
getConfiguredStrategy
public final S getConfiguredStrategy()
- The reeturned object will be injected (if injector is available) and will be cached, meaning that only the first
invocation of this method will instantiate a fresh strategy and any subsequent invocation will return the same
object.
- Returns:
- the strategy S whose alias is found configured in the properties. This method will never return null. If no
alias is defined the default strategy will be returned. If an invalid alias is provided - a runtime
exception will be thrown.
getDefaultStrategy
protected abstract S getDefaultStrategy()
- Returns:
- the default strategy implementation to use when no key is configured is provided.
Copyright © 2008-2013. All Rights Reserved.