@Singleton public class DarkFeatureResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestDarkFeature |
DARK_FEATURE
Used for REST documentation generation.
|
static RestUserDarkFeature |
USER_DARK_FEATURE
Used for REST documentation generation.
|
Constructor and Description |
---|
DarkFeatureResource(BambooUserManager bambooUserManager,
com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager,
DarkFeatureService darkFeatureService) |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final RestDarkFeature DARK_FEATURE
public static final RestUserDarkFeature USER_DARK_FEATURE
public DarkFeatureResource(BambooUserManager bambooUserManager, com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager, DarkFeatureService darkFeatureService)
public RestDarkFeature get(String featureKey)
featureKey
- the key of the dark featureRestDarkFeature
containing the status of the dark feature for this instancepublic RestDarkFeature getForUser(String featureKey, String userName)
featureKey
- the key of the dark featureuserName
- the user for which the status of the dark feature needs to be checked forRestUserDarkFeature
containing the status of the dark feature for the given userpublic List<RestDarkFeature> getAll()
RestDarkFeature
containing a list of dark features enabled for all userspublic RestDarkFeature put(String featureKey, RestDarkFeature darkFeaturePropertyBean)
featureKey
- the key of the dark featuredarkFeaturePropertyBean
- a representation of of the status of the dark featureRestDarkFeature
updated dark featurepublic RestUserDarkFeature put(String featureKey, String userName, RestDarkFeature darkFeaturePropertyBean)
featureKey
- the key of the dark featureuserName
- the username of the user for which the dark feature has to be enabled/disableddarkFeaturePropertyBean
- a representation of of the status of the dark featureRestUserDarkFeature
updated user dark featureCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.