|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebResourceIntegration
The integration layer between Plugin's Web Resource Handler, and specific applications (eg JIRA, Confluence).
WebResourceManagerImpl#WebResourceManagerImpl(PluginResourceLocator, WebResourceIntegration)
Method Summary | |
---|---|
String |
getBaseUrl()
Returns the base URL for this application. |
String |
getBaseUrl(UrlMode urlMode)
Returns the base URL for this application in either relative or absolute format, depending on the value of urlMode . |
com.atlassian.plugin.PluginAccessor |
getPluginAccessor()
Applications must implement this method to get access to the application's PluginAccessor |
Map<String,Object> |
getRequestCache()
This must be a thread-local cache that will be accessible from both the page, and the decorator |
Map<String,String> |
getResourceSubstitutionVariables()
EXPERIMENTAL - PLUG-888. |
String |
getStaticResourceLocale()
The locale identifier that should be inserted into static resource urls for the current request, if appropriate. |
String |
getSuperBatchVersion()
This version number is used for caching URL generation, and needs to be incremented every time the contents of the superbatch may have changed. |
String |
getSystemBuildNumber()
Represents the last time the system was updated. |
String |
getSystemCounter()
Represents the unique number for this system, which when updated will flush the cache. |
File |
getTemporaryDirectory()
A reference to the temporary directory the application want the plugin system to use. |
Method Detail |
---|
com.atlassian.plugin.PluginAccessor getPluginAccessor()
Map<String,Object> getRequestCache()
String getSystemCounter()
String getSystemBuildNumber()
String getBaseUrl()
getBaseUrl(UrlMode)
with a urlMode
value of UrlMode.AUTO
.
String getBaseUrl(UrlMode urlMode)
urlMode
.
If urlMode == {@link UrlMode#ABSOLUTE}
, this method returns an absolute URL, with URL
scheme, hostname, port (if non-standard for the scheme), and context path.
If urlMode == {@link UrlMode#RELATIVE}
, this method returns a relative URL containing
just the context path.
If urlMode == {@link UrlMode#AUTO}
, this method may return either an absolute or a
relative URL. Implementations are free to determine which mode to use based on any criteria of their choosing.
For example, an implementation may choose to return a relative URL if it detects that it is running in the
context of an HTTP request, and an absolute URL if it detects that it is not. Or it may choose to always return
an absolute URL, or always return a relative URL. Callers should only use WebResourceManager.UrlMode#AUTO
when they are sure that either an absolute or a relative URL will be
appropriate, and should not rely on any particular observed behavior regarding how this value is interpreted,
which may vary across different implementations.
urlMode
- specifies whether to use absolute URLs, relative URLs, or allow the concrete implementation to
decide
String getSuperBatchVersion()
String getStaticResourceLocale()
File getTemporaryDirectory()
@Beta Map<String,String> getResourceSubstitutionVariables()
This is used to replace any ${var}
variables in the location of a <resource>.
This will be called at resource-fetch time and page-render time. Therefore, for example, if the return value
depends on the current user, then the current user needs to be available at resource-fetch
time as well as page-render time.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |