com.atlassian.confluence.it
Class DarkFeaturesHelper

java.lang.Object
  extended by com.atlassian.confluence.it.DarkFeaturesHelper

public class DarkFeaturesHelper
extends java.lang.Object


Field Summary
static java.lang.String PROPERTY_USER_ENABLED_FEATURES
           
static java.lang.String USER_DARKFEATURES_PATH
           
 
Constructor Summary
DarkFeaturesHelper(ConfluenceRpc rpc)
           
 
Method Summary
 boolean disableSiteFeature(java.lang.String featureKey)
           
 boolean disableUserFeature(java.lang.String featureKey)
           
 void enableDarkFeatureModules(com.google.common.collect.Multimap<Plugin,java.lang.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
 boolean enableSiteFeature(java.lang.String featureKey)
           
 boolean enableUserFeature(java.lang.String featureKey)
           
 boolean isDarkFeatureModulesEnabled(com.google.common.collect.Multimap<Plugin,java.lang.String> pluginModules)
          Dark features can be implemented by using disabled plugin modules, this method queries the state of a set of dark feature modules.
 boolean isEnabled(java.lang.String featureKey)
           
static boolean isEnabled(java.lang.String featureKey, ConfluenceRpc rpc)
          Deprecated. Since 5.0 Use the non-static method.
 boolean isSiteFeatureEnabled(java.lang.String featureKey)
           
 void loadEnabledSiteFeatures(User user, java.lang.String... features)
           
 void setUserEnabledFeatures(User user, java.lang.String featureKeys)
          Sets all Dark Features enabled for the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_USER_ENABLED_FEATURES

public static final java.lang.String PROPERTY_USER_ENABLED_FEATURES
See Also:
Constant Field Values

USER_DARKFEATURES_PATH

public static final java.lang.String USER_DARKFEATURES_PATH
See Also:
Constant Field Values
Constructor Detail

DarkFeaturesHelper

public DarkFeaturesHelper(ConfluenceRpc rpc)
Method Detail

setUserEnabledFeatures

public void setUserEnabledFeatures(User user,
                                   java.lang.String featureKeys)
Sets all Dark Features enabled for the given user.

Parameters:
user - the user to enable/disable features for
featureKeys - a comma-separated list of feature keys, or a blank string to disable all features

enableUserFeature

public boolean enableUserFeature(java.lang.String featureKey)

disableUserFeature

public boolean disableUserFeature(java.lang.String featureKey)

enableSiteFeature

public boolean enableSiteFeature(java.lang.String featureKey)

disableSiteFeature

public boolean disableSiteFeature(java.lang.String featureKey)

isEnabled

@Deprecated
public static boolean isEnabled(java.lang.String featureKey,
                                           ConfluenceRpc rpc)
Deprecated. Since 5.0 Use the non-static method.


isEnabled

public boolean isEnabled(java.lang.String featureKey)

isSiteFeatureEnabled

public boolean isSiteFeatureEnabled(java.lang.String featureKey)

loadEnabledSiteFeatures

public void loadEnabledSiteFeatures(User user,
                                    java.lang.String... features)

enableDarkFeatureModules

public void enableDarkFeatureModules(com.google.common.collect.Multimap<Plugin,java.lang.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,java.lang.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.


Copyright © 2003-2014 Atlassian. All Rights Reserved.