com.atlassian.bamboo.testutils.backdoor
Class DarkFeatureControl

java.lang.Object
  extended by com.atlassian.bamboo.testutils.backdoor.BackdoorControl<DarkFeatureControl>
      extended by 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.JsonMediaTypeFilter
 
Field Summary
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
DarkFeatureControl(BambooEnvironmentData environmentData)
           
 
Method Summary
 void disable(String featureKey)
          Disables a dark feature.
 void enable(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's atlassian-plugin.xml (e.g.
 boolean getStatus(String featureKey)
          Gets the status of a dark feature, enabled or disabled.
 
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResource, createResource, createResourceForPath, createResourceForPath, get, getEnvironmentData, percentEncode, ping, resourceRoot, resourceRoot, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
                          BambooEnvironmentData environmentData)
Method Detail

getStatus

public boolean getStatus(@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's atlassian-plugin.xml (e.g. &lt;rest path="..."&gt;). The default value is ""backdoor"".

Overrides:
getRestModulePath in class BackdoorControl<DarkFeatureControl>
Returns:
the REST path used in this plugin's atlassian-plugin.xml (e.g. &lt;rest path="..."&gt;).

getAll

public List<String> getAll()
                    throws Exception
Gets all the enabled dark features.

Throws:
Exception

enable

public void enable(@NotNull
                   String featureKey)
            throws Exception
Enables a dark feature.

Parameters:
featureKey - key of the dark feature
Throws:
Exception

disable

public void disable(@NotNull
                    String featureKey)
             throws Exception
Disables a dark feature.

Parameters:
featureKey - key of the dark feature
Throws:
Exception


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.