ariba.util.core
Class FeatureSet<T>
java.lang.Object
ariba.util.core.FeatureSet<T>
- Type Parameters:
T
-
public class FeatureSet<T>
- extends java.lang.Object
A feature set groups a set of features (Feature) by name.
When passed a configuration, the configuration is queried for the name
of the set of features, and then each is created in turn.
The method isEnabled fetches a feature by name and then dispatched to that feature.
Constructor Summary |
FeatureSet(java.lang.String featureSetName)
|
Method Summary |
java.lang.String |
featureSetName()
Name for logical grouping of features |
boolean |
isEnabled(java.lang.String featureName,
T t)
Use information from T and the implementation of the
Feature to calculate whether the feature is enabled. |
void |
makeFeatureSet(FeatureConfig<T> configAdaptor)
The config adaptor provides a set of feature names it can configure, and
provides the API to configure them. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeatureSet
public FeatureSet(java.lang.String featureSetName)
makeFeatureSet
public void makeFeatureSet(FeatureConfig<T> configAdaptor)
- The config adaptor provides a set of feature names it can configure, and
provides the API to configure them.
Once we get the list of features we get them all rather then fetching them in a lazy fashion.
The rationale is to take any performance hit at startup.
- Parameters:
configAdaptor
-
isEnabled
public boolean isEnabled(java.lang.String featureName,
T t)
- Use information from T and the implementation of the
Feature to calculate whether the feature is enabled.
- Parameters:
featureName
-
- Returns:
featureSetName
public java.lang.String featureSetName()
- Name for logical grouping of features
- Returns:
AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.