Package com.atlassian.bamboo
Class DefaultDarkFeatureService
java.lang.Object
com.atlassian.bamboo.DefaultDarkFeatureService
- All Implemented Interfaces:
DarkFeatureService
Facade for
DarkFeatureManager
and FeatureManager
- 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
disableFeatureForCurrentUser
(String featureKey) Disable a given feature for the current user.void
disableFeatureForUser
(String featureKey, @NotNull 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, @NotNull com.atlassian.user.User user) Enable a given feature for a given user.boolean
Whether user profiles are managed by Atlassian Accountboolean
Check if export for cloud is enabled (mainly view is available for users)boolean
isFeatureForCurrentUserEnabled
(@NotNull String featureKey) Check whether a given feature key is enabled for the current user.boolean
isFeatureForUserEnabled
(String featureKey, @NotNull com.atlassian.user.User user) Check whether a given feature key is enabled for a given user.boolean
Whether improved navigation in administration panel is enabled.boolean
Check whether the simplified plan configuration is enabled.boolean
Is VIEW_CONFIGURATION permission disabled.
-
Constructor Details
-
DefaultDarkFeatureService
public DefaultDarkFeatureService()
-
-
Method Details
-
isCloudExportEnabled
public boolean isCloudExportEnabled()Description copied from interface:DarkFeatureService
Check if export for cloud is enabled (mainly view is available for users)- Specified by:
isCloudExportEnabled
in interfaceDarkFeatureService
- Returns:
- is export for cloud enabled
-
isSimplifiedPlanConfigEnabled
public boolean isSimplifiedPlanConfigEnabled()Description copied from interface:DarkFeatureService
Check whether the simplified plan configuration is enabled.- Specified by:
isSimplifiedPlanConfigEnabled
in interfaceDarkFeatureService
- Returns:
- is the simplified plan configuration enabled.
-
isAtlassianAccountEnabled
public boolean isAtlassianAccountEnabled()Description copied from interface:DarkFeatureService
Whether user profiles are managed by Atlassian Account- Specified by:
isAtlassianAccountEnabled
in interfaceDarkFeatureService
- Returns:
- is Atlassian Account enabled or not
-
isViewConfigurationPermissionDisabled
public boolean isViewConfigurationPermissionDisabled()Description copied from interface:DarkFeatureService
Is VIEW_CONFIGURATION permission disabled.- Specified by:
isViewConfigurationPermissionDisabled
in interfaceDarkFeatureService
-
enableFeatureForCurrentUser
Description copied from interface:DarkFeatureService
Enable a given feature for the current user.- Specified by:
enableFeatureForCurrentUser
in 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:DarkFeatureService
Enable a given feature for a given user.- Specified by:
enableFeatureForUser
in 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
Description copied from interface:DarkFeatureService
Disable a given feature for the current user.- Specified by:
disableFeatureForCurrentUser
in 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:DarkFeatureService
Disable a given feature for a given user.- Specified by:
disableFeatureForUser
in 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:DarkFeatureService
Check 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:
isFeatureForUserEnabled
in interfaceDarkFeatureService
- Parameters:
featureKey
- the feature keyuser
- the user- Returns:
- whether the feature key is enabled for the given user.
-
isFeatureForCurrentUserEnabled
Description copied from interface:DarkFeatureService
Check 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:
isFeatureForCurrentUserEnabled
in interfaceDarkFeatureService
- Parameters:
featureKey
- the feature key- Returns:
- whether the feature key is enabled for the current user.
-