public interface ConfluenceWebResourceManager
extends com.atlassian.plugin.webresource.WebResourceManager
WebResourceManager
. All new
functionality should go to
ConfluenceWebResourceService
as WebResourceManager is deprecated.Modifier and Type | Method and Description |
---|---|
String |
getAdminCssResources() |
String |
getCssResources()
Delegates to getCssResources(null)
|
String |
getCssResources(String spaceKey)
Returns the HTML output of
WebResourceManager.includeResources(Writer, UrlMode, WebResourceFilter) , which includes
references to all the delayed CSS resources requested by WebResourceManager.requireResource(String) . |
String |
getEditorCssResources(String spaceKey) |
String |
getGlobalCssResourcePrefix()
Get the resource prefix for the global CSS file.
|
String |
getJsResources()
Returns the HTML output of
WebResourceManager.includeResources(Writer, UrlMode, WebResourceFilter) , which includes
references to all the delayed Javascript resources requested by WebResourceManager.requireResource(String) . |
Map<String,String> |
getMetadata()
Returns the map of key-value pairs added via
putMetadata(String, String) . |
String |
getRequiredResources()
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.getRequiredResources() instead. |
String |
getResourceContent(String resourceName)
Gets the content of a resource specified.
|
String |
getResources()
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.getRequiredResources() instead. |
String |
getResourceTags(String moduleCompleteKey)
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.getResourceTags(String) instead. |
String |
getResourceTagsForAdditionalContextsHtml(List<String> contexts)
Deprecated.
since 5.2
|
String |
getSpaceCssPrefix(String spaceKey)
Get the resource prefix for a particular space's CSS file.
|
String |
getStaticResourcePrefix()
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.getStaticResourcePrefix() instead. |
String |
getStaticResourcePrefix(String resourceCounter)
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.getStaticResourcePrefix(String) instead. |
String |
getStaticResourcePrefix(String resourceCounter,
com.atlassian.plugin.webresource.UrlMode urlMode)
Deprecated.
since 5.5. Use
WebResourceUrlProvider.getStaticResourcePrefix(String, com.atlassian.plugin.webresource.UrlMode) instead. |
String |
getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode urlMode)
Deprecated.
since 5.5. Use
WebResourceUrlProvider.getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode) instead. |
String |
getThemeJsResources(String spaceKey)
Returns the script tags for the theme specific javascript resources.
|
void |
includeResources(Writer writer)
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.includeResources(java.io.Writer) instead. |
boolean |
putMetadata(String key,
String value)
Adds key-value String pairs to a map to be rendered later.
|
void |
requireResource(String moduleCompleteKey,
Writer writer)
Deprecated.
since 5.5. Use
VelocityFriendlyPageBuilderService.requireResource(String, java.io.Writer) instead. |
void |
requireResourcesForContext(String context)
Requires all resources which have the given context specified in their descriptor
|
executeInNewContext, getRequiredResources, getRequiredResources, getResourceTags, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, getStaticPluginResource, includeResources, includeResources, includeResources, requireResource, requireResource
@Deprecated void includeResources(Writer writer)
VelocityFriendlyPageBuilderService.includeResources(java.io.Writer)
instead.includeResources
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated String getRequiredResources()
VelocityFriendlyPageBuilderService.getRequiredResources()
instead.getRequiredResources
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated void requireResource(String moduleCompleteKey, Writer writer)
VelocityFriendlyPageBuilderService.requireResource(String, java.io.Writer)
instead.requireResource
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated String getResourceTags(String moduleCompleteKey)
VelocityFriendlyPageBuilderService.getResourceTags(String)
instead.getResourceTags
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated String getStaticResourcePrefix()
VelocityFriendlyPageBuilderService.getStaticResourcePrefix()
instead.getStaticResourcePrefix
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated String getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode urlMode)
WebResourceUrlProvider.getStaticResourcePrefix(com.atlassian.plugin.webresource.UrlMode)
instead.@Deprecated String getStaticResourcePrefix(String resourceCounter)
VelocityFriendlyPageBuilderService.getStaticResourcePrefix(String)
instead.getStaticResourcePrefix
in interface com.atlassian.plugin.webresource.WebResourceManager
@Deprecated String getStaticResourcePrefix(String resourceCounter, com.atlassian.plugin.webresource.UrlMode urlMode)
WebResourceUrlProvider.getStaticResourcePrefix(String, com.atlassian.plugin.webresource.UrlMode)
instead.@Deprecated String getResources()
VelocityFriendlyPageBuilderService.getRequiredResources()
instead.WebResourceManager.includeResources(java.io.Writer, UrlMode)
, which includes references to
all the delayed Javascript and CSS resources requested by WebResourceManager.requireResource(String)
.
This is a convenience method for velocity templates and is equivalent to calling includeResources with
UrlMode.AUTO
and DefaultWebResourceFilter
.
@Deprecated String getResourceTagsForAdditionalContextsHtml(List<String> contexts)
requireResourcesForContext(String)
).
A typical use for this would be to store the resources to be loaded if you want to dynamically add a new context to a rendered page. For example, you might want to dynamically load the Editor (therefore the 'editor' context) from a 'viewpage' context and this method will let you store the resources required on the page as it is rendered in its original state.
contexts
- the extra contexts to return resource tags forString getCssResources()
getCssResources(String)
String getCssResources(String spaceKey)
WebResourceManager.includeResources(Writer, UrlMode, WebResourceFilter)
, which includes
references to all the delayed CSS resources requested by WebResourceManager.requireResource(String)
.
This method should only be called once for each request. Multiple calls to this method
will result with null
being returned.
This is a convenience method for velocity templates and is equivalent to calling includeResources with
UrlMode.AUTO
and CssWebResource
.
spaceKey
- spaceKey if null global theme is used.String getJsResources()
WebResourceManager.includeResources(Writer, UrlMode, WebResourceFilter)
, which includes
references to all the delayed Javascript resources requested by WebResourceManager.requireResource(String)
.
This method should only be called once for each request. Multiple calls to this method
will result with null
being returned.
This is a convenience method for velocity templates and is equivalent to calling includeResources with
UrlMode.AUTO
and JavascriptWebResource
.
String getThemeJsResources(String spaceKey)
null
or invalid,
the globally configured theme resources are returned.String getGlobalCssResourcePrefix()
String getSpaceCssPrefix(String spaceKey)
spaceKey
- the key of the space we're viewing the CSS for, or null for the global CSS.String getResourceContent(String resourceName)
resourceName
- The fully qualified plugin name and resource to include (eg confluence.web.resources:legacy-styles
)void requireResourcesForContext(String context)
requireResourcesForContext
in interface com.atlassian.plugin.webresource.WebResourceManager
context
- The name of the context for which you want to require resources (eg "confluence.main")boolean putMetadata(String key, String value)
key
- a unique key to store the value againstvalue
- an HTML-safe stringMap<String,String> getMetadata()
putMetadata(String, String)
.
Should report an error if called more than once in a request.String getAdminCssResources()
Copyright © 2003–2017 Atlassian. All rights reserved.