Class DefaultDarkFeatureService

java.lang.Object
com.atlassian.bamboo.DefaultDarkFeatureService
All Implemented Interfaces:
DarkFeatureService

public class DefaultDarkFeatureService extends Object implements DarkFeatureService
Facade for DarkFeatureManager and FeatureManager
Since:
5.9
  • 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 interface DarkFeatureService
      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 interface DarkFeatureService
      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 interface DarkFeatureService
      Returns:
      is Atlassian Account enabled or not
    • isImprovedAdminPanelNav

      public boolean isImprovedAdminPanelNav()
      Description copied from interface: DarkFeatureService
      Whether improved navigation in administration panel is enabled.
      Specified by:
      isImprovedAdminPanelNav in interface DarkFeatureService
    • isViewConfigurationPermissionDisabled

      public boolean isViewConfigurationPermissionDisabled()
      Description copied from interface: DarkFeatureService
      Is VIEW_CONFIGURATION permission disabled.
      Specified by:
      isViewConfigurationPermissionDisabled in interface DarkFeatureService
    • enableFeatureForCurrentUser

      public void enableFeatureForCurrentUser(String featureKey) throws IllegalArgumentException
      Description copied from interface: DarkFeatureService
      Enable a given feature for the current user.
      Specified by:
      enableFeatureForCurrentUser in interface DarkFeatureService
      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 interface DarkFeatureService
      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: DarkFeatureService
      Disable a given feature for the current user.
      Specified by:
      disableFeatureForCurrentUser in interface DarkFeatureService
      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 interface DarkFeatureService
      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 interface DarkFeatureService
      Parameters:
      featureKey - the feature key
      user - 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: 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 interface DarkFeatureService
      Parameters:
      featureKey - the feature key
      Returns:
      whether the feature key is enabled for the current user.