Class Globals
java.lang.Object
com.atlassian.plugin.webresource.impl.Globals
Set of global final stateless objects like configuration, cache etc.
- Since:
- 3.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBuild and setup cache according to configuration setting.com.atlassian.event.api.EventPublishercom.atlassian.plugin.event.PluginEventManagerAnalyzes current state of the plugin system and return web resources.voidonStateChange(com.atlassian.plugin.webresource.impl.Globals.StateChangeCallback callback) Provided callback would be called if the state of the system changed (any plugin change event).voidTrigger the state change event, it will notify all state change listeners.
-
Constructor Details
-
Globals
public Globals(Config config, @Nullable com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
getConfig
-
getRouter
-
getContentCache
-
onStateChange
public void onStateChange(com.atlassian.plugin.webresource.impl.Globals.StateChangeCallback callback) Provided callback would be called if the state of the system changed (any plugin change event). Used mostly to setup cache clear listeners. -
triggerStateChange
public void triggerStateChange()Trigger the state change event, it will notify all state change listeners. Used mostly to clear cache. -
getUrlCache
-
buildAndSetTemporaryIncrementalCache
public void buildAndSetTemporaryIncrementalCache()Build and setup cache according to configuration setting. -
getTemporaryIncrementalCache
-
getSnapshot
Analyzes current state of the plugin system and return web resources. Uses cache, the cache would be cleared on any plugin change event. -
getPluginEventManager
public com.atlassian.plugin.event.PluginEventManager getPluginEventManager() -
getEventPublisher
@Nullable public com.atlassian.event.api.EventPublisher getEventPublisher()
-