Package org.apache.sling.featureflags
Interface Features
- 
@ProviderType public interface FeaturesTheFeaturesservice is the applications access point to the Feature Flag functionality. It can be used to query the available features and to create client contexts to be used for enabled feature checking. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FeaturegetFeature(java.lang.String name)Returns the feature with the given name.Feature[]getFeatures()Get the list of all (known) features.booleanisEnabled(java.lang.String name)Returnstrueif a feature with the given name is known and enabled under the currentExecutionContext. 
 - 
 
- 
- 
Method Detail
- 
getFeatures
Feature[] getFeatures()
Get the list of all (known) features.Features are known if they are registered as
Featureservices or are configured with OSGi configuration whose factory PID isorg.apache.sling.featureflags.Feature.- Returns:
 - The known features
 
 
- 
getFeature
Feature getFeature(java.lang.String name)
Returns the feature with the given name.Features are known if they are registered as
Featureservices or are configured with OSGi configuration whose factory PID isorg.apache.sling.featureflags.Feature.- Parameters:
 name- The name of the feature.- Returns:
 - The feature or 
nullif not known or the name is an empty string ornull. 
 
- 
isEnabled
boolean isEnabled(java.lang.String name)
Returnstrueif a feature with the given name is known and enabled under the currentExecutionContext.Features are known if they are registered as
Featureservices or are configured with OSGi configuration whose factory PID isorg.apache.sling.featureflags.Feature.- Parameters:
 name- The name of the feature to check for enablement.- Returns:
 trueif the named feature is known and enabled. Specificallyfalseis also returned if the named feature is not known.
 
 - 
 
 -