public class DefaultResourceBatchingConfiguration extends Object implements ResourceBatchingConfiguration
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_WEB_RESOURCE_BATCH_CONTENT_TRACKING |
static String |
PLUGIN_WEB_RESOURCE_JAVASCRIPT_TRY_CATCH_WRAPPING |
static String |
PLUGIN_WEB_RESOURCE_SOURCE_MAP_ENABLED |
static String |
PLUGIN_WEB_RESOURCE_SOURCE_MAP_OPTIMISED_FOR_DEVELOPMENT |
static String |
PLUGIN_WEBRESOURCE_BATCHING_OFF |
| Constructor and Description |
|---|
DefaultResourceBatchingConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getSuperBatchModuleCompleteKeys()
Gets the list of resource plugin modules that should be included in the superbatch, in the order that
they should be batched.
|
boolean |
isBatchContentTrackingEnabled() |
boolean |
isContextBatchingEnabled()
Determines whether web resources in the same context should be batched together.
|
boolean |
isJavaScriptTryCatchWrappingEnabled()
Currently (as of v2.14) this is false by default.
|
boolean |
isPluginWebResourceBatchingEnabled()
Determines whether plugin resources of the same type defined within a single web resource
are batched into one file.
|
boolean |
isSourceMapEnabled()
Enables generation of the Source Map.
|
boolean |
isSuperBatchingEnabled()
Gets whether web resources in different resource modules should be batched together.
|
boolean |
optimiseSourceMapsForDevelopment()
Source Map could be optimised for production or development.
|
boolean |
resplitMergedContextBatchesForThisRequest() |
public static final String PLUGIN_WEBRESOURCE_BATCHING_OFF
public static final String PLUGIN_WEB_RESOURCE_BATCH_CONTENT_TRACKING
public static final String PLUGIN_WEB_RESOURCE_JAVASCRIPT_TRY_CATCH_WRAPPING
public static final String PLUGIN_WEB_RESOURCE_SOURCE_MAP_ENABLED
public static final String PLUGIN_WEB_RESOURCE_SOURCE_MAP_OPTIMISED_FOR_DEVELOPMENT
public DefaultResourceBatchingConfiguration()
public boolean isSuperBatchingEnabled()
ResourceBatchingConfigurationisSuperBatchingEnabled in interface ResourceBatchingConfigurationpublic List<String> getSuperBatchModuleCompleteKeys()
ResourceBatchingConfigurationWebResourceManager.requireResource(java.lang.String) for one of these resources will be a no-op,
and any dependency resolution for resources will stop if the dependency is in the superbatch.getSuperBatchModuleCompleteKeys in interface ResourceBatchingConfigurationpublic boolean isContextBatchingEnabled()
ResourceBatchingConfigurationisContextBatchingEnabled in interface ResourceBatchingConfigurationpublic boolean isPluginWebResourceBatchingEnabled()
ResourceBatchingConfigurationisPluginWebResourceBatchingEnabled in interface ResourceBatchingConfigurationpublic boolean isJavaScriptTryCatchWrappingEnabled()
isJavaScriptTryCatchWrappingEnabled in interface ResourceBatchingConfigurationpublic boolean isBatchContentTrackingEnabled()
isBatchContentTrackingEnabled in interface ResourceBatchingConfigurationpublic boolean resplitMergedContextBatchesForThisRequest()
resplitMergedContextBatchesForThisRequest in interface ResourceBatchingConfigurationThis method is called multiple times (at least once per request) and its value is not cached. Therefore, implementations can perform request-local logic. That is, they can browser-sniff for IE.
public boolean isSourceMapEnabled()
ResourceBatchingConfigurationCould be enabled in production too with `optimiseSourceMapsForDevelopment` set to `false`, with such setting it won't slow down the instance.
isSourceMapEnabled in interface ResourceBatchingConfigurationpublic boolean optimiseSourceMapsForDevelopment()
ResourceBatchingConfigurationIn production the JS & CSS generation will be fast (exactly the same as without the Source Map) but the Source Map generation will be slow.
In development the JS & CSS generation will be a little slower but the Source Map generation will be fast.
It's better to enable this option during development (it **must** be disabled in production).
optimiseSourceMapsForDevelopment in interface ResourceBatchingConfigurationCopyright © 2018 Atlassian. All rights reserved.