com.atlassian.confluence.setup.settings
Class DefaultDarkFeaturesManager

java.lang.Object
  extended by com.atlassian.confluence.setup.settings.DefaultDarkFeaturesManager
All Implemented Interfaces:
DarkFeaturesManager

public class DefaultDarkFeaturesManager
extends Object
implements DarkFeaturesManager

Creates DarkFeatures instances from the PropertySet associated with the ThreadLocal user.


Constructor Summary
DefaultDarkFeaturesManager(UserAccessor userAccessor, com.atlassian.bandana.BandanaManager bandanaManager, FeatureService featureService, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void disableSiteFeature(String featureKey)
           
 void disableUserFeature(ConfluenceUser user, String featureKey)
          Disable the specified feature for the specified User
 void disableUserFeature(String featureKey)
           
 void enableSiteFeature(String featureKey)
           
 void enableUserFeature(ConfluenceUser user, String featureKey)
          Enable the specified feature for the specified User
 void enableUserFeature(String featureKey)
           
 DarkFeatures getDarkFeatures()
          Returns the dark features for the current user.
 DarkFeatures getDarkFeatures(ConfluenceUser user)
           
 DarkFeatures getDarkFeatures(com.atlassian.user.User user)
          Deprecated. Since 5.2 - Use getDarkFeatures(com.atlassian.confluence.user.ConfluenceUser)
 DarkFeatures getDarkFeaturesAllUsers()
          Returns the dark features for the all users.
 DarkFeatures getSiteDarkFeatures()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDarkFeaturesManager

public DefaultDarkFeaturesManager(UserAccessor userAccessor,
                                  com.atlassian.bandana.BandanaManager bandanaManager,
                                  FeatureService featureService,
                                  com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

getDarkFeatures

public DarkFeatures getDarkFeatures()
Returns the dark features for the current user.

Specified by:
getDarkFeatures in interface DarkFeaturesManager
Returns:
the dark features for the current user.

getDarkFeaturesAllUsers

public DarkFeatures getDarkFeaturesAllUsers()
Returns the dark features for the all users.

Specified by:
getDarkFeaturesAllUsers in interface DarkFeaturesManager
Returns:
the dark features enabled for all users.

getSiteDarkFeatures

public DarkFeatures getSiteDarkFeatures()
Specified by:
getSiteDarkFeatures in interface DarkFeaturesManager
Returns:
the dark features that are set for the instance

getDarkFeatures

public DarkFeatures getDarkFeatures(ConfluenceUser user)
Specified by:
getDarkFeatures in interface DarkFeaturesManager
Returns:
the dark features for the given user.
Since:
5.2

getDarkFeatures

@Deprecated
public DarkFeatures getDarkFeatures(com.atlassian.user.User user)
Deprecated. Since 5.2 - Use getDarkFeatures(com.atlassian.confluence.user.ConfluenceUser)

Specified by:
getDarkFeatures in interface DarkFeaturesManager

enableUserFeature

public void enableUserFeature(String featureKey)
                       throws UnknownFeatureException
Specified by:
enableUserFeature in interface DarkFeaturesManager
Throws:
UnknownFeatureException

enableUserFeature

public void enableUserFeature(ConfluenceUser user,
                              String featureKey)
Description copied from interface: DarkFeaturesManager
Enable the specified feature for the specified User

Specified by:
enableUserFeature in interface DarkFeaturesManager

disableUserFeature

public void disableUserFeature(String featureKey)
                        throws UnknownFeatureException
Specified by:
disableUserFeature in interface DarkFeaturesManager
Throws:
UnknownFeatureException

disableUserFeature

public void disableUserFeature(ConfluenceUser user,
                               String featureKey)
Description copied from interface: DarkFeaturesManager
Disable the specified feature for the specified User

Specified by:
disableUserFeature in interface DarkFeaturesManager

enableSiteFeature

public void enableSiteFeature(String featureKey)
                       throws UnknownFeatureException
Specified by:
enableSiteFeature in interface DarkFeaturesManager
Throws:
UnknownFeatureException

disableSiteFeature

public void disableSiteFeature(String featureKey)
                        throws UnknownFeatureException
Specified by:
disableSiteFeature in interface DarkFeaturesManager
Throws:
UnknownFeatureException


Copyright © 2003–2015 Atlassian. All rights reserved.