public class DarkFeaturesHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_USER_ENABLED_FEATURES |
static String |
USER_DARKFEATURES_PATH |
Constructor and Description |
---|
DarkFeaturesHelper(ConfluenceRpc rpc) |
Modifier and Type | Method and Description |
---|---|
boolean |
disableSiteFeature(String featureKey) |
boolean |
disableUserFeature(String featureKey) |
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
|
boolean |
enableSiteFeature(String featureKey) |
boolean |
enableSiteFeatures(String... featureKeys) |
boolean |
enableUserFeature(String featureKey) |
boolean |
enableUserFeatures(String... featureKeys) |
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.
|
boolean |
isEnabled(String featureKey) |
static boolean |
isEnabled(String featureKey,
ConfluenceRpc rpc)
Deprecated.
Since 5.0 Use the non-static method.
|
boolean |
isSiteFeatureEnabled(String featureKey) |
void |
loadEnabledSiteFeatures(User user,
String... features) |
void |
setUserEnabledFeatures(User user,
String featureKeys)
Sets all Dark Features enabled for the given user.
|
public static final String PROPERTY_USER_ENABLED_FEATURES
public static final String USER_DARKFEATURES_PATH
public DarkFeaturesHelper(ConfluenceRpc rpc)
public void setUserEnabledFeatures(User user, String featureKeys)
user
- the user to enable/disable features forfeatureKeys
- a comma-separated list of feature keys, or a blank string to disable all featurespublic boolean enableUserFeatures(String... featureKeys)
public boolean enableUserFeature(String featureKey)
public boolean disableUserFeature(String featureKey)
public boolean enableSiteFeatures(String... featureKeys)
public boolean enableSiteFeature(String featureKey)
public boolean disableSiteFeature(String featureKey)
@Deprecated public static boolean isEnabled(String featureKey, ConfluenceRpc rpc)
public boolean isEnabled(String featureKey)
public boolean isSiteFeatureEnabled(String featureKey)
public void enableDarkFeatureModules(com.google.common.collect.Multimap<Plugin,String> pluginModules, boolean enable)
pluginModules
- enable
- - whether the modules should be enabled or disabledpublic boolean isDarkFeatureModulesEnabled(com.google.common.collect.Multimap<Plugin,String> pluginModules)
pluginModules
- - the set of plugin modules that comprise the dark feature.Copyright © 2003–2018 Atlassian. All rights reserved.