Class Globals

java.lang.Object
com.atlassian.plugin.webresource.impl.Globals

public class Globals extends Object
Set of global final stateless objects like configuration, cache etc.
Since:
3.3
  • Constructor Details

    • Globals

      public Globals(Config config, @Nullable com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
  • Method Details

    • getConfig

      public Config getConfig()
    • getRouter

      public Router getRouter()
    • getContentCache

      public Cache 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

      public UrlCache getUrlCache()
    • buildAndSetTemporaryIncrementalCache

      public void buildAndSetTemporaryIncrementalCache()
      Build and setup cache according to configuration setting.
    • getTemporaryIncrementalCache

      public Cache getTemporaryIncrementalCache()
    • getSnapshot

      public Snapshot 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()