Package com.atlassian.bamboo
Class DefaultDarkFeatureService
- java.lang.Object
-
- com.atlassian.bamboo.DefaultDarkFeatureService
-
- All Implemented Interfaces:
DarkFeatureService
public class DefaultDarkFeatureService extends Object implements DarkFeatureService
Facade forDarkFeatureManagerandFeatureManager- Since:
- 5.9
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.DarkFeatureService
CREATE_DEPLOYMENT_GRANTED_BY_PROJECT, RSS_CREATE_RESULT_IF_NO_CHANGES, SOX_COMPLIANCE_CONFIGURABLE_KEY, VIEW_CONFIGURATION_PERMISSION_DISABLED
-
-
Constructor Summary
Constructors Constructor Description DefaultDarkFeatureService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableFeatureForCurrentUser(String featureKey)Disable a given feature for the current user.voiddisableFeatureForUser(String featureKey, @NotNull com.atlassian.user.User user)Disable a given feature for a given user.voidenableFeatureForCurrentUser(String featureKey)Enable a given feature for the current user.voidenableFeatureForUser(String featureKey, @NotNull com.atlassian.user.User user)Enable a given feature for a given user.booleanisAtlassianAccountEnabled()Whether user profiles are managed by Atlassian AccountbooleanisCloudExportEnabled()Check if export for cloud is enabled (mainly view is available for users)booleanisExperimentalRestAdminApiEnabled()Always true.booleanisFeatureForCurrentUserEnabled(@NotNull String featureKey)Check whether a given feature key is enabled for the current user.booleanisFeatureForUserEnabled(String featureKey, @NotNull com.atlassian.user.User user)Check whether a given feature key is enabled for a given user.booleanisImprovedAdminPanelNav()Whether improved navigation in administration panel is enabled.booleanisSimplifiedPlanConfigEnabled()Check whether the simplified plan configuration is enabled.booleanisViewConfigurationPermissionDisabled()Is VIEW_CONFIGURATION permission disabled.
-
-
-
Method Detail
-
isCloudExportEnabled
public boolean isCloudExportEnabled()
Description copied from interface:DarkFeatureServiceCheck if export for cloud is enabled (mainly view is available for users)- Specified by:
isCloudExportEnabledin interfaceDarkFeatureService- Returns:
- is export for cloud enabled
-
isSimplifiedPlanConfigEnabled
public boolean isSimplifiedPlanConfigEnabled()
Description copied from interface:DarkFeatureServiceCheck whether the simplified plan configuration is enabled.- Specified by:
isSimplifiedPlanConfigEnabledin interfaceDarkFeatureService- Returns:
- is the simplified plan configuration enabled.
-
isExperimentalRestAdminApiEnabled
public boolean isExperimentalRestAdminApiEnabled()
Description copied from interface:DarkFeatureServiceAlways true.- Specified by:
isExperimentalRestAdminApiEnabledin interfaceDarkFeatureService
-
isAtlassianAccountEnabled
public boolean isAtlassianAccountEnabled()
Description copied from interface:DarkFeatureServiceWhether user profiles are managed by Atlassian Account- Specified by:
isAtlassianAccountEnabledin interfaceDarkFeatureService- Returns:
- is Atlassian Account enabled or not
-
isImprovedAdminPanelNav
public boolean isImprovedAdminPanelNav()
Description copied from interface:DarkFeatureServiceWhether improved navigation in administration panel is enabled.- Specified by:
isImprovedAdminPanelNavin interfaceDarkFeatureService
-
isViewConfigurationPermissionDisabled
public boolean isViewConfigurationPermissionDisabled()
Description copied from interface:DarkFeatureServiceIs VIEW_CONFIGURATION permission disabled.- Specified by:
isViewConfigurationPermissionDisabledin interfaceDarkFeatureService
-
enableFeatureForCurrentUser
public void enableFeatureForCurrentUser(String featureKey) throws IllegalArgumentException
Description copied from interface:DarkFeatureServiceEnable a given feature for the current user.- Specified by:
enableFeatureForCurrentUserin interfaceDarkFeatureService- Parameters:
featureKey- the feature key to be enabled.- Throws:
IllegalArgumentException- if the current user is not logged in.
-
enableFeatureForUser
public void enableFeatureForUser(String featureKey, @NotNull @NotNull com.atlassian.user.User user) throws org.acegisecurity.AccessDeniedException
Description copied from interface:DarkFeatureServiceEnable a given feature for a given user.- Specified by:
enableFeatureForUserin interfaceDarkFeatureService- Parameters:
featureKey- the feature key to be enabled.user- the user for which the feature should be enabled.- Throws:
org.acegisecurity.AccessDeniedException- if the current user is not an admin.
-
disableFeatureForCurrentUser
public void disableFeatureForCurrentUser(String featureKey) throws IllegalArgumentException
Description copied from interface:DarkFeatureServiceDisable a given feature for the current user.- Specified by:
disableFeatureForCurrentUserin interfaceDarkFeatureService- Parameters:
featureKey- the feature key to be enabled.- Throws:
IllegalArgumentException- if the current user is not logged in.
-
disableFeatureForUser
public void disableFeatureForUser(String featureKey, @NotNull @NotNull com.atlassian.user.User user) throws org.acegisecurity.AccessDeniedException
Description copied from interface:DarkFeatureServiceDisable a given feature for a given user.- Specified by:
disableFeatureForUserin interfaceDarkFeatureService- Parameters:
featureKey- the feature key to be disabled.user- the user for which the feature should be disabled.- Throws:
org.acegisecurity.AccessDeniedException- if the current user is not an admin.
-
isFeatureForUserEnabled
public boolean isFeatureForUserEnabled(String featureKey, @NotNull @NotNull com.atlassian.user.User user)
Description copied from interface:DarkFeatureServiceCheck whether a given feature key is enabled for a given user. Apart from checking whether the feature is enabled for the given user, this will also check site-wide enabled features.- Specified by:
isFeatureForUserEnabledin interfaceDarkFeatureService- Parameters:
featureKey- the feature keyuser- the user- Returns:
- whether the feature key is enabled for the given user.
-
isFeatureForCurrentUserEnabled
public boolean isFeatureForCurrentUserEnabled(@NotNull @NotNull String featureKey)Description copied from interface:DarkFeatureServiceCheck whether a given feature key is enabled for the current user. Apart from checking whether the feature is enabled for the current user, this will also check site-wide enabled features.- Specified by:
isFeatureForCurrentUserEnabledin interfaceDarkFeatureService- Parameters:
featureKey- the feature key- Returns:
- whether the feature key is enabled for the current user.
-
-