com.atlassian.plugin.loaders
Class PermissionCheckingPluginLoader

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by com.atlassian.plugin.loaders.ForwardingPluginLoader
          extended by com.atlassian.plugin.loaders.PermissionCheckingPluginLoader
All Implemented Interfaces:
DiscardablePluginLoader, DynamicPluginLoader, PluginLoader

public final class PermissionCheckingPluginLoader
extends ForwardingPluginLoader


Constructor Summary
PermissionCheckingPluginLoader(PluginLoader delegate)
           
 
Method Summary
 void discardPlugin(Plugin plugin)
          Notify the PluginLoader that the system will not be loading the given plugin.
 Iterable<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
          Loads all plugins that can be installed in the plugin system.
 Iterable<Plugin> loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
          Load all newly found plugins that can be installed in the plugin system.
 void removePlugin(Plugin plugin)
          Remove a specific plugin
 
Methods inherited from class com.atlassian.plugin.loaders.ForwardingPluginLoader
canLoad, delegate, isDynamicPluginLoader, supportsAddition, supportsRemoval
 
Methods inherited from class com.google.common.collect.ForwardingObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionCheckingPluginLoader

public PermissionCheckingPluginLoader(PluginLoader delegate)
Method Detail

loadAllPlugins

public Iterable<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
                                throws PluginParseException
Description copied from interface: PluginLoader
Loads all plugins that can be installed in the plugin system.

Specified by:
loadAllPlugins in interface PluginLoader
Overrides:
loadAllPlugins in class ForwardingPluginLoader
Parameters:
moduleDescriptorFactory - the factory for module descriptors
Returns:
the list of found plugins, may be empty
Throws:
PluginParseException - if any error occurred loading plugins

loadFoundPlugins

public Iterable<Plugin> loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
                                  throws PluginParseException
Description copied from interface: PluginLoader
Load all newly found plugins that can be installed in the plugin system. Only plugins not previously loaded will be added.

Specified by:
loadFoundPlugins in interface PluginLoader
Overrides:
loadFoundPlugins in class ForwardingPluginLoader
Parameters:
moduleDescriptorFactory - the factory for module descriptors
Returns:
a list of newly discovered plugins since the last time plugins were loaded
Throws:
PluginParseException - if any error occurred loading plugins

removePlugin

public void removePlugin(Plugin plugin)
                  throws PluginException
Description copied from interface: PluginLoader
Remove a specific plugin

Specified by:
removePlugin in interface PluginLoader
Overrides:
removePlugin in class ForwardingPluginLoader
Throws:
PluginException

discardPlugin

public void discardPlugin(Plugin plugin)
                   throws PluginException
Description copied from interface: DiscardablePluginLoader
Notify the PluginLoader that the system will not be loading the given plugin. This instructs the PluginLoader to discard any resources associated with the Plugin.

Specified by:
discardPlugin in interface DiscardablePluginLoader
Overrides:
discardPlugin in class ForwardingPluginLoader
Throws:
PluginException


Copyright © 2015 Atlassian. All rights reserved.