com.atlassian.confluence.plugin.webresource
Class ConfluenceWebResourceIntegration

java.lang.Object
  extended by com.atlassian.confluence.plugin.webresource.ConfluenceWebResourceIntegration
All Implemented Interfaces:
com.atlassian.plugin.webresource.WebResourceIntegration

public class ConfluenceWebResourceIntegration
extends Object
implements com.atlassian.plugin.webresource.WebResourceIntegration

Confluence implementation of WebResourceIntegration, for use with the static resource caching code.


Field Summary
static String NOCACHE_PREFIX
           
 
Constructor Summary
ConfluenceWebResourceIntegration(com.atlassian.plugin.PluginAccessor pluginAccessor, PluginDirectoryProvider pluginDirectoryProvider, SettingsManager settingsManager, CssResourceCounterManager cssResourceCounterManager, Counter pluginResourceCounter, LocaleManager localeManager, ContextPathHolder contextPathHolder, I18NBeanFactory i18NBeanFactory, com.google.common.base.Supplier<com.atlassian.plugin.webresource.cdn.CDNStrategy> cdnStrategySupplier, com.atlassian.plugin.event.PluginEventManager pluginEventManager, com.atlassian.cache.CacheFactory cacheFactory)
           
 
Method Summary
 String getBaseUrl()
           
 String getBaseUrl(com.atlassian.plugin.webresource.UrlMode urlMode)
          Returns the base url of the application for the given url mode.
 com.atlassian.cache.CacheFactory getCacheFactory()
           
 com.atlassian.plugin.webresource.cdn.CDNStrategy getCDNStrategy()
           
 String getI18nRawText(Locale locale, String key)
           
 String getI18nText(Locale locale, String key)
           
 Locale getLocale()
           
 com.atlassian.plugin.PluginAccessor getPluginAccessor()
           
 com.atlassian.plugin.event.PluginEventManager getPluginEventManager()
           
 Map<String,Object> getRequestCache()
           
 String getStaticResourceLocale()
           
 String getSuperBatchVersion()
           
 String getSystemBuildNumber()
           
 String getSystemCounter()
          If the system property for dev mode or disabling caches is set, NOCAHCE prefix is returned.
 File getTemporaryDirectory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOCACHE_PREFIX

public static final String NOCACHE_PREFIX
See Also:
Constant Field Values
Constructor Detail

ConfluenceWebResourceIntegration

public ConfluenceWebResourceIntegration(com.atlassian.plugin.PluginAccessor pluginAccessor,
                                        PluginDirectoryProvider pluginDirectoryProvider,
                                        SettingsManager settingsManager,
                                        CssResourceCounterManager cssResourceCounterManager,
                                        Counter pluginResourceCounter,
                                        LocaleManager localeManager,
                                        ContextPathHolder contextPathHolder,
                                        I18NBeanFactory i18NBeanFactory,
                                        com.google.common.base.Supplier<com.atlassian.plugin.webresource.cdn.CDNStrategy> cdnStrategySupplier,
                                        com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                                        com.atlassian.cache.CacheFactory cacheFactory)
Method Detail

getStaticResourceLocale

public String getStaticResourceLocale()
Specified by:
getStaticResourceLocale in interface com.atlassian.plugin.webresource.WebResourceIntegration

getPluginAccessor

public com.atlassian.plugin.PluginAccessor getPluginAccessor()
Specified by:
getPluginAccessor in interface com.atlassian.plugin.webresource.WebResourceIntegration

getPluginEventManager

public com.atlassian.plugin.event.PluginEventManager getPluginEventManager()
Specified by:
getPluginEventManager in interface com.atlassian.plugin.webresource.WebResourceIntegration

getCacheFactory

public com.atlassian.cache.CacheFactory getCacheFactory()
Specified by:
getCacheFactory in interface com.atlassian.plugin.webresource.WebResourceIntegration

getRequestCache

public Map<String,Object> getRequestCache()
Specified by:
getRequestCache in interface com.atlassian.plugin.webresource.WebResourceIntegration

getSystemCounter

public String getSystemCounter()
If the system property for dev mode or disabling caches is set, NOCAHCE prefix is returned.

If the revision number is available from the Build Information, it will be included in the system counter with the global css resouce counter.

Specified by:
getSystemCounter in interface com.atlassian.plugin.webresource.WebResourceIntegration
Returns:
the System counter as a String

getSystemBuildNumber

public String getSystemBuildNumber()
Specified by:
getSystemBuildNumber in interface com.atlassian.plugin.webresource.WebResourceIntegration

getBaseUrl

public String getBaseUrl()
Specified by:
getBaseUrl in interface com.atlassian.plugin.webresource.WebResourceIntegration

getBaseUrl

public String getBaseUrl(com.atlassian.plugin.webresource.UrlMode urlMode)
Returns the base url of the application for the given url mode. For UrlMode.AUTO the relative url is returned if found, otherwise will default to returning the absolute url.

This method can return null if the base url cannot be determined.

Specified by:
getBaseUrl in interface com.atlassian.plugin.webresource.WebResourceIntegration
Returns:
the base url of the application for the given url mode

getSuperBatchVersion

public String getSuperBatchVersion()
Specified by:
getSuperBatchVersion in interface com.atlassian.plugin.webresource.WebResourceIntegration

getTemporaryDirectory

public File getTemporaryDirectory()
Specified by:
getTemporaryDirectory in interface com.atlassian.plugin.webresource.WebResourceIntegration

getCDNStrategy

public com.atlassian.plugin.webresource.cdn.CDNStrategy getCDNStrategy()
Specified by:
getCDNStrategy in interface com.atlassian.plugin.webresource.WebResourceIntegration

getLocale

public Locale getLocale()
Specified by:
getLocale in interface com.atlassian.plugin.webresource.WebResourceIntegration

getI18nRawText

public String getI18nRawText(Locale locale,
                             String key)
Specified by:
getI18nRawText in interface com.atlassian.plugin.webresource.WebResourceIntegration

getI18nText

public String getI18nText(Locale locale,
                          String key)
Specified by:
getI18nText in interface com.atlassian.plugin.webresource.WebResourceIntegration


Copyright © 2003–2015 Atlassian. All rights reserved.