org.apache.sling.featureflags

## Interface Features

All Known Implementing Classes:
  FeatureManager

    @ProviderType
    public 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

Methods
`Feature` `getFeature(String name)` Returns the feature with the given name.
`Feature[]` `getFeatures()` Get the list of all (known) features.
`boolean` `isEnabled(String name)` Returns `true` if a feature with the given name is known and enabled under the current `ExecutionContext`.

### Method Detail

#### getFeatures

    Feature[] getFeatures()

Get the list of all (known) features.

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`.

Returns:
  The known features

#### getFeature

    Feature getFeature(String name)

Returns the feature with the given 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`.

Parameters:
  `name` - The name of the feature.
Returns:
  The feature or `null` if not known or the name is an empty string or `null`.

#### isEnabled

    boolean isEnabled(String name)

Returns `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`.

Parameters:
  `name` - The name of the feature to check for enablement.
Returns:
  `true` if the named feature is known and enabled. Specifically `false` is also returned if the named feature is not known.