public class DefaultDarkFeatureService extends Object implements DarkFeatureService
DarkFeatureManager
and FeatureManager
BRANCH_INITIAL_BUILD_CHANGELIST, FINAL_STAGES_KEY, SOX_COMPLIANCE_CONFIGURABLE_KEY
Constructor and Description |
---|
DefaultDarkFeatureService() |
Modifier and Type | Method and Description |
---|---|
void |
disableFeatureForCurrentUser(String featureKey)
Disable a given feature for the current user.
|
void |
disableFeatureForUser(String featureKey,
com.atlassian.user.User user)
Disable a given feature for a given user.
|
void |
enableFeatureForCurrentUser(String featureKey)
Enable a given feature for the current user.
|
void |
enableFeatureForUser(String featureKey,
com.atlassian.user.User user)
Enable a given feature for a given user.
|
boolean |
isAtlassianAccountEnabled()
Whether user profiles are managed by Atlassian Account
|
boolean |
isCloudExportEnabled()
Check if export for cloud is enabled (mainly view is available for users)
|
boolean |
isExperimentalRestAdminApiEnabled()
Check whether the experimental REST admin API is enabled.
|
boolean |
isFeatureForCurrentUserEnabled(String featureKey)
Check whether a given feature key is enabled for the current user.
|
boolean |
isFeatureForUserEnabled(String featureKey,
com.atlassian.user.User user)
Check whether a given feature key is enabled for a given user.
|
boolean |
isSimplifiedPlanConfigEnabled()
Check whether the simplified plan configuration is enabled.
|
public boolean isCloudExportEnabled()
DarkFeatureService
isCloudExportEnabled
in interface DarkFeatureService
public boolean isSimplifiedPlanConfigEnabled()
DarkFeatureService
isSimplifiedPlanConfigEnabled
in interface DarkFeatureService
public boolean isExperimentalRestAdminApiEnabled()
DarkFeatureService
isExperimentalRestAdminApiEnabled
in interface DarkFeatureService
public boolean isAtlassianAccountEnabled()
DarkFeatureService
isAtlassianAccountEnabled
in interface DarkFeatureService
public void enableFeatureForCurrentUser(String featureKey) throws IllegalArgumentException
DarkFeatureService
enableFeatureForCurrentUser
in interface DarkFeatureService
featureKey
- the feature key to be enabled.IllegalArgumentException
- if the current user is not logged in.public void enableFeatureForUser(String featureKey, @NotNull com.atlassian.user.User user) throws org.acegisecurity.AccessDeniedException
DarkFeatureService
enableFeatureForUser
in interface DarkFeatureService
featureKey
- the feature key to be enabled.user
- the user for which the feature should be enabled.org.acegisecurity.AccessDeniedException
- if the current user is not an admin.public void disableFeatureForCurrentUser(String featureKey) throws IllegalArgumentException
DarkFeatureService
disableFeatureForCurrentUser
in interface DarkFeatureService
featureKey
- the feature key to be enabled.IllegalArgumentException
- if the current user is not logged in.public void disableFeatureForUser(String featureKey, @NotNull com.atlassian.user.User user) throws org.acegisecurity.AccessDeniedException
DarkFeatureService
disableFeatureForUser
in interface DarkFeatureService
featureKey
- the feature key to be disabled.user
- the user for which the feature should be disabled.org.acegisecurity.AccessDeniedException
- if the current user is not an admin.public boolean isFeatureForUserEnabled(String featureKey, @NotNull com.atlassian.user.User user)
DarkFeatureService
isFeatureForUserEnabled
in interface DarkFeatureService
featureKey
- the feature keyuser
- the userpublic boolean isFeatureForCurrentUserEnabled(@NotNull String featureKey)
DarkFeatureService
isFeatureForCurrentUserEnabled
in interface DarkFeatureService
featureKey
- the feature keyCopyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.