public class FeatureManagerBuilder extends Object
DefaultFeatureManager.| Constructor and Description |
|---|
FeatureManagerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
FeatureManagerBuilder |
activationStrategy(ActivationStrategy strategy)
Adds an additional
ActivationStrategy to the current ActivationStrategyProvider. |
FeatureManagerBuilder |
activationStrategyProvider(ActivationStrategyProvider strategyProvider)
Use the supplied
ActivationStrategyProvider for the activation strategies; |
static FeatureManagerBuilder |
begin()
Create a new builder
|
FeatureManager |
build()
Create the
FeatureManager using the current configuration of the builder |
FeatureManagerBuilder |
featureClass(Class<? extends Feature> featureClass)
Deprecated.
|
FeatureManagerBuilder |
featureEnum(Class<? extends Feature> featureEnum)
Use the supplied feature enum class for the feature manager.
|
FeatureManagerBuilder |
featureEnums(Class<? extends Feature>... featureEnum)
Use the supplied feature enum classes for the feature manager.
|
FeatureManagerBuilder |
featureProvider(FeatureProvider featureProvider)
Sets a
FeatureProvider for the feature manager. |
FeatureManagerBuilder |
name(String name)
Sets the name of the feature manager.
|
FeatureManagerBuilder |
stateRepository(StateRepository stateRepository)
Use the supplied state repository for the feature manager.
|
FeatureManagerBuilder |
togglzConfig(TogglzConfig config)
Initialize the builder with the configuration from the supplied
TogglzConfig instance. |
FeatureManagerBuilder |
userProvider(UserProvider userProvider)
Use the supplied
UserProvider for the feature manager. |
public static FeatureManagerBuilder begin()
public FeatureManagerBuilder stateRepository(StateRepository stateRepository)
@Deprecated public FeatureManagerBuilder featureClass(Class<? extends Feature> featureClass)
featureEnum(Class) instead.public FeatureManagerBuilder featureEnum(Class<? extends Feature> featureEnum)
featureProvider(FeatureProvider)
with EnumBasedFeatureProvider. Please note calling this method also set the name of the feature manager to the
simple name of the feature enum's type.public FeatureManagerBuilder featureEnums(Class<? extends Feature>... featureEnum)
featureProvider(FeatureProvider)
with EnumBasedFeatureProvider. Please note calling this method also set the name of the feature manager to the
simple name of the first feature enum's type.public FeatureManagerBuilder name(String name)
FeatureManager.getName().public FeatureManagerBuilder featureProvider(FeatureProvider featureProvider)
FeatureProvider for the feature manager. Only useful if you don't use enums to declare your features.public FeatureManagerBuilder userProvider(UserProvider userProvider)
UserProvider for the feature manager.public FeatureManagerBuilder activationStrategyProvider(ActivationStrategyProvider strategyProvider)
ActivationStrategyProvider for the activation strategies;public FeatureManagerBuilder activationStrategy(ActivationStrategy strategy)
ActivationStrategy to the current ActivationStrategyProvider. This currently only
works if you are using the DefaultActivationStrategyProvider.public FeatureManagerBuilder togglzConfig(TogglzConfig config)
TogglzConfig instance.public FeatureManager build()
FeatureManager using the current configuration of the builderCopyright © 2018. All Rights Reserved.