com.atlassian.bamboo.plugins.rest.admin.darkfeature
Class DarkFeatureResource

java.lang.Object
  extended by com.atlassian.bamboo.plugins.rest.admin.darkfeature.DarkFeatureResource

@Singleton
public class DarkFeatureResource
extends Object

Provides RESTful operations to manage dark features.

Since:
5.8

Field Summary
static RestDarkFeature DARK_FEATURE
          Used for REST documentation generation.
static RestUserDarkFeature USER_DARK_FEATURE
          Used for REST documentation generation.
 
Constructor Summary
DarkFeatureResource(com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager, DarkFeatureService darkFeatureService, BambooUserManager bambooUserManager)
           
 
Method Summary
 RestDarkFeature get(String featureKey)
          Retrieves whether a given dark feature key is enabled for this instance.
 List<RestDarkFeature> getAll()
          Retrieves a list of dark features that are enabled for all users.
 RestDarkFeature getForUser(String featureKey, String userName)
          Retrieves whether a given dark feature key is enabled for a given user.
 RestDarkFeature put(String featureKey, RestDarkFeature darkFeaturePropertyBean)
          Enable or disable a dark feature for all users of this instance.
 RestUserDarkFeature put(String featureKey, String userName, RestDarkFeature darkFeaturePropertyBean)
          Enable or disable a dark feature for a given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DARK_FEATURE

public static final RestDarkFeature DARK_FEATURE
Used for REST documentation generation.


USER_DARK_FEATURE

public static final RestUserDarkFeature USER_DARK_FEATURE
Used for REST documentation generation.

Constructor Detail

DarkFeatureResource

public DarkFeatureResource(com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager,
                           DarkFeatureService darkFeatureService,
                           BambooUserManager bambooUserManager)
Method Detail

get

public RestDarkFeature get(String featureKey)
Retrieves whether a given dark feature key is enabled for this instance.

Parameters:
featureKey - the key of the dark feature
Returns:
RestDarkFeature containing the status of the dark feature for this instance

getForUser

public RestDarkFeature getForUser(String featureKey,
                                  String userName)
Retrieves whether a given dark feature key is enabled for a given user. A dark feature is enabled for a user if its either enabled for this instance or for the specific user.

Parameters:
featureKey - the key of the dark feature
userName - the user for which the status of the dark feature needs to be checked for
Returns:
RestUserDarkFeature containing the status of the dark feature for the given user

getAll

public List<RestDarkFeature> getAll()
Retrieves a list of dark features that are enabled for all users.

Returns:
a list of RestDarkFeature containing a list of dark features enabled for all users

put

public RestDarkFeature put(String featureKey,
                           RestDarkFeature darkFeaturePropertyBean)
Enable or disable a dark feature for all users of this instance.

Parameters:
featureKey - the key of the dark feature
darkFeaturePropertyBean - a representation of of the status of the dark feature
Returns:
RestDarkFeature updated dark feature

put

public RestUserDarkFeature put(String featureKey,
                               String userName,
                               RestDarkFeature darkFeaturePropertyBean)
Enable or disable a dark feature for a given user.

Parameters:
featureKey - the key of the dark feature
userName - the username of the user for which the dark feature has to be enabled/disabled
darkFeaturePropertyBean - a representation of of the status of the dark feature
Returns:
RestUserDarkFeature updated user dark feature


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