com.atlassian.plugin.osgi.factory
Class OsgiBundlePlugin

java.lang.Object
  extended by com.atlassian.plugin.impl.AbstractPlugin
      extended by com.atlassian.plugin.osgi.factory.OsgiBundlePlugin
All Implemented Interfaces:
Plugin, PluginArtifactBackedPlugin, Resourced, Comparable<Plugin>

public class OsgiBundlePlugin
extends AbstractPlugin
implements PluginArtifactBackedPlugin

Plugin that wraps an OSGi bundle that has no plugin descriptor.


Field Summary
 
Fields inherited from interface com.atlassian.plugin.Plugin
NAME_COMPARATOR
 
Constructor Summary
OsgiBundlePlugin(org.osgi.framework.Bundle bundle, String key, PluginArtifact pluginArtifact, PluginEventManager pluginEventManager)
           
 
Method Summary
protected  void disableInternal()
           
protected  PluginState enableInternal()
           
 ClassLoader getClassLoader()
           
 Date getDateLoaded()
           
 PluginArtifact getPluginArtifact()
           
 URL getResource(String name)
           
 InputStream getResourceAsStream(String name)
           
 boolean isDeleteable()
           
 boolean isDynamicallyLoaded()
           
 boolean isUninstallable()
           
<T> Class<T>
loadClass(String clazz, Class<?> callingClass)
           
protected  void uninstallInternal()
           
 
Methods inherited from class com.atlassian.plugin.impl.AbstractPlugin
addModuleDescriptor, close, compareAndSetPluginState, compareTo, containsSystemModule, disable, enable, getI18nNameKey, getKey, getLog, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, install, installInternal, isBundledPlugin, isEnabled, isEnabledByDefault, isSystemPlugin, removeModuleDescriptor, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginState, setPluginsVersion, setResources, setSystemPlugin, toString, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.plugin.Plugin
addModuleDescriptor, close, containsSystemModule, disable, enable, getI18nNameKey, getKey, getModuleDescriptor, getModuleDescriptors, getModuleDescriptorsByModuleClass, getName, getPluginInformation, getPluginState, getPluginsVersion, getRequiredPlugins, install, isBundledPlugin, isEnabled, isEnabledByDefault, isSystemPlugin, setEnabled, setEnabledByDefault, setI18nNameKey, setKey, setName, setPluginInformation, setPluginsVersion, setResources, setSystemPlugin, uninstall
 
Methods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

OsgiBundlePlugin

public OsgiBundlePlugin(org.osgi.framework.Bundle bundle,
                        String key,
                        PluginArtifact pluginArtifact,
                        PluginEventManager pluginEventManager)
Method Detail

getDateLoaded

public Date getDateLoaded()
Specified by:
getDateLoaded in interface Plugin
Overrides:
getDateLoaded 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

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 © 2012 Atlassian. All Rights Reserved.