@ExperimentalApi
public interface UrlReadingCondition
extends com.atlassian.plugin.web.baseconditions.BaseCondition
Web Resource module descriptors can use Conditions of this class or of Condition,
however the use of Condition for webresources is discouraged. If a webresource contains a
com.atlassian.plugin.web.Condition, that webresource is taken out of the batch and included as a standalone resource
download. This has two negative effects:
UrlReadingConditions are included in batches. When an HTML page is served, the UrlReadingCondition is asked to
contribute to the URL in addToUrl(com.atlassian.plugin.webresource.url.UrlBuilder). At resource serve time,
the condition evaluates whether it should display based on the querystring.
| Modifier and Type | Method and Description |
|---|---|
void |
addToUrl(UrlBuilder urlBuilder)
Called when constructing the URL as the hosting HTML page is being served.
|
void |
init(Map<String,String> params)
Called after creation and autowiring.
|
boolean |
shouldDisplay(QueryParams params)
Determine whether the web fragment should be displayed.
|
void init(Map<String,String> params) throws com.atlassian.plugin.PluginParseException
params - The optional map of parameters specified in XML.com.atlassian.plugin.PluginParseExceptionvoid addToUrl(UrlBuilder urlBuilder)
urlBuilder - interface for contributing to the URLboolean shouldDisplay(QueryParams params)
params - query paramsCopyright © 2018 Atlassian. All rights reserved.