org.apache.sling.featureflags.impl

## Class ConfiguredFeature

- java.lang.Object
- - org.apache.sling.featureflags.impl.ConfiguredFeature

All Implemented Interfaces:
  Feature

    public class ConfiguredFeature
    extends Object
    implements Feature

### Nested Class Summary

Nested Classes
`static interface` `ConfiguredFeature.Config`

### Constructor Summary

Constructors
Constructor and Description
`ConfiguredFeature()`

### Method Summary

Methods
`String` `getDescription()` The description of the feature.
`String` `getName()` The name of the feature.
`boolean` `isEnabled(ExecutionContext context)` Checks whether the feature is enabled for the given execution context.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ConfiguredFeature

    public ConfiguredFeature()

### Method Detail

#### isEnabled

    public boolean isEnabled(ExecutionContext context)

Description copied from interface: `Feature`
Checks whether the feature is enabled for the given execution context.

Multiple calls to this method may but are not required to return the same value. For example the return value may depend on the time of day, some random number or some information provided by the given `ExecutionContext`.

This method is called by the `Feature` manager and is not intended to be called by application code directly.

Specified by:
  `isEnabled` in interface `Feature`
Parameters:
  `context` - The `ExecutionContext` providing a context to evaluate whether the feature is enabled or not. Implementations must not hold on to this context instance or the values provided for longer than executing this method.
Returns:
  `true` if this `Feature` is enabled in the given `ExecutionContext`.

#### getName

    public String getName()

Description copied from interface: `Feature`
The name of the feature.

Specified by:
  `getName` in interface `Feature`
Returns:
  The name of this feature which must not be `null` or an empty string.

#### getDescription

    public String getDescription()

Description copied from interface: `Feature`
The description of the feature.

Specified by:
  `getDescription` in interface `Feature`
Returns:
  The optional description of this feature, which may be `null` or an empty string.