com.atlassian.plugin.osgi.factory
Class OsgiBundlePlugin
java.lang.Object
com.atlassian.plugin.impl.AbstractPlugin
com.atlassian.plugin.osgi.factory.OsgiBundlePlugin
- All Implemented Interfaces:
- Plugin, Plugin.EnabledMetricsSource, PluginArtifactBackedPlugin, Resourced, Comparable<Plugin>
public final class OsgiBundlePlugin
- extends AbstractPlugin
- implements PluginArtifactBackedPlugin
Plugin that wraps an OSGi bundle that has no plugin descriptor.
| Methods inherited from class com.atlassian.plugin.impl.AbstractPlugin |
addModuleDescriptor, close, compareAndSetPluginState, compareTo, containsSystemModule, disable, enable, getActivePermissions, getDateEnabled, getDateEnabling, getI18nNameKey, getInstallationMode, getKey, getLog, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hasAllPermissions, install, isBundledPlugin, isEnabled, isEnabledByDefault, isSystemPlugin, removeModuleDescriptor, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginState, setPluginsVersion, setResources, setSystemPlugin, toString, uninstall |
| Methods inherited from interface com.atlassian.plugin.Plugin |
addModuleDescriptor, 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, uninstall |
OsgiBundlePlugin
@Deprecated
public OsgiBundlePlugin(org.osgi.framework.Bundle bundle,
String pluginKey,
PluginArtifact pluginArtifact)
- Deprecated. since 3.0.23, use
OsgiBundlePlugin(OsgiContainerManager, String, PluginArtifact)
- Create a plugin wrapper for an already installed Bundle.
- Parameters:
bundle - The installed Bundle.pluginKey - The plugin key.pluginArtifact - The plugin artifact that was installed.
OsgiBundlePlugin
public OsgiBundlePlugin(OsgiContainerManager osgiContainerManager,
String pluginKey,
PluginArtifact pluginArtifact)
- Create a plugin wrapper which installs the bundle when the plugin is installed.
- Parameters:
osgiContainerManager - the container to install into when the plugin is installed.pluginKey - The plugin key.pluginArtifact - The The plugin artifact to install.
getDateLoaded
public Date getDateLoaded()
- Specified by:
getDateLoaded in interface Plugin- Overrides:
getDateLoaded in class AbstractPlugin
getDateInstalled
public Date getDateInstalled()
- Specified by:
getDateInstalled in interface Plugin- Overrides:
getDateInstalled in class AbstractPlugin
isUninstallable
public boolean isUninstallable()
- Specified by:
isUninstallable in interface Plugin
isDeleteable
public boolean isDeleteable()
- Specified by:
isDeleteable in interface Plugin
isDynamicallyLoaded
public boolean isDynamicallyLoaded()
- Specified by:
isDynamicallyLoaded in interface Plugin
loadClass
public <T> Class<T> loadClass(String clazz,
Class<?> callingClass)
throws ClassNotFoundException
- Specified by:
loadClass in interface Plugin
- Throws:
ClassNotFoundException
getResource
public URL getResource(String name)
- Specified by:
getResource in interface Plugin
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Specified by:
getResourceAsStream in interface Plugin
installInternal
protected void installInternal()
throws OsgiContainerException,
IllegalPluginStateException
- Overrides:
installInternal in class AbstractPlugin
- Throws:
OsgiContainerException
IllegalPluginStateException
uninstallInternal
protected void uninstallInternal()
- Overrides:
uninstallInternal in class AbstractPlugin
enableInternal
protected PluginState enableInternal()
- Overrides:
enableInternal in class AbstractPlugin
disableInternal
protected void disableInternal()
- Overrides:
disableInternal in class AbstractPlugin
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader in interface Plugin
getPluginArtifact
public PluginArtifact getPluginArtifact()
- Specified by:
getPluginArtifact in interface PluginArtifactBackedPlugin
Copyright © 2015 Atlassian. All rights reserved.