|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.config.BootstrapFeatureManager
public class BootstrapFeatureManager
Simple feature manager used during bootstrap. Setup does not use features at all currently.
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.jira.config.FeatureManager |
|---|
SYSTEM_PROPERTY_PREFIX |
| Constructor Summary | |
|---|---|
BootstrapFeatureManager()
|
|
| 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)
Disables a feature for a particular user. |
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)
Enables a feature for a particular User. |
DarkFeatures |
getDarkFeatures()
Creates DarkFeatures instances from the PropertySet associated
with the current user. |
DarkFeatures |
getDarkFeaturesForUser(ApplicationUser 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 feature is enabled either in the running JIRA instance
or for the current user. |
boolean |
isEnabled(Feature coreFeature)
Checks whether or not the specified feature is enabled. |
boolean |
isEnabled(String featureKey)
Checks whether feature featureKey is enabled either in the running JIRA instance
or for the current user. |
boolean |
isEnabledForUser(ApplicationUser user,
String featureKey)
Checks whether a feature with given featureKey is enabled in the running JIRA instance for the given user. |
boolean |
isOnDemand()
Convenience method equivalent to calling isEnabled(CoreFeatures.ON_DEMAND). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BootstrapFeatureManager()
| Method Detail |
|---|
public boolean isEnabled(String featureKey)
FeatureManagerfeatureKey is enabled either in the running JIRA instance
or for the current user.
isEnabled in interface FeatureManagerfeatureKey - feature key
true, if feature identified by featureKey is enabled, false otherwisepublic boolean isEnabled(Feature coreFeature)
FeatureManagerFeatureManager.isEnabled(String) for internal feature checks,
particularly for core features that are not user-settable, as it will skip
loading the current user's preferences when possible.
isEnabled in interface FeatureManagercoreFeature - the feature to check
true if feature is enabled; false otherwisepublic boolean isEnabled(CoreFeatures coreFeature)
FeatureManagerfeature is enabled either in the running JIRA instance
or for the current user. This method should be prefered over
FeatureManager.isEnabled(String) for internal feature checks, particularly for
core features that are not user-settable, as it will skip loading the
current user's preferences when possible.
isEnabled in interface FeatureManagercoreFeature - the core feature to check
true if feature is enabled; false otherwisepublic boolean isOnDemand()
FeatureManagerisEnabled(CoreFeatures.ON_DEMAND).
isOnDemand in interface FeatureManagertrue if this is JIRA OnDemand; false otherwisepublic Set<String> getEnabledFeatureKeys()
FeatureManager
getEnabledFeatureKeys in interface FeatureManagerpublic DarkFeatures getDarkFeatures()
FeatureManagerDarkFeatures instances from the PropertySet associated
with the current user.
getDarkFeatures in interface FeatureManager
public void enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
String feature)
FeatureManagerFeatureEnabledEvent.
Since JIRA 5.1, this method raises a FeatureEnabledEvent if it is successful.
enableUserDarkFeature in interface FeatureManageruser - the user to enable the feature forfeature - the feature to enable
public void disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user,
String feature)
FeatureManagerFeatureDisabledEvent if it is successful.
disableUserDarkFeature in interface FeatureManageruser - the user to disable the feature forfeature - the feature to disable
public void enableUserDarkFeature(ApplicationUser user,
String feature)
FeatureManagerFeatureEnabledEvent.
Since JIRA 5.1, this method raises a FeatureEnabledEvent if it is successful.
enableUserDarkFeature in interface FeatureManageruser - the user to enable the feature forfeature - the feature to enable
public void disableUserDarkFeature(ApplicationUser user,
String feature)
FeatureManagerFeatureDisabledEvent if it is successful.
disableUserDarkFeature in interface FeatureManageruser - the user to disable the feature forfeature - the feature to disablepublic void enableSiteDarkFeature(String feature)
FeatureManagerFeatureEnabledEvent if it is successful.
enableSiteDarkFeature in interface FeatureManagerfeature - the feature to enablepublic void disableSiteDarkFeature(String feature)
FeatureManagerFeatureDisabledEvent if it is successful.
disableSiteDarkFeature in interface FeatureManagerfeature - the feature to disablepublic boolean hasSiteEditPermission()
FeatureManager
hasSiteEditPermission in interface FeatureManager
public DarkFeatures getDarkFeaturesForUser(@Nullable
ApplicationUser user)
getDarkFeaturesForUser in interface FeatureManageruser - the user being queried; null represents the anonymous user
public boolean isEnabledForUser(ApplicationUser user,
String featureKey)
FeatureManager
isEnabledForUser in interface FeatureManageruser - the user being queriedfeatureKey - feature key
true, if feature identified by featureKey is enabled, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||