@ParametersAreNonnullByDefault public class DarkFeatureEnabledCondition extends Object implements com.atlassian.plugin.web.Condition, com.atlassian.plugin.webresource.condition.UrlReadingCondition
<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.ValidFeatureKeyPredicate| Constructor and Description |
|---|
DarkFeatureEnabledCondition(DarkFeatureManager darkFeatureManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToUrl(com.atlassian.plugin.webresource.url.UrlBuilder urlBuilder)
For supporting web-resources
|
void |
init(Map<String,String> params) |
boolean |
shouldDisplay(Map<String,Object> stringObjectMap)
For web fragments support
|
boolean |
shouldDisplay(com.atlassian.plugin.webresource.QueryParams queryParams)
For supporting web-resources
|
public DarkFeatureEnabledCondition(DarkFeatureManager darkFeatureManager)
public void init(Map<String,String> params)
init in interface com.atlassian.plugin.web.Conditioninit in interface com.atlassian.plugin.webresource.condition.UrlReadingConditionpublic void addToUrl(com.atlassian.plugin.webresource.url.UrlBuilder urlBuilder)
addToUrl in interface com.atlassian.plugin.webresource.condition.UrlReadingConditionpublic boolean shouldDisplay(com.atlassian.plugin.webresource.QueryParams queryParams)
shouldDisplay in interface com.atlassian.plugin.webresource.condition.UrlReadingConditionCopyright © 2024 Atlassian. All rights reserved.