Package org.togglz.core.manager
Class PropertyFeatureProvider
- java.lang.Object
-
- org.togglz.core.manager.PropertyFeatureProvider
-
- All Implemented Interfaces:
FeatureProvider
public class PropertyFeatureProvider extends Object implements FeatureProvider
Implementation of
FeatureProviderthat reads all the feature specification from aPropertiesinstance. This provider is especially useful in distributed environments.The feature specification has the following format:
<feature>=<label>;<enabledByDefault>[;<group1>,<group2>,...]
The following example shows how a concrete specification could look like
FEATURE_ONE=A useful feature;true;Group 1,Group 3 FEATURE_TWO=Some other feature;false;Group 2
- Author:
- Mauro Talevi, Christian Kaltepoth
-
-
Constructor Summary
Constructors Constructor Description PropertyFeatureProvider(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Feature>getFeatures()Returns a list of all valid features, nevernull.FeatureMetaDatagetMetaData(Feature feature)Returns theFeatureMetaDatafor the given feature.
-
-
-
Constructor Detail
-
PropertyFeatureProvider
public PropertyFeatureProvider(Properties properties)
-
-
Method Detail
-
getFeatures
public Set<Feature> getFeatures()
Description copied from interface:FeatureProviderReturns a list of all valid features, nevernull.- Specified by:
getFeaturesin interfaceFeatureProvider
-
getMetaData
public FeatureMetaData getMetaData(Feature feature)
Description copied from interface:FeatureProviderReturns theFeatureMetaDatafor the given feature. May return null if no metadata is available.- Specified by:
getMetaDatain interfaceFeatureProvider
-
-