Class DefaultDarkFeaturesManager
- java.lang.Object
-
- com.atlassian.confluence.setup.settings.DefaultDarkFeaturesManager
-
- All Implemented Interfaces:
DarkFeaturesManager
public class DefaultDarkFeaturesManager extends Object implements DarkFeaturesManager
CreatesDarkFeatures
instances from the PropertySet associated with the ThreadLocal user.
-
-
Constructor Summary
Constructors Constructor Description DefaultDarkFeaturesManager(UserAccessor userAccessor, FeatureService ignored, com.atlassian.event.api.EventPublisher eventPublisher, SiteDarkFeaturesDao siteDarkFeaturesDao, BuildNumberActivatedDarkFeatures buildNumberActivatedDarkFeatures)
Deprecated.since 7.16DefaultDarkFeaturesManager(UserPreferencesAccessor userPreferencesAccessor, FeatureService ignored, com.atlassian.event.api.EventPublisher eventPublisher, SiteDarkFeaturesDao siteDarkFeaturesDao, BuildNumberActivatedDarkFeatures buildNumberActivatedDarkFeatures)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableSiteFeature(String featureKey)
void
disableUserFeature(ConfluenceUser user, String featureKey)
Disables the specified feature for the specified Uservoid
disableUserFeature(String featureKey)
void
enableSiteFeature(String featureKey)
void
enableUserFeature(ConfluenceUser user, String featureKey)
Enables the specified feature for the specified Uservoid
enableUserFeature(String featureKey)
DarkFeatures
getDarkFeatures()
Returns the dark features for the current user.DarkFeatures
getDarkFeatures(ConfluenceUser user)
DarkFeatures
getDarkFeaturesAllUsers()
Returns the dark features for the all users.DarkFeatures
getSiteDarkFeatures()
-
-
-
Constructor Detail
-
DefaultDarkFeaturesManager
public DefaultDarkFeaturesManager(UserPreferencesAccessor userPreferencesAccessor, FeatureService ignored, com.atlassian.event.api.EventPublisher eventPublisher, SiteDarkFeaturesDao siteDarkFeaturesDao, BuildNumberActivatedDarkFeatures buildNumberActivatedDarkFeatures)
- Since:
- 7.16
-
DefaultDarkFeaturesManager
@Deprecated public DefaultDarkFeaturesManager(UserAccessor userAccessor, FeatureService ignored, com.atlassian.event.api.EventPublisher eventPublisher, SiteDarkFeaturesDao siteDarkFeaturesDao, BuildNumberActivatedDarkFeatures buildNumberActivatedDarkFeatures)
Deprecated.since 7.16
-
-
Method Detail
-
getDarkFeatures
public DarkFeatures getDarkFeatures()
Returns the dark features for the current user.- Specified by:
getDarkFeatures
in interfaceDarkFeaturesManager
- Returns:
- the dark features for the current user.
-
getDarkFeaturesAllUsers
public DarkFeatures getDarkFeaturesAllUsers()
Returns the dark features for the all users.- Specified by:
getDarkFeaturesAllUsers
in interfaceDarkFeaturesManager
- Returns:
- the dark features enabled for all users
-
getSiteDarkFeatures
public DarkFeatures getSiteDarkFeatures()
- Specified by:
getSiteDarkFeatures
in interfaceDarkFeaturesManager
- Returns:
- the dark features that are set for the instance
-
getDarkFeatures
public DarkFeatures getDarkFeatures(ConfluenceUser user)
- Specified by:
getDarkFeatures
in interfaceDarkFeaturesManager
- Returns:
- the dark features for the given user.
- Since:
- 5.2
-
enableUserFeature
public void enableUserFeature(String featureKey) throws UnknownFeatureException
- Specified by:
enableUserFeature
in interfaceDarkFeaturesManager
- Throws:
UnknownFeatureException
-
enableUserFeature
public void enableUserFeature(ConfluenceUser user, String featureKey)
Description copied from interface:DarkFeaturesManager
Enables the specified feature for the specified User- Specified by:
enableUserFeature
in interfaceDarkFeaturesManager
-
disableUserFeature
public void disableUserFeature(String featureKey) throws UnknownFeatureException
- Specified by:
disableUserFeature
in interfaceDarkFeaturesManager
- Throws:
UnknownFeatureException
-
disableUserFeature
public void disableUserFeature(ConfluenceUser user, String featureKey)
Description copied from interface:DarkFeaturesManager
Disables the specified feature for the specified User- Specified by:
disableUserFeature
in interfaceDarkFeaturesManager
-
enableSiteFeature
public void enableSiteFeature(String featureKey) throws UnknownFeatureException
- Specified by:
enableSiteFeature
in interfaceDarkFeaturesManager
- Throws:
UnknownFeatureException
-
disableSiteFeature
public void disableSiteFeature(String featureKey) throws UnknownFeatureException
- Specified by:
disableSiteFeature
in interfaceDarkFeaturesManager
- Throws:
UnknownFeatureException
-
-