Package org.apache.sling.featureflags
Interface Features
The
Features service 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
Modifier and TypeMethodDescriptiongetFeature(String name) Returns the feature with the given name.Feature[]Get the list of all (known) features.booleanReturnstrueif a feature with the given name is known and enabled under the currentExecutionContext.
-
Method Details
-
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
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
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.
-