public class DefaultDynamicPlugin extends AbstractPlugin
pluginArtifact| Constructor and Description |
|---|
DefaultDynamicPlugin(DeploymentUnit deploymentUnit,
PluginClassLoader loader) |
DefaultDynamicPlugin(PluginArtifact pluginArtifact,
PluginClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getClassLoader()
Get the classloader for the plugin.
|
URL |
getResource(String name)
Retrieve the URL of the resource from the plugin.
|
InputStream |
getResourceAsStream(String name)
Load a given resource from the plugin.
|
boolean |
isDeleteable()
Should the plugin file be deleted on uninstall?
|
boolean |
isDynamicallyLoaded()
This plugin is dynamically loaded, so returns true.
|
boolean |
isUninstallable()
Whether or not this plugin can be 'uninstalled'.
|
<T> Class<T> |
loadClass(String clazz,
Class<?> callingClass)
Get the plugin to load a specific class.
|
protected void |
uninstallInternal()
Perform any internal uninstallation logic.
|
addDynamicModuleDescriptor, addModuleDescriptor, cleanVersionString, close, compareAndSetPluginState, compareTo, containsSystemModule, disable, disableInternal, enable, enableInternal, getActivePermissions, getDateEnabled, getDateEnabling, getDateInstalled, getDateLoaded, getDependencies, getDynamicModuleDescriptors, getI18nNameKey, getInstallationMode, getKey, getLog, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginArtifact, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hasAllPermissions, install, installInternal, isBundledPlugin, isEnabledByDefault, isSystemPlugin, removeDynamicModuleDescriptor, removeModuleDescriptor, resolve, setBundledPlugin, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginState, setPluginsVersion, setResources, setSystemPlugin, toString, uninstallpublic DefaultDynamicPlugin(DeploymentUnit deploymentUnit, PluginClassLoader loader)
public DefaultDynamicPlugin(PluginArtifact pluginArtifact, PluginClassLoader loader)
public <T> Class<T> loadClass(String clazz, Class<?> callingClass) throws ClassNotFoundException
Pluginclazz - The name of the class to be loadedcallingClass - The class calling the loading (used to help find a classloader)ClassNotFoundException - if the class cannot be located.public boolean isUninstallable()
Plugintrue if this plugin can be 'uninstalled'.public URL getResource(String name)
Pluginname - the name of the resource to be loadedpublic InputStream getResourceAsStream(String name)
Pluginname - The name of the resource to be loaded.public ClassLoader getClassLoader()
Pluginpublic boolean isDynamicallyLoaded()
public boolean isDeleteable()
Plugintrue if this plugin file should be deleted on uninstall.protected void uninstallInternal()
AbstractPluginPluginException.uninstallInternal in class AbstractPluginCopyright © 2019 Atlassian. All rights reserved.