@ConsumerType public interface Feature
Feature names
should be globally unique. If multiple
features have the same name, the feature with the highest service ranking is
accessible through the Features
service while those with lower
service rankings are ignored.
This interface is expected to be implemented by feature providers.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
The description of the feature.
|
java.lang.String |
getName()
The name of the feature.
|
boolean |
isEnabled(ExecutionContext context)
Checks whether the feature is enabled for the given execution context.
|
java.lang.String getName()
null
or an
empty string.java.lang.String getDescription()
null
or an empty string.boolean isEnabled(ExecutionContext 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.
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.true
if this Feature
is enabled in the given
ExecutionContext
.Copyright © 2010 - 2020 Adobe. All Rights Reserved