Interface UrlReadingCondition

All Known Implementing Classes:
AbstractBooleanUrlReadingCondition

public interface UrlReadingCondition
Condition that contributes to the URL.

UrlReadingConditions are included in batches. When an HTML page is served, the UrlReadingCondition is asked to contribute to the URL in addToUrl(UrlBuilder). At resource serve time, the condition evaluates whether it should display based on the querystring.

Since:
6.3.0
  • Method Summary

    Modifier and Type
    Method
    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
    Determine whether the web fragment should be displayed.
  • Method Details

    • init

      void init(Map<String,String> params) throws com.atlassian.plugin.PluginParseException
      Called after creation and autowiring.
      Parameters:
      params - The optional map of parameters specified in XML.
      Throws:
      com.atlassian.plugin.PluginParseException
    • addToUrl

      void addToUrl(UrlBuilder urlBuilder)
      Called when constructing the URL as the hosting HTML page is being served. Can add parameters to the query string and alter the resource hash.
      Parameters:
      urlBuilder - interface for contributing to the URL
    • shouldDisplay

      boolean shouldDisplay(QueryParams params)
      Determine whether the web fragment should be displayed. This method should only read values from its config and the query params.
      Parameters:
      params - query params
      Returns:
      true if the user should see the fragment, false otherwise