com.atlassian.jira.config
Class DefaultFeatureManager

java.lang.Object
  extended by com.atlassian.jira.config.DefaultFeatureManager
All Implemented Interfaces:
FeatureManager

public class DefaultFeatureManager
extends Object
implements FeatureManager

Default implementation of FeatureManager.

Since:
v4.4

Nested Class Summary
static class DefaultFeatureManager.FeaturesMapHolder
           
 
Field Summary
static String FEATURE_RESOURCE_TYPE
           
static com.atlassian.plugin.Resources.TypeFilter FEATURE_TYPE_FILTER
           
 
Constructor Summary
DefaultFeatureManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher, PermissionManager permissionManager, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, UserPreferencesManager userPreferencesManager)
           
 
Method Summary
 void disableSiteDarkFeature(String feature)
           
 void disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
           
 void enableSiteDarkFeature(String feature)
           
 void enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
          Enable a dark feature for a particular User.
 DarkFeatures getDarkFeatures()
          Creates DarkFeatures instances from the PropertySet associated with the ThreadLocal user.
 Set<String> getEnabledFeatureKeys()
          Returns a set containing the feature keys of all features that are currently enabled.
 boolean isEnabled(CoreFeatures coreFeature)
          Checks whether a feature with given coreFeature is enabled in the running JIRA instance.
 boolean isEnabled(String featureKey)
          Checks whether a feature with given featureKey is enabled in the running JIRA instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEATURE_RESOURCE_TYPE

public static final String FEATURE_RESOURCE_TYPE
See Also:
Constant Field Values

FEATURE_TYPE_FILTER

public static final com.atlassian.plugin.Resources.TypeFilter FEATURE_TYPE_FILTER
Constructor Detail

DefaultFeatureManager

public DefaultFeatureManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
                             com.atlassian.event.api.EventPublisher eventPublisher,
                             PermissionManager permissionManager,
                             ApplicationProperties applicationProperties,
                             JiraAuthenticationContext authenticationContext,
                             UserPreferencesManager userPreferencesManager)
Method Detail

isEnabled

public boolean isEnabled(String featureKey)
Description copied from interface: FeatureManager
Checks whether a feature with given featureKey is enabled in the running JIRA instance.

Specified by:
isEnabled in interface FeatureManager
Parameters:
featureKey - feature key
Returns:
true, if feature identified by featureKey is enabled, false otherwise

isEnabled

public boolean isEnabled(CoreFeatures coreFeature)
Description copied from interface: FeatureManager
Checks whether a feature with given coreFeature is enabled in the running JIRA instance.

Specified by:
isEnabled in interface FeatureManager
Parameters:
coreFeature - core feature instance
Returns:
true, if given core feature is enabled, false otherwise

getEnabledFeatureKeys

public Set<String> getEnabledFeatureKeys()
Description copied from interface: FeatureManager
Returns a set containing the feature keys of all features that are currently enabled.

Specified by:
getEnabledFeatureKeys in interface FeatureManager
Returns:
a set containing the feature keys of all features that are currently enabled

getDarkFeatures

public DarkFeatures getDarkFeatures()
Description copied from interface: FeatureManager
Creates DarkFeatures instances from the PropertySet associated with the ThreadLocal user.

Specified by:
getDarkFeatures in interface FeatureManager
Returns:
Returns the Dark Features state for the current user.

enableUserDarkFeature

public void enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
                                  String feature)
Description copied from interface: FeatureManager
Enable a dark feature for a particular User.

Specified by:
enableUserDarkFeature in interface FeatureManager
Parameters:
user - the user to enable the feature for
feature - the feature to enable

disableUserDarkFeature

public void disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
                                   String feature)
Specified by:
disableUserDarkFeature in interface FeatureManager

enableSiteDarkFeature

public void enableSiteDarkFeature(String feature)
Specified by:
enableSiteDarkFeature in interface FeatureManager

disableSiteDarkFeature

public void disableSiteDarkFeature(String feature)
Specified by:
disableSiteDarkFeature in interface FeatureManager


Copyright © 2002-2012 Atlassian. All Rights Reserved.