public interface Features
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.Modifier and Type | Method and Description |
---|---|
Feature |
getFeature(java.lang.String name)
Returns the feature with the given name.
|
Feature[] |
getFeatures()
Get the list of all (known) features.
|
boolean |
isEnabled(java.lang.String name)
Returns
true if a feature with the given name is known and
enabled under the current ExecutionContext . |
Feature[] getFeatures()
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
Feature getFeature(java.lang.String name)
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
name
- The name of the feature.null
if not known or the name is an
empty string or null
.boolean isEnabled(java.lang.String name)
true
if a feature with the given name is known and
enabled under the current ExecutionContext
.
Features are known if they are registered as Feature
services or
are configured with OSGi configuration whose factory PID is
org.apache.sling.featureflags.Feature
.
name
- The name of the feature to check for enablement.true
if the named feature is known and enabled.
Specifically false
is also returned if the named feature
is not known."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"