Package com.atlassian.confluence.it
Class DarkFeaturesHelper
- java.lang.Object
-
- com.atlassian.confluence.it.DarkFeaturesHelper
-
public class DarkFeaturesHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_USER_ENABLED_FEATURESstatic StringUSER_DARKFEATURES_PATH
-
Constructor Summary
Constructors Constructor Description DarkFeaturesHelper(ConfluenceRpc rpc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandisableSiteFeature(String featureKey)booleandisableUserFeature(String featureKey)voidenableDarkFeatureModules(com.google.common.collect.Multimap<Plugin,String> pluginModules, boolean enable)Dark features can be implemented by using disabled plugin modules, this method provides a way for tests to enable a set of plugin modules that comprise a dark featurebooleanenableSiteFeature(String featureKey)booleanenableSiteFeatures(String... featureKeys)booleanenableUserFeature(String featureKey)booleanenableUserFeatures(String... featureKeys)booleanisDarkFeatureModulesEnabled(com.google.common.collect.Multimap<Plugin,String> pluginModules)Dark features can be implemented by using disabled plugin modules, this method queries the state of a set of dark feature modules.booleanisEnabled(String featureKey)booleanisSiteFeatureEnabled(String featureKey)voidloadEnabledSiteFeatures(User user, String... features)voidsetUserEnabledFeatures(User user, String featureKeys)Sets all Dark Features enabled for the given user.
-
-
-
Field Detail
-
PROPERTY_USER_ENABLED_FEATURES
public static final String PROPERTY_USER_ENABLED_FEATURES
- See Also:
- Constant Field Values
-
USER_DARKFEATURES_PATH
public static final String USER_DARKFEATURES_PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DarkFeaturesHelper
public DarkFeaturesHelper(ConfluenceRpc rpc)
-
-
Method Detail
-
setUserEnabledFeatures
public void setUserEnabledFeatures(User user, String featureKeys)
Sets all Dark Features enabled for the given user.- Parameters:
user- the user to enable/disable features forfeatureKeys- a comma-separated list of feature keys, or a blank string to disable all features
-
enableUserFeatures
public boolean enableUserFeatures(String... featureKeys)
-
enableUserFeature
public boolean enableUserFeature(String featureKey)
-
disableUserFeature
public boolean disableUserFeature(String featureKey)
-
enableSiteFeatures
public boolean enableSiteFeatures(String... featureKeys)
-
enableSiteFeature
public boolean enableSiteFeature(String featureKey)
-
disableSiteFeature
public boolean disableSiteFeature(String featureKey)
-
isEnabled
public boolean isEnabled(String featureKey)
-
isSiteFeatureEnabled
public boolean isSiteFeatureEnabled(String featureKey)
-
enableDarkFeatureModules
public void enableDarkFeatureModules(com.google.common.collect.Multimap<Plugin,String> pluginModules, boolean enable)
Dark features can be implemented by using disabled plugin modules, this method provides a way for tests to enable a set of plugin modules that comprise a dark feature- Parameters:
pluginModules-enable- - whether the modules should be enabled or disabled
-
isDarkFeatureModulesEnabled
public boolean isDarkFeatureModulesEnabled(com.google.common.collect.Multimap<Plugin,String> pluginModules)
Dark features can be implemented by using disabled plugin modules, this method queries the state of a set of dark feature modules.- Parameters:
pluginModules- - the set of plugin modules that comprise the dark feature.- Returns:
- true if ALL modules in the pluginModules map are enabled.
-
-