public class SpringProfileActivationStrategy extends AbstractTokenizedActivationStrategy
An activation strategy based on the profiles that are active within the Spring environment.
One or more profiles can be specified in a comma-separated value via the ""profiles"" parameter. This strategy works by only activating the feature if at least one of the profiles are currently active. Profile names are not case sensitive.
If a given profile is prefixed with the NOT operator (!), the feature will only be active if the profile is
not active. If the value of the ""profiles"" parameter was "p1,!p2", the feature would
only be active if "p1" is active or if "p2" is not active.
AbstractTokenizedActivationStrategyAbstractTokenizedActivationStrategy.Token, AbstractTokenizedActivationStrategy.TokenTransformer| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
PARAM_PROFILES |
| Constructor and Description |
|---|
SpringProfileActivationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
String |
getId() |
String |
getName() |
Parameter[] |
getParameters() |
String |
getTokenParameterName() |
AbstractTokenizedActivationStrategy.TokenTransformer |
getTokenParameterTransformer() |
boolean |
isActive(FeatureState featureState,
FeatureUser user,
List<AbstractTokenizedActivationStrategy.Token> tokens) |
isActive, tokenizepublic static final String ID
public static final String PARAM_PROFILES
public String getId()
public String getName()
public boolean isActive(FeatureState featureState, FeatureUser user, List<AbstractTokenizedActivationStrategy.Token> tokens)
isActive in class AbstractTokenizedActivationStrategypublic Parameter[] getParameters()
public String getTokenParameterName()
getTokenParameterName in class AbstractTokenizedActivationStrategypublic AbstractTokenizedActivationStrategy.TokenTransformer getTokenParameterTransformer()
getTokenParameterTransformer in class AbstractTokenizedActivationStrategyCopyright © 2022. All rights reserved.