com.atlassian.sal.core.features
Class DefaultSiteDarkFeaturesStorage

java.lang.Object
  extended by com.atlassian.sal.core.features.DefaultSiteDarkFeaturesStorage
All Implemented Interfaces:
SiteDarkFeaturesStorage

public class DefaultSiteDarkFeaturesStorage
extends Object
implements SiteDarkFeaturesStorage

Default implementation responsible for persisting site wide enabled dark features. The general contract is that reading is fast while updating is more expensive. Uses the plugin settings to store the dark features. Should be able to store up to 1.980 unique dark feature keys with each key about 50 characters long.

Since:
2.10

Constructor Summary
DefaultSiteDarkFeaturesStorage(PluginSettingsFactory pluginSettingsFactory)
           
 
Method Summary
 void disable(String featureKey)
          Disable the given dark feature key site wide.
 void enable(String featureKey)
          Enable the given dark feature key site wide.
 com.google.common.collect.ImmutableSet<String> getEnabledDarkFeatures()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSiteDarkFeaturesStorage

public DefaultSiteDarkFeaturesStorage(PluginSettingsFactory pluginSettingsFactory)
Method Detail

enable

public void enable(String featureKey)
Description copied from interface: SiteDarkFeaturesStorage
Enable the given dark feature key site wide.

Specified by:
enable in interface SiteDarkFeaturesStorage
Parameters:
featureKey - the feature key to be enabled; not blank, leading and trailing whitespaces are removed

disable

public void disable(String featureKey)
Description copied from interface: SiteDarkFeaturesStorage
Disable the given dark feature key site wide.

Specified by:
disable in interface SiteDarkFeaturesStorage
Parameters:
featureKey - the feature key to be disabled; not blank, leading and trailing whitespaces are removed

getEnabledDarkFeatures

public com.google.common.collect.ImmutableSet<String> getEnabledDarkFeatures()
Specified by:
getEnabledDarkFeatures in interface SiteDarkFeaturesStorage
Returns:
all enabled site wide dark feature keys.


Copyright © 2015 Atlassian. All rights reserved.