View Javadoc

1   package com.atlassian.plugin.webresource;
2   
3   import com.atlassian.plugin.util.PluginUtils;
4   
5   import java.util.List;
6   import java.util.Collections;
7   
8   /**
9    * Default configuration for the plugin resource locator, for those applications that do not want to perform
10   * any super-batching.
11   */
12  public class DefaultResourceBatchingConfiguration implements ResourceBatchingConfiguration
13  {
14      public static final String PLUGIN_WEBRESOURCE_BATCHING_OFF = "plugin.webresource.batching.off";
15  
16      public boolean isSuperBatchingEnabled()
17      {
18          return false;
19      }
20  
21      public List<String> getSuperBatchModuleCompleteKeys()
22      {
23          return Collections.emptyList();
24      }
25  
26      public boolean isContextBatchingEnabled()
27      {
28          return false;
29      }
30  
31      public boolean isPluginWebResourceBatchingEnabled()
32      {
33          final String explicitSetting = System.getProperty(PLUGIN_WEBRESOURCE_BATCHING_OFF);
34          if (explicitSetting != null)
35          {
36              return !Boolean.parseBoolean(explicitSetting);
37          }
38          else
39          {
40              return !Boolean.parseBoolean(System.getProperty(PluginUtils.ATLASSIAN_DEV_MODE));
41          }
42      }
43  }