public abstract class BasePluginLoader extends Object implements PluginLoader
Modifier and Type | Field and Description |
---|---|
protected String |
logPrefix |
protected ClassLoader |
parentClassLoader |
protected Config |
parentConfig |
protected String |
pluginConfigPath |
protected File |
sharedPluginDirectory |
protected String |
simplePluginName |
Constructor and Description |
---|
BasePluginLoader(String simplePluginName,
File sharedPluginDirectory,
ClassLoader parentClassLoader,
Config parentConfig) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureExtraClasspath(PluginClassLoader classLoader,
PluginConfig config) |
protected abstract PluginClassLoader |
createPluginClassLoader()
Template method that subclasses should implement to supply an appropriate
plugin ClassLoader
|
protected String |
getLogPrefix() |
protected abstract URL |
getPluginConfigURL()
Template method that subclasses should implement to supply an appropriate
URL to the plugin's configuration
|
String |
getPluginName() |
protected QName |
getPluginName(PluginConfig pluginConfig) |
protected String |
getSimplePluginName() |
protected void |
installPluginListeners(Plugin plugin) |
protected void |
installResourceLoader(Plugin plugin) |
boolean |
isRemoved()
Returns true if the Plugin loaded by this loader has been removed (for example, it was
deleted from the file system which should result in the plugin being undeployed).
|
Plugin |
load()
Loads and creates the Plugin.
|
protected PluginConfig |
loadPluginConfig(URL url) |
protected Plugin |
loadWithinContextClassLoader(PluginClassLoader classLoader)
Executes loading of the plugin within the current context classloader set to the Plugin's classloader.
|
void |
setPluginConfigPath(String pluginConfigPath) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isModified
protected final String simplePluginName
protected final ClassLoader parentClassLoader
protected final Config parentConfig
protected final File sharedPluginDirectory
protected String pluginConfigPath
public BasePluginLoader(String simplePluginName, File sharedPluginDirectory, ClassLoader parentClassLoader, Config parentConfig)
protected String getLogPrefix()
public String getPluginName()
getPluginName
in interface PluginLoader
public void setPluginConfigPath(String pluginConfigPath)
setPluginConfigPath
in interface PluginLoader
protected String getSimplePluginName()
protected abstract PluginClassLoader createPluginClassLoader() throws IOException
IOException
- if anything goes awryprotected abstract URL getPluginConfigURL() throws PluginException, IOException
IOException
- if anything goes awryPluginException
public Plugin load() throws Exception
load
in interface PluginLoader
Exception
public boolean isRemoved()
PluginLoader
isRemoved
in interface PluginLoader
protected Plugin loadWithinContextClassLoader(PluginClassLoader classLoader) throws PluginException, IOException
PluginException
IOException
protected void installResourceLoader(Plugin plugin)
protected void installPluginListeners(Plugin plugin)
protected void configureExtraClasspath(PluginClassLoader classLoader, PluginConfig config) throws MalformedURLException
MalformedURLException
protected QName getPluginName(PluginConfig pluginConfig)
protected PluginConfig loadPluginConfig(URL url)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.