public class NonManagedPluginRegistry extends Object implements PluginRegistry
| Modifier and Type | Class and Description |
|---|---|
protected static class |
NonManagedPluginRegistry.ExtensionSorter
Sorter for extensions that puts DataNucleus extensions first, then any vendor extension.
|
| Constructor and Description |
|---|
NonManagedPluginRegistry(ClassLoaderResolver clr,
String bundleCheckType,
boolean allowUserBundles)
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()
Accessor for the currently registered ExtensionPoints.
|
Class |
loadClass(String pluginId,
String className)
Loads a class (do not initialize)
|
protected Bundle |
registerBundle(Manifest mf,
URL manifest)
Register the plugin bundle.
|
protected Bundle |
registerBundle(URL manifest)
Register the plugin bundle.
|
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 |
registerExtensionsForPlugin(URL pluginURL,
Bundle bundle)
Register extension and extension points for the specified plugin.
|
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.
|
public NonManagedPluginRegistry(ClassLoaderResolver clr, String bundleCheckType, boolean allowUserBundles)
clr - the ClassLoaderResolverbundleCheckType - Type of check on bundles (EXCEPTION, LOG, NONE)allowUserBundles - Whether to only load DataNucleus bundles (org.datanucleus).public ExtensionPoint getExtensionPoint(String id)
getExtensionPoint in interface PluginRegistryid - the unique id of the extension pointpublic ExtensionPoint[] getExtensionPoints()
getExtensionPoints in interface PluginRegistrypublic void registerExtensionPoints()
registerExtensionPoints in interface PluginRegistrypublic void registerExtensionsForPlugin(URL pluginURL, Bundle bundle)
pluginURL - the URL to the pluginbundle - the bundlepublic void registerExtensions()
registerExtensions in interface PluginRegistryprotected void registerExtensionPointsForPluginInternal(List extPoints, boolean updateExtensionPointsArray)
extPoints - ExtensionPoints for this pluginupdateExtensionPointsArray - Whether to update "extensionPoints" arrayprotected Bundle registerBundle(URL manifest)
manifest - the url to the "meta-inf/manifest.mf" file or a jar fileprotected Bundle registerBundle(Manifest mf, URL manifest)
mf - the Manifestmanifest - the url to the "meta-inf/manifest.mf" file or a jar filepublic 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 nameargsClass - Classes of the argsargs - The argumentsClassNotFoundException - If an error occursSecurityException - If an error occursNoSuchMethodException - If an error occursIllegalArgumentException - If an error occursInstantiationException - If an error occursIllegalAccessException - If an error occursInvocationTargetException - If an error occurspublic Class loadClass(String pluginId, String className) throws ClassNotFoundException
loadClass in interface PluginRegistrypluginId - the plugin idclassName - the class nameClassNotFoundException - if an error occurs in loadingpublic URL resolveURLAsFileURL(URL url) throws IOException
resolveURLAsFileURL in interface PluginRegistryurl - the url to be convertedIOException - if an error occurspublic void resolveConstraints()
resolveConstraints in interface PluginRegistrypublic Bundle[] getBundles()
getBundles in interface PluginRegistryUnsupportedOperationException - if this operation is not supported by the implementationCopyright © 2019. All rights reserved.