com.atlassian.jira.plugin.webresource
Class JiraWebResourceManagerImpl

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

public class JiraWebResourceManagerImpl
extends com.atlassian.plugin.webresource.WebResourceManagerImpl
implements JiraWebResourceManager

A simple subclass of WebResourceManagerImpl that allows us to override some of its behaviour

Since:
v4.4

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.plugin.webresource.WebResourceManager
com.atlassian.plugin.webresource.WebResourceManager.IncludeMode
 
Field Summary
 
Fields inherited from class com.atlassian.plugin.webresource.WebResourceManagerImpl
batchingConfiguration, dependencyResolver, pluginResourceLocator, webResourceFormatters, webResourceIntegration
 
Fields inherited from interface com.atlassian.plugin.webresource.WebResourceManager
DELAYED_INCLUDE_MODE, INLINE_INCLUDE_MODE
 
Constructor Summary
JiraWebResourceManagerImpl(ApplicationProperties appProps, com.atlassian.plugin.webresource.PluginResourceLocator pluginResourceLocator, com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration, com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider, com.atlassian.plugin.webresource.ResourceBatchingConfiguration batchingConfiguration)
           
 
Method Summary
 Map<String,String> getMetadata()
          Returns the map of key-value pairs added via JiraWebResourceManager.putMetadata(String, String).
 String getStaticResourcePrefix(String resourceCounter, com.atlassian.plugin.webresource.UrlMode urlMode)
           
 String getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode urlMode)
           
 boolean putMetadata(String key, String value)
          Adds key-value String pairs to a map to be rendered later.
 
Methods inherited from class com.atlassian.plugin.webresource.WebResourceManagerImpl
executeInNewContext, getRequiredResources, getRequiredResources, getRequiredResources, getResourceTags, getResourceTags, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, getStaticPluginResourcePrefix, getStaticResourcePrefix, getStaticResourcePrefix, includeResources, includeResources, includeResources, includeResources, requireResource, requireResource, requireResource, requireResourcesForContext, setIncludeMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.plugin.webresource.WebResourceManager
executeInNewContext, getRequiredResources, getRequiredResources, getRequiredResources, getResourceTags, getResourceTags, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, getStaticPluginResourcePrefix, getStaticResourcePrefix, getStaticResourcePrefix, includeResources, includeResources, includeResources, includeResources, requireResource, requireResource, requireResource, requireResourcesForContext, setIncludeMode
 

Constructor Detail

JiraWebResourceManagerImpl

public JiraWebResourceManagerImpl(ApplicationProperties appProps,
                                  com.atlassian.plugin.webresource.PluginResourceLocator pluginResourceLocator,
                                  com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration,
                                  com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider,
                                  com.atlassian.plugin.webresource.ResourceBatchingConfiguration batchingConfiguration)
Method Detail

getStaticResourcePrefix

public String getStaticResourcePrefix(String resourceCounter,
                                      com.atlassian.plugin.webresource.UrlMode urlMode)
Specified by:
getStaticResourcePrefix in interface com.atlassian.plugin.webresource.WebResourceManager
Overrides:
getStaticResourcePrefix in class com.atlassian.plugin.webresource.WebResourceManagerImpl

getStaticResourcePrefix

public String getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode urlMode)
Specified by:
getStaticResourcePrefix in interface com.atlassian.plugin.webresource.WebResourceManager
Overrides:
getStaticResourcePrefix in class com.atlassian.plugin.webresource.WebResourceManagerImpl

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). Should return an empty map and log a warning if called more than once in a request.

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


Copyright © 2002-2012 Atlassian. All Rights Reserved.