1 package com.atlassian.plugin.webresource;
2
3 import java.util.List;
4
5 /**
6 * Resource batching configuration for the {@link WebResourceManagerImpl}.
7 *
8 * Currently contains the configuration for batch support.
9 */
10 public interface ResourceBatchingConfiguration
11 {
12 /**
13 * Gets whether web resources in different resource modules should be batched together.
14 * @return true if web resources in different resource modules should be batched together
15 */
16 boolean isSuperBatchingEnabled();
17
18 /**
19 * Gets the list of resource plugin modules that should be included in the superbatch, in the order that
20 * they should be batched. No dependency resolution is performed, so it is important that the configuration
21 * includes all dependent resources in the right order.
22 *
23 * Any call to {@link WebResourceManager#requireResource} for one of these resources will be a no-op,
24 * and any dependency resolution for resources will stop if the dependency is in the superbatch.
25 * @return a list of resource plugin modules that should be included in the superbatch.
26 */
27 List<String> getSuperBatchModuleCompleteKeys();
28
29 /**
30 * Determines whether web resources in the same context should be batched together.
31 * @return true if web resources in the same context are batched together.
32 * @since 2.9.0
33 */
34 boolean isContextBatchingEnabled();
35
36 /**
37 * Determines whether plugin resources of the same type defined within a single web resource
38 * are batched into one file.
39 * @return true if plugin resources in the same web resource are batched together.
40 * @since 2.9.0
41 */
42 boolean isPluginWebResourceBatchingEnabled();
43
44 /**
45 * @return true if the HTML tags created for batch resources should include data attributes listing the
46 * contents of the batch. This would be useful to turn on if you want the front end client to be able
47 * to track what resources and contexts it is loading.
48 *
49 * @since 2.13.0
50 */
51 boolean isBatchContentTrackingEnabled();
52 }