|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.config.DefaultFeatureManager
public class DefaultFeatureManager
Default implementation of FeatureManager
.
Nested Class Summary | |
---|---|
static class |
DefaultFeatureManager.FeaturesMapHolder
|
Field Summary | |
---|---|
static String |
FEATURE_RESOURCE_TYPE
|
static com.atlassian.plugin.Resources.TypeFilter |
FEATURE_TYPE_FILTER
|
Fields inherited from interface com.atlassian.jira.config.FeatureManager |
---|
SYSTEM_PROPERTY_PREFIX |
Constructor Summary | |
---|---|
DefaultFeatureManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.event.api.EventPublisher eventPublisher,
PermissionManager permissionManager,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
UserPreferencesManager userPreferencesManager,
FeatureStore featureStore)
|
Method Summary | |
---|---|
void |
disableSiteDarkFeature(String feature)
Disables a site-wide feature. |
void |
disableUserDarkFeature(ApplicationUser user,
String feature)
Disables a feature for a particular user. |
void |
disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
String feature)
Deprecated. |
void |
enableSiteDarkFeature(String feature)
Enables a site-wide feature. |
void |
enableUserDarkFeature(ApplicationUser user,
String feature)
Enables a feature for a particular User. |
void |
enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
String feature)
Deprecated. |
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 |
hasSiteEditPermission()
Returns true if the currently logged in user has permission to edit site dark features. |
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. |
void |
onClearCache(ClearCacheEvent event)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FEATURE_RESOURCE_TYPE
public static final com.atlassian.plugin.Resources.TypeFilter FEATURE_TYPE_FILTER
Constructor Detail |
---|
public DefaultFeatureManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher, PermissionManager permissionManager, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, UserPreferencesManager userPreferencesManager, FeatureStore featureStore)
Method Detail |
---|
public boolean isEnabled(String featureKey)
FeatureManager
isEnabled
in interface FeatureManager
featureKey
- feature key
true
, if feature identified by featureKey is enabled, false
otherwisepublic boolean isEnabled(CoreFeatures coreFeature)
FeatureManager
isEnabled
in interface FeatureManager
coreFeature
- core feature instance
true
, if given core feature is enabled, false
otherwisepublic Set<String> getEnabledFeatureKeys()
FeatureManager
getEnabledFeatureKeys
in interface FeatureManager
public DarkFeatures getDarkFeatures()
FeatureManager
DarkFeatures
instances from the PropertySet associated with the ThreadLocal user.
getDarkFeatures
in interface FeatureManager
@Deprecated public void enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
FeatureManager
FeatureEnabledEvent
.
Since JIRA 5.1, this method raises a FeatureEnabledEvent
if it is successful.
enableUserDarkFeature
in interface FeatureManager
user
- the user to enable the feature forfeature
- the feature to enable@Deprecated public void disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
FeatureManager
FeatureDisabledEvent
if it is successful.
disableUserDarkFeature
in interface FeatureManager
user
- the user to disable the feature forfeature
- the feature to disablepublic void enableUserDarkFeature(ApplicationUser user, String feature)
FeatureManager
FeatureEnabledEvent
.
Since JIRA 5.1, this method raises a FeatureEnabledEvent
if it is successful.
enableUserDarkFeature
in interface FeatureManager
user
- the user to enable the feature forfeature
- the feature to enablepublic void disableUserDarkFeature(ApplicationUser user, String feature)
FeatureManager
FeatureDisabledEvent
if it is successful.
disableUserDarkFeature
in interface FeatureManager
user
- the user to disable the feature forfeature
- the feature to disablepublic void enableSiteDarkFeature(String feature)
FeatureManager
FeatureEnabledEvent
if it is successful.
enableSiteDarkFeature
in interface FeatureManager
feature
- the feature to enablepublic void disableSiteDarkFeature(String feature)
FeatureManager
FeatureDisabledEvent
if it is successful.
disableSiteDarkFeature
in interface FeatureManager
feature
- the feature to disablepublic boolean hasSiteEditPermission()
FeatureManager
hasSiteEditPermission
in interface FeatureManager
@EventListener public void onClearCache(ClearCacheEvent event)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |