Class JiraWebResourceManagerImpl

java.lang.Object
com.atlassian.jira.plugin.webresource.JiraWebResourceManagerImpl
All Implemented Interfaces:
JiraWebResourceManager, com.atlassian.webresource.api.WebResourceManager

public class JiraWebResourceManagerImpl extends Object implements JiraWebResourceManager, com.atlassian.webresource.api.WebResourceManager
A simple subclass of WebResourceManagerImpl that allows us to override some of its behaviour
Since:
v4.4
  • Constructor Details

    • JiraWebResourceManagerImpl

      public JiraWebResourceManagerImpl(JiraPluginResourceLocator pluginResourceLocator, com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration, com.atlassian.webresource.api.WebResourceUrlProvider webResourceUrlProvider, com.atlassian.plugin.webresource.ResourceBatchingConfiguration batchingConfiguration)
  • Method Details

    • putMetadata

      public boolean putMetadata(String key, String value)
      Description copied from interface: JiraWebResourceManager
      Adds key-value String pairs to a map to be rendered later.
      Specified by:
      putMetadata in interface JiraWebResourceManager
      Parameters:
      key - a unique key to store the value against
      value - an HTML-safe string
      Returns:
      true if metadata added to map successfully
    • getMetadata

      public Map<String,String> getMetadata()
      Description copied from interface: JiraWebResourceManager
      Returns the map of key-value pairs added via JiraWebResourceManager.putMetadata(String, String).

      Prior to v6.4, multiple invocations weren't supported, and only the first call would return metadata. Subsequent calls would return an empty Map. Since v6.4, multiple invocations of this method are supported. Each invocation drains and returns the metadata added since the last invocation.

      Specified by:
      getMetadata in interface JiraWebResourceManager
      Returns:
      the map of key-value pairs added via JiraWebResourceManager.putMetadata(String, String).
    • requireResource

      public void requireResource(String s)
      Specified by:
      requireResource in interface com.atlassian.webresource.api.WebResourceManager
    • includeResources

      public void includeResources(Iterable<String> iterable, Writer writer, com.atlassian.webresource.api.UrlMode urlMode)
      Specified by:
      includeResources in interface com.atlassian.webresource.api.WebResourceManager
    • includeResources

      public void includeResources(Writer writer, com.atlassian.webresource.api.UrlMode urlMode)
      Specified by:
      includeResources in interface com.atlassian.webresource.api.WebResourceManager
    • includeResources

      public void includeResources(Writer writer, com.atlassian.webresource.api.UrlMode urlMode, com.atlassian.webresource.api.WebResourceFilter webResourceFilter)
      Specified by:
      includeResources in interface com.atlassian.webresource.api.WebResourceManager
    • getRequiredResources

      public String getRequiredResources(com.atlassian.webresource.api.UrlMode urlMode)
      Specified by:
      getRequiredResources in interface com.atlassian.webresource.api.WebResourceManager
    • getRequiredResources

      public String getRequiredResources(com.atlassian.webresource.api.UrlMode urlMode, com.atlassian.webresource.api.WebResourceFilter webResourceFilter)
      Specified by:
      getRequiredResources in interface com.atlassian.webresource.api.WebResourceManager
    • requireResource

      public void requireResource(String s, Writer writer, com.atlassian.webresource.api.UrlMode urlMode)
      Specified by:
      requireResource in interface com.atlassian.webresource.api.WebResourceManager
    • requireResourcesForContext

      public void requireResourcesForContext(String s)
      Specified by:
      requireResourcesForContext in interface com.atlassian.webresource.api.WebResourceManager
    • getResourceTags

      public String getResourceTags(String s, com.atlassian.webresource.api.UrlMode urlMode)
      Specified by:
      getResourceTags in interface com.atlassian.webresource.api.WebResourceManager