|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface FeatureManager
Component responsible for providing information whether certain features in JIRA are enabled or disabled.
Field Summary | |
---|---|
static String |
SYSTEM_PROPERTY_PREFIX
The prefix used for enabling dark features from the command line. |
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. Use disableUserDarkFeature(com.atlassian.jira.user.ApplicationUser, String feature) instead. Since v6.0. |
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. Use enableUserDarkFeature(com.atlassian.jira.user.ApplicationUser, String feature) instead. Since v6.0. |
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 feature)
Checks whether feature is enabled either in the running JIRA instance
or for the current user. |
boolean |
isEnabled(Feature feature)
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) . |
Field Detail |
---|
static final String SYSTEM_PROPERTY_PREFIX
-Datlassian.darkfeature.com.atlassian.jira.config.FAST_TABS=true
as a JVM argument in order to
enable fast tabs.
Method Detail |
---|
boolean isEnabled(String featureKey)
featureKey
is enabled either in the running JIRA instance
or for the current user.
featureKey
- feature key
true
, if feature identified by featureKey is enabled, false
otherwise@Internal boolean isEnabled(CoreFeatures feature)
feature
is enabled either in the running JIRA instance
or for the current user. This method should be prefered over
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.
feature
- the core feature to check
true
if feature
is enabled; false
otherwise@Internal boolean isEnabled(Feature feature)
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.
feature
- the feature to check
true
if feature
is enabled; false
otherwiseSet<String> getEnabledFeatureKeys()
DarkFeatures getDarkFeatures()
DarkFeatures
instances from the PropertySet associated
with the current user.
boolean isOnDemand()
isEnabled(CoreFeatures.ON_DEMAND)
.
true
if this is JIRA OnDemand; false
otherwisevoid enableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
enableUserDarkFeature(com.atlassian.jira.user.ApplicationUser, String feature)
instead. Since v6.0.
FeatureEnabledEvent
.
Since JIRA 5.1, this method raises a FeatureEnabledEvent
if it is successful.
user
- the user to enable the feature forfeature
- the feature to enablevoid disableUserDarkFeature(com.atlassian.crowd.embedded.api.User user, String feature)
disableUserDarkFeature(com.atlassian.jira.user.ApplicationUser, String feature)
instead. Since v6.0.
FeatureDisabledEvent
if it is successful.
user
- the user to disable the feature forfeature
- the feature to disablevoid enableUserDarkFeature(ApplicationUser user, String feature)
FeatureEnabledEvent
.
Since JIRA 5.1, this method raises a FeatureEnabledEvent
if it is successful.
user
- the user to enable the feature forfeature
- the feature to enablevoid disableUserDarkFeature(ApplicationUser user, String feature)
FeatureDisabledEvent
if it is successful.
user
- the user to disable the feature forfeature
- the feature to disablevoid enableSiteDarkFeature(String feature)
FeatureEnabledEvent
if it is successful.
feature
- the feature to enablevoid disableSiteDarkFeature(String feature)
FeatureDisabledEvent
if it is successful.
feature
- the feature to disableboolean hasSiteEditPermission()
DarkFeatures getDarkFeaturesForUser(@Nullable ApplicationUser user)
user
- the user being queried; null
represents the anonymous user
boolean isEnabledForUser(ApplicationUser user, String featureKey)
user
- 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 |