public class OSGiPluginRegistry extends Object implements PluginRegistry
| Modifier and Type | Class and Description |
|---|---|
protected static class |
OSGiPluginRegistry.ExtensionSorter
Sorter for extensions that puts DataNucleus extensions first, then any vendor extension.
|
| Constructor and Description |
|---|
OSGiPluginRegistry(ClassLoaderResolver clr)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Object |
createExecutableExtension(ConfigurationElement confElm,
String name,
Class[] argsClass,
Object[] args)
Loads a class (do not initialize) from an attribute of
ConfigurationElement |
Bundle[] |
getBundles()
Accessor for all registered bundles
|
ExtensionPoint |
getExtensionPoint(String id)
Accessor for the ExtensionPoint with the specified id.
|
ExtensionPoint[] |
getExtensionPoints()
Acessor for the currently registed ExtensionPoints
|
Class |
loadClass(String pluginId,
String className)
Loads a class (do not initialize)
|
void |
registerExtensionPoints()
Look for Bundles/Plugins and register them.
|
protected void |
registerExtensionPointsForPluginInternal(List extPoints,
boolean updateExtensionPointsArray)
Register extension-points for the specified plugin.
|
void |
registerExtensions()
Look for Bundles/Plugins and register them.
|
void |
resolveConstraints()
Resolve constraints declared in bundle manifest.mf files.
|
URL |
resolveURLAsFileURL(URL url)
Converts a URL that uses a user-defined protocol into a URL that uses the file protocol.
|
protected static final Localiser LOCALISER
public OSGiPluginRegistry(ClassLoaderResolver clr)
clr - the ClassLoaderResolverpublic ExtensionPoint getExtensionPoint(String id)
getExtensionPoint in interface PluginRegistryid - the unique id of the extension pointpublic ExtensionPoint[] getExtensionPoints()
PluginRegistrygetExtensionPoints in interface PluginRegistrypublic void registerExtensionPoints()
registerExtensionPoints in interface PluginRegistrypublic void registerExtensions()
PluginRegistryregisterExtensions in interface PluginRegistryprotected void registerExtensionPointsForPluginInternal(List extPoints, boolean updateExtensionPointsArray)
extPoints - ExtensionPoints for this pluginupdateExtensionPointsArray - Whether to update "extensionPoints" arraypublic Object createExecutableExtension(ConfigurationElement confElm, String name, Class[] argsClass, Object[] args) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
ConfigurationElementcreateExecutableExtension in interface PluginRegistryconfElm - the configuration elementname - the attribute nameNoSuchMethodExceptionSecurityExceptionInvocationTargetExceptionIllegalAccessExceptionInstantiationExceptionIllegalArgumentExceptionClassNotFoundExceptionpublic Class loadClass(String pluginId, String className) throws ClassNotFoundException
loadClass in interface PluginRegistrypluginId - the plugin idclassName - the class nameClassNotFoundExceptionpublic URL resolveURLAsFileURL(URL url) throws IOException
PluginRegistryresolveURLAsFileURL in interface PluginRegistryurl - the url to be convertedIOExceptionpublic void resolveConstraints()
resolveConstraints in interface PluginRegistrypublic Bundle[] getBundles()
getBundles in interface PluginRegistryUnsupportedOperationException - if this operation is not supported by the implementationCopyright © 2013. All Rights Reserved.