public class DefaultDynamicPlugin extends AbstractPlugin implements PluginArtifactBackedPlugin
NAME_COMPARATOR, VERSION_1, VERSION_2, VERSION_3| 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.
|
DeploymentUnit |
getDeploymentUnit()
Deprecated.
Since 2.2.0, use
getPluginArtifact() instead |
PluginArtifact |
getPluginArtifact() |
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 |
isBundledPlugin()
Whether the plugin is a "bundled" plugin that can't be removed.
|
boolean |
isDeleteable()
Should the plugin file be deleted on unistall?
|
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.
|
addModuleDescriptor, close, compareAndSetPluginState, compareTo, containsSystemModule, disable, disableInternal, enable, enableInternal, getActivePermissions, getDateInstalled, getDateLoaded, getI18nNameKey, getInstallationMode, getKey, getLog, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hasAllPermissions, install, installInternal, isEnabled, isEnabledByDefault, isSystemPlugin, removeModuleDescriptor, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginState, setPluginsVersion, setResources, setSystemPlugin, toString, uninstallclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddModuleDescriptor, close, containsSystemModule, disable, enable, getActivePermissions, getDateInstalled, getDateLoaded, getI18nNameKey, getInstallationMode, getKey, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, hasAllPermissions, install, isEnabled, isEnabledByDefault, isSystemPlugin, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginsVersion, setResources, setSystemPlugin, uninstallgetResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocationcompareTopublic DefaultDynamicPlugin(DeploymentUnit deploymentUnit, PluginClassLoader loader)
public DefaultDynamicPlugin(PluginArtifact pluginArtifact, PluginClassLoader loader)
public <T> Class<T> loadClass(String clazz, Class<?> callingClass) throws ClassNotFoundException
PluginloadClass in interface 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()
PluginisUninstallable in interface Plugintrue if this plugin can be 'uninstalled'.public URL getResource(String name)
PlugingetResource in interface Pluginname - the name of the resource to be loadedpublic InputStream getResourceAsStream(String name)
PlugingetResourceAsStream in interface Pluginname - The name of the resource to be loaded.public ClassLoader getClassLoader()
PlugingetClassLoader in interface Pluginpublic boolean isDynamicallyLoaded()
isDynamicallyLoaded in interface Pluginpublic DeploymentUnit getDeploymentUnit()
getPluginArtifact() insteadpublic PluginArtifact getPluginArtifact()
getPluginArtifact in interface PluginArtifactBackedPluginPluginArtifact used to create this plugin instance. Cannot be null.public boolean isDeleteable()
PluginisDeleteable in interface Plugintrue if this plugin file should be deleted on unistall.public boolean isBundledPlugin()
PluginisBundledPlugin in interface PluginisBundledPlugin in class AbstractPlugintrue if this plugin is a "bundled" plugin.protected void uninstallInternal()
AbstractPluginPluginException.uninstallInternal in class AbstractPluginCopyright © 2014 Atlassian. All rights reserved.