Class DarkFeatureControl
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.BackdoorControl<DarkFeatureControl>
-
- com.atlassian.bamboo.testutils.backdoor.DarkFeatureControl
-
public class DarkFeatureControl extends BackdoorControl<DarkFeatureControl>
Provides a way to control dark features using the Bamboo backdoor, for testing purposes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
-
-
Field Summary
Fields Modifier and Type Field Description static String
DARK_FEATURES_RESOURCE_BASE_URL
-
Fields inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
-
-
Constructor Summary
Constructors Constructor Description DarkFeatureControl(@NotNull BambooEnvironmentData environmentData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable(@NotNull String featureKey)
Disables a dark feature.void
enable(@NotNull String featureKey)
Enables a dark feature.List<String>
getAll()
Gets all the enabled dark features.protected String
getRestModulePath()
Returns the REST path used in this plugin'satlassian-plugin.xml
(e.g.boolean
getStatus(@NotNull String featureKey)
Gets the status of a dark feature, enabled or disabled.-
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResource, createResourceForPath, get, getEnvironmentData, percentEncode, ping, post, resourceRoot, tearDown
-
-
-
-
Field Detail
-
DARK_FEATURES_RESOURCE_BASE_URL
public static final String DARK_FEATURES_RESOURCE_BASE_URL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DarkFeatureControl
public DarkFeatureControl(@NotNull @NotNull BambooEnvironmentData environmentData)
-
-
Method Detail
-
getStatus
public boolean getStatus(@NotNull @NotNull String featureKey) throws Exception
Gets the status of a dark feature, enabled or disabled.- Parameters:
featureKey
- key of the dark feature- Throws:
Exception
-
getRestModulePath
protected String getRestModulePath()
Description copied from class:BackdoorControl
Returns the REST path used in this plugin'satlassian-plugin.xml
(e.g.<rest path="...">
). The default value is ""backdoor"".- Overrides:
getRestModulePath
in classBackdoorControl<DarkFeatureControl>
- Returns:
- the REST path used in this plugin's
atlassian-plugin.xml
(e.g.<rest path="...">
).
-
getAll
public List<String> getAll() throws Exception
Gets all the enabled dark features.- Throws:
Exception
-
enable
public void enable(@NotNull @NotNull String featureKey) throws Exception
Enables a dark feature.- Parameters:
featureKey
- key of the dark feature- Throws:
Exception
-
-