1 package com.atlassian.plugin.webresource;
2
3 import com.atlassian.plugin.PluginAccessor;
4
5 import java.util.Map;
6
7 /**
8 * The integration layer between Plugin's Web Resource Handler, and specific applications (eg JIRA, Confluence).
9 *
10 * @see WebResourceManagerImpl#WebResourceManagerImpl(WebResourceIntegration)
11 */
12 public interface WebResourceIntegration
13 {
14 /**
15 * Applications must implement this method to get access to the application's PluginAccessor
16 */
17 PluginAccessor getPluginAccessor();
18
19 /**
20 * This must be a thread-local cache that will be accessible from both the page, and the decorator
21 */
22 Map<String, Object> getRequestCache();
23
24 /**
25 * Represents the unique number for this system, which when updated will flush the cache. This should be a number
26 * and is generally stored in the global application-properties.
27 *
28 * @return A string representing the count
29 */
30 String getSystemCounter();
31
32 /**
33 * Represents the last time the system was updated. This is generally obtained from BuildUtils or similar.
34 */
35 String getSystemBuildNumber();
36
37 /**
38 * This should be the 'short' contextPath for the system. In most cases, this would equal request.getContextPath()
39 * (perhaps retrieved from a thread local), or else parsed from the application's base URL.
40 */
41 String getBaseUrl();
42 }