com.atlassian.sal.api.features
Class DarkFeatureEnabledCondition

java.lang.Object
  extended by com.atlassian.sal.api.features.DarkFeatureEnabledCondition
All Implemented Interfaces:
com.atlassian.plugin.web.Condition

public class DarkFeatureEnabledCondition
extends Object
implements com.atlassian.plugin.web.Condition

A parameterised plugin module condition for enabling modules in the presence of a dark feature. Pass a param with parameter name "featureKey" containing the dark feature key. Example:

  <web-item key="some-key" section="some/section" weight="1">
      <label key="menu.title"/>
      <link>/some/path</link>
      <condition class="com.atlassian.sal.api.features.DarkFeatureEnabledCondition">
          <param name="featureKey">feature.key</param>
      </condition>
  </web-item>
 
The feature key is validated using the ValidFeatureKeyPredicate.

See Also:
ValidFeatureKeyPredicate

Constructor Summary
DarkFeatureEnabledCondition(DarkFeatureManager darkFeatureManager)
           
 
Method Summary
 void init(Map<String,String> params)
           
 boolean shouldDisplay(Map<String,Object> stringObjectMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DarkFeatureEnabledCondition

public DarkFeatureEnabledCondition(DarkFeatureManager darkFeatureManager)
Method Detail

init

public void init(Map<String,String> params)
          throws com.atlassian.plugin.PluginParseException
Specified by:
init in interface com.atlassian.plugin.web.Condition
Throws:
com.atlassian.plugin.PluginParseException

shouldDisplay

public boolean shouldDisplay(Map<String,Object> stringObjectMap)
Specified by:
shouldDisplay in interface com.atlassian.plugin.web.Condition


Copyright © 2015 Atlassian. All rights reserved.