Package org.togglz.deltaspike.activation
Class DeltaSpikeProjectStageActivationStrategy
- java.lang.Object
-
- org.togglz.core.activation.AbstractTokenizedActivationStrategy
-
- org.togglz.deltaspike.activation.DeltaSpikeProjectStageActivationStrategy
-
- All Implemented Interfaces:
ActivationStrategy
public class DeltaSpikeProjectStageActivationStrategy extends AbstractTokenizedActivationStrategy
An activation strategy based on the active
ProjectStagewithin the DeltaSpike environment.Although only one
ProjectStagecan be active at any given time, one or more stage names can be specified in a comma-separated value via the ""stages"" parameter. This strategy works by only activating the feature if at least one of the stages are currently active. Stage names are case sensitive and should match the stage class name.If a given stage is prefixed with the NOT operator (
!), the feature will only be active if the stage is not active. If the value of the ""stages"" parameter was"Development,!Production", the feature would only be active if "Development" is active or if "Production" is not active.- Author:
- Alasdair Mercer
- See Also:
AbstractTokenizedActivationStrategy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.togglz.core.activation.AbstractTokenizedActivationStrategy
AbstractTokenizedActivationStrategy.Token, AbstractTokenizedActivationStrategy.TokenTransformer
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDstatic StringPARAM_STAGES
-
Constructor Summary
Constructors Constructor Description DeltaSpikeProjectStageActivationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()StringgetName()Parameter[]getParameters()StringgetTokenParameterName()protected booleanisActive(FeatureState featureState, FeatureUser user, List<AbstractTokenizedActivationStrategy.Token> tokens)-
Methods inherited from class org.togglz.core.activation.AbstractTokenizedActivationStrategy
getTokenParameterTransformer, isActive, tokenize
-
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
PARAM_STAGES
public static final String PARAM_STAGES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
-
getName
public String getName()
-
isActive
protected boolean isActive(FeatureState featureState, FeatureUser user, List<AbstractTokenizedActivationStrategy.Token> tokens)
- Specified by:
isActivein classAbstractTokenizedActivationStrategy
-
getParameters
public Parameter[] getParameters()
-
getTokenParameterName
public String getTokenParameterName()
- Specified by:
getTokenParameterNamein classAbstractTokenizedActivationStrategy
-
-