Class PluginResourceLocatorImpl

java.lang.Object
com.atlassian.plugin.webresource.PluginResourceLocatorImpl
All Implemented Interfaces:
PluginResourceLocator

@Deprecated public class PluginResourceLocatorImpl extends Object implements PluginResourceLocator
Deprecated.
since 3.3.2
Default implementation of PluginResourceLocator.
Since:
2.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    PluginResourceLocatorImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Config config, com.atlassian.event.api.EventPublisher eventPublisher)
    Deprecated.
     
    PluginResourceLocatorImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Globals globals)
    Deprecated.
    Added for PLUGWEB-612 as a way for anybody who created their own Globals object, via Spring or otherwise.
    PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, WebResourceUrlProvider webResourceUrlProvider, ResourceBatchingConfiguration batchingConfiguration, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
    Deprecated.
     
    PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, WebResourceUrlProvider webResourceUrlProvider, ResourceBatchingConfiguration batchingConfiguration, com.atlassian.plugin.event.PluginEventManager pluginEventManager, StaticTransformers staticTransformers)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.atlassian.plugin.servlet.DownloadableResource
    Deprecated.
    This method should be deleted when Confluence would be updated and stop using PluginResourceLocator.getDownloadableResource See https://ecosystem.atlassian.net/browse/PLUGWEB-193
    Deprecated.
     
    protected void
    initialize(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Config config, com.atlassian.event.api.EventPublisher eventPublisher)
    Deprecated.
    Initialises WRM's behaviour, creating a new Globals instance using provided Config and binding to the plugin lifecycle, so it can update and invalidate its caches as the system state changes.
    protected void
    initialize(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Globals globals)
    Deprecated.
    Initialises WRM's behaviour, binding Globals to the plugin framework events, so it can update and invalidate its caches as the system state changes.
    boolean
    Deprecated.
    Returns true if this locator can parse the given url.
    void
    onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)
    Deprecated.
     
    void
    onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
    Deprecated.
     
    void
    onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
    Deprecated.
     
    void
    onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PluginResourceLocatorImpl

      public PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, WebResourceUrlProvider webResourceUrlProvider, ResourceBatchingConfiguration batchingConfiguration, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
      Deprecated.
    • PluginResourceLocatorImpl

      public PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, WebResourceUrlProvider webResourceUrlProvider, ResourceBatchingConfiguration batchingConfiguration, com.atlassian.plugin.event.PluginEventManager pluginEventManager, StaticTransformers staticTransformers)
      Deprecated.
    • PluginResourceLocatorImpl

      public PluginResourceLocatorImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Config config, com.atlassian.event.api.EventPublisher eventPublisher)
      Deprecated.
    • PluginResourceLocatorImpl

      public PluginResourceLocatorImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Globals globals)
      Deprecated.
      Added for PLUGWEB-612 as a way for anybody who created their own Globals object, via Spring or otherwise. In future, WRM's consumers should not know about nor have access to Globals or Config, as they are internal implementation details. This constructor will be superceded by a more humane single entrypoint in to constructing the WRM library in PLUGWEB-619.
  • Method Details

    • initialize

      protected void initialize(com.atlassian.plugin.event.PluginEventManager pluginEventManager, Config config, com.atlassian.event.api.EventPublisher eventPublisher)
      Deprecated.
      Initialises WRM's behaviour, creating a new Globals instance using provided Config and binding to the plugin lifecycle, so it can update and invalidate its caches as the system state changes.
      Parameters:
      pluginEventManager - the plugin system in which to listen for events
      config - configuration for the WRM. the WRM will construct a new Globals object from this, which might mean having multiple of them in your system. This would be a very bad thing, so be cautious when calling this method!
    • initialize

      protected void initialize(com.atlassian.plugin.event.PluginEventManager pluginEventManager, @Nonnull Globals globals)
      Deprecated.
      Initialises WRM's behaviour, binding Globals to the plugin framework events, so it can update and invalidate its caches as the system state changes. This method will be superceded by a more humane single entrypoint in to constructing the WRM library in PLUGWEB-619. WRM's consumers should not know about nor have access to Globals or Config, as they are internal implementation details. The registration and listening for plugin framework events does not belong inside this deprecated class. That responsibility will move elsewhere to a more centralised, non-deprecated location.
      Parameters:
      pluginEventManager - the plugin system in which to listen for events
      globals - a pre-constructed WRM state container.
    • onPluginDisabled

      public void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)
      Deprecated.
    • onPluginEnabled

      public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
      Deprecated.
    • onPluginModuleEnabled

      public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
      Deprecated.
    • onPluginModuleDisabled

      public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
      Deprecated.
    • matches

      public boolean matches(String url)
      Deprecated.
      Description copied from interface: PluginResourceLocator
      Returns true if this locator can parse the given url.
      Specified by:
      matches in interface PluginResourceLocator
    • getDownloadableResource

      public com.atlassian.plugin.servlet.DownloadableResource getDownloadableResource(String url, Map<String,String> queryParams)
      Deprecated.
      Description copied from interface: PluginResourceLocator
      This method should be deleted when Confluence would be updated and stop using PluginResourceLocator.getDownloadableResource See https://ecosystem.atlassian.net/browse/PLUGWEB-193

      Returns a DownloadableResource represented by the given url and query params. PluginResourceLocator.matches(String) should be called before invoking this method. If the url is not understood by the locator or the resource cannot be found, null will be returned.

      Specified by:
      getDownloadableResource in interface PluginResourceLocator
    • getGlobals

      public Globals getGlobals()
      Deprecated.