Class DefaultDarkFeatureService

    • Constructor Detail

      • DefaultDarkFeatureService

        public DefaultDarkFeatureService()
    • Method Detail

      • 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.
      • 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.
      • 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.