public class ConfluenceExternalWebResourcesProvider extends Object implements com.atlassian.plugin.webresource.external.ExternalWebResourcesProvider
This enables us to say, for example, that the webresource "com.atlassian.plugins.jquery:jquery" should be served
from somewhere like https://d28q6miprfdsbe.cloudfront.net/jquery-1.7.2-confluence-v5.js
.
Constructor and Description |
---|
ConfluenceExternalWebResourcesProvider(ConfluenceFrontendAssetsManager frontendAssetsManager,
ExternalWebResourcesReader externalWebResourcesReader,
FeatureFlagServiceClient features) |
Modifier and Type | Method and Description |
---|---|
com.atlassian.plugin.webresource.external.ExternalWebResources |
get(String hash)
Returns the
ExternalWebResources configuration corresponding to the supplied hash. |
com.atlassian.plugin.webresource.external.ExternalWebResources |
getLatest()
Returns the latest
ExternalWebResources configuration known to this instance. |
public ConfluenceExternalWebResourcesProvider(ConfluenceFrontendAssetsManager frontendAssetsManager, ExternalWebResourcesReader externalWebResourcesReader, FeatureFlagServiceClient features)
public com.atlassian.plugin.webresource.external.ExternalWebResources getLatest()
ExternalWebResources
configuration known to this instance.
This config is used to determine which script and link tags are rendered.getLatest
in interface com.atlassian.plugin.webresource.external.ExternalWebResourcesProvider
public com.atlassian.plugin.webresource.external.ExternalWebResources get(String hash)
ExternalWebResources
configuration corresponding to the supplied hash.
If the hash matches a known ExternalWebResourcesReader.LocalExternalsType
, the config will be loaded from a local file, else it
will be retrieved from the CDN.
The retrieved config is used to calculate the contents of JS and CSS batches, so it must match the config used
to determine the script and link tags rendered in the HTML. (see getLatest()
).get
in interface com.atlassian.plugin.webresource.external.ExternalWebResourcesProvider
Copyright © 2003–2017 Atlassian. All rights reserved.