public class SystemPropertyActivationStrategy extends AbstractPropertyDrivenActivationStrategy implements ActivationStrategy
Created by Chris Kelley on 5/26/16.
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
PARAM_PROPERTY_NAME |
PARAM_NAME, PARAM_PROPERTY_VALUE| Constructor and Description |
|---|
SystemPropertyActivationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
A unique id for this strategy.
|
String |
getName()
A human readable name of the strategy.
|
Parameter[] |
getParameters()
Returns the list of configuration parameter definitions for the strategy.
|
protected String |
getPropertyNameParam() |
protected String |
getPropertyValue(FeatureState featureState,
FeatureUser user,
String name)
Returns the value of the property with the specified
name on which to base the activation of the feature. |
getPropertyName, isActive, isActiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisActivepublic static final String ID
public static final String PARAM_PROPERTY_NAME
public String getId()
ActivationStrategyStateRepository.getId in interface ActivationStrategypublic String getName()
ActivationStrategygetName in interface ActivationStrategyprotected String getPropertyValue(FeatureState featureState, FeatureUser user, String name)
AbstractPropertyDrivenActivationStrategy
Returns the value of the property with the specified name on which to base the activation of the feature.
getPropertyValue in class AbstractPropertyDrivenActivationStrategyfeatureState - the FeatureState which represents the current configuration of the featureuser - the user for which to decide whether the feature is active (may be null)name - the name of the property whose value is to be returnedname or null if none could be found.protected String getPropertyNameParam()
getPropertyNameParam in class AbstractPropertyDrivenActivationStrategypublic Parameter[] getParameters()
ActivationStrategy
Returns the list of configuration parameter definitions for the strategy. Parameters are typically built using a
ParameterBuilder class but users can also create custom implementations of the Parameter interface.
Example:
public Parameter[] getParameters() {
return new Parameter[] {
ParameterBuilder.create("country").label("Country Code").matching("[A-Z]+")
};
}
getParameters in interface ActivationStrategygetParameters in class AbstractPropertyDrivenActivationStrategyParameterBuilderCopyright © 2018. All Rights Reserved.