public final class OsgiBundlePlugin extends AbstractPlugin implements PluginArtifactBackedPlugin
NAME_COMPARATOR, VERSION_1, VERSION_2, VERSION_3| Constructor and Description |
|---|
OsgiBundlePlugin(org.osgi.framework.Bundle bundle,
String key,
PluginArtifact pluginArtifact) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disableInternal()
Perform any internal disabling logic.
|
protected PluginState |
enableInternal()
Perform any internal enabling logic.
|
ClassLoader |
getClassLoader()
Get the classloader for the plugin.
|
Date |
getDateInstalled()
The date this plugin was installed into the system, is the same as the loaded date for non artifact backed plugins
|
Date |
getDateLoaded()
The date this plugin was loaded into the system.
|
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 |
isDeleteable()
Should the plugin file be deleted on unistall?
|
boolean |
isDynamicallyLoaded()
Whether or not this plugin is loaded dynamically at runtime.
|
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, enable, getActivePermissions, getI18nNameKey, getInstallationMode, getKey, getLog, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hasAllPermissions, install, installInternal, isBundledPlugin, 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, getI18nNameKey, getInstallationMode, getKey, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, hasAllPermissions, install, isBundledPlugin, isEnabled, isEnabledByDefault, isSystemPlugin, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginsVersion, setResources, setSystemPlugin, uninstallgetResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocationcompareTopublic OsgiBundlePlugin(org.osgi.framework.Bundle bundle,
String key,
PluginArtifact pluginArtifact)
public Date getDateLoaded()
PlugingetDateLoaded in interface PlugingetDateLoaded in class AbstractPluginpublic Date getDateInstalled()
PlugingetDateInstalled in interface PlugingetDateInstalled in class AbstractPluginpublic boolean isUninstallable()
PluginisUninstallable in interface Plugintrue if this plugin can be 'uninstalled'.public boolean isDeleteable()
PluginisDeleteable in interface Plugintrue if this plugin file should be deleted on unistall.public boolean isDynamicallyLoaded()
PluginisDynamicallyLoaded in interface Plugintrue if this plugin is loaded dynamically at runtime.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 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.protected void uninstallInternal()
AbstractPluginPluginException.uninstallInternal in class AbstractPluginprotected PluginState enableInternal()
AbstractPluginPluginException.enableInternal in class AbstractPluginPluginState.ENABLED or PluginState.ENABLINGprotected void disableInternal()
AbstractPluginPluginException.disableInternal in class AbstractPluginpublic ClassLoader getClassLoader()
PlugingetClassLoader in interface Pluginpublic PluginArtifact getPluginArtifact()
getPluginArtifact in interface PluginArtifactBackedPluginPluginArtifact used to create this plugin instance. Cannot be null.Copyright © 2014 Atlassian. All rights reserved.