public interface WebResourceIntegration
DefaultPageBuilderService.DefaultPageBuilderService(WebResourceIntegration, com.atlassian.webresource.api.assembler.WebResourceAssemblerFactory),
DefaultWebResourceAssemblerFactory.DefaultWebResourceAssemblerFactory(PluginResourceLocator),
WebResourceManagerImpl.WebResourceManagerImpl(PluginResourceLocator, WebResourceIntegration, WebResourceUrlProvider)| Modifier and Type | Method and Description |
|---|---|
Set<String> |
allowedCondition1Keys()
Works together with `forbidCondition1AndTransformer1` and temporarily allows for given set of plugins to have
legacy stuff.
|
Set<String> |
allowedTransform1Keys()
Works together with `forbidCondition1AndTransformer1` and temporarily allows for given set of plugins to have
legacy stuff.
|
default boolean |
amdEnabled()
If AMD enabled.
|
default boolean |
forbidCondition1AndTransformer1()
If enabled and there's at leas one Condition1 or Transformer1 Web Resource will throw an error and stop working.
|
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. |
default BigPipeConfiguration |
getBigPipeConfiguration() |
CDNStrategy |
getCDNStrategy()
Returns the CDNStrategy for serving resources via CDN.
|
default List<TransformationDto> |
getDefaultAmdModuleTransformers()
Default transformers that should be applied to AMD modules.
|
String |
getHostApplicationVersion()
The version number of the host application, for example "7.0.0-OD-07" or "5.6".
|
String |
getI18nRawText(Locale locale,
String key)
Retrieve the unformatted message text associated with this key.
|
String |
getI18nStateHash()
The locale hash that should be inserted into static resource urls for the current request, if appropriate.
|
String |
getI18nText(Locale locale,
String key)
Retrieve the message text associated with this key.
|
Locale |
getLocale() |
com.atlassian.plugin.PluginAccessor |
getPluginAccessor()
Applications must implement this method to get access to the application's PluginAccessor
|
com.atlassian.plugin.event.PluginEventManager |
getPluginEventManager()
Deprecated.
since v3.3.2
|
Map<String,Object> |
getRequestCache()
This must be a thread-local cache that will be accessible from both the page, and the decorator
|
String |
getStaticResourceLocale()
Deprecated.
since 3.5.22 - This method includes current locale in URL hash which is unnecessary since it's
already in a query parameter. The current behaviour causes unnecessary cache misses of pre-baked resources
since it'll only work for instances with the same locale in which the pre-baker ran.
Use
getI18nStateHash() instead. |
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.
|
Iterable<Locale> |
getSupportedLocales() |
default List<CompleteWebResourceKey> |
getSyncWebResourceKeys()
Synchronous resources will be served before `async` ones.
|
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.
|
default boolean |
isCompiledResourceEnabled()
Returns whether "compiled resources" are enabled.
|
default boolean |
isCtCdnMappingEnabled()
Checks if CT-CDN is enable at this moment.
|
default boolean |
isDeferJsAttributeEnabled()
CONFDEV-35445 Should WRM enable the defer attribute in its JS tags?
Experimental Api
|
default boolean |
isIncrementalCacheEnabled()
If incremental cache should be used.
|
default boolean |
useAsyncAttributeForScripts()
If enabled all javascript tags will be generated with `async` attribute.
|
default boolean |
usePluginInstallTimeInsteadOfTheVersionForSnapshotPlugins()
If true the plugin install time will be used instead of the plugin version for the SNAPSHOT plugins.
|
com.atlassian.plugin.PluginAccessor getPluginAccessor()
@Deprecated com.atlassian.plugin.event.PluginEventManager getPluginEventManager()
Map<String,Object> getRequestCache()
String getSystemCounter()
String getSystemBuildNumber()
String getHostApplicationVersion()
getSystemBuildNumber(), which does not necessarily change when the application changes
(at least in JIRA this represents the database build number, not the application version number).String getBaseUrl()
In general, the behavior of this method should be equivalent to calling 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
decideString getSuperBatchVersion()
@Deprecated String getStaticResourceLocale()
getI18nStateHash() instead.String getI18nStateHash()
File getTemporaryDirectory()
CDNStrategy getCDNStrategy()
Locale getLocale()
Iterable<Locale> getSupportedLocales()
String getI18nRawText(Locale locale, String key)
locale - locale in which to look up keyskey - key for the i18ned messageString getI18nText(Locale locale, String key)
locale - locale in which to look up keyskey - key for the i18ned messageSet<String> allowedCondition1Keys()
Set<String> allowedTransform1Keys()
default boolean forbidCondition1AndTransformer1()
default boolean isIncrementalCacheEnabled()
Please note that if it's enabled the size of the cache should be big enough. It caches the transformed content of the individual JS / CSS files, and there are lots of such files. The size defined by `plugin.webresource.incrementalcache.size` system property.
See https://extranet.atlassian.com/display/~apetrushin/Incremental+build+Cache+for+Context+Batch for details.
default boolean isDeferJsAttributeEnabled()
default BigPipeConfiguration getBigPipeConfiguration()
@ExperimentalApi default boolean useAsyncAttributeForScripts()
@ExperimentalApi default List<CompleteWebResourceKey> getSyncWebResourceKeys()
default boolean amdEnabled()
default boolean usePluginInstallTimeInsteadOfTheVersionForSnapshotPlugins()
It's needed to simplify development and flush the cache when updated SNAPSHOT plugin installed.
default List<TransformationDto> getDefaultAmdModuleTransformers()
default boolean isCtCdnMappingEnabled()
default boolean isCompiledResourceEnabled()
Copyright © 2019 Atlassian. All rights reserved.