|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.plugin.NonManagedPluginRegistry
public class NonManagedPluginRegistry
Manages the registry of Extensions and Extension Points outside any OSGI container. This implementation cannot handle multiple versions of the same plugin, so it either raises an exception or logs the issue as a warning. This is different to that mandated by the OSGi specification 3.0 § 3.5.2
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
|
| Constructor Summary | |
|---|---|
NonManagedPluginRegistry(ClassLoaderResolver clr,
java.lang.String bundleCheckType)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
createExecutableExtension(ConfigurationElement confElm,
java.lang.String name,
java.lang.Class[] argsClass,
java.lang.Object[] args)
Loads a class (do not initialize) from an attribute of ConfigurationElement |
Bundle[] |
getBundles()
Accessor for all registered bundles |
ExtensionPoint |
getExtensionPoint(java.lang.String id)
Acessor for the ExtensionPoint |
ExtensionPoint[] |
getExtensionPoints()
Acessor for the currently registed ExtensionPoints |
java.lang.Class |
loadClass(java.lang.String pluginId,
java.lang.String className)
Loads a class (do not initialize) |
protected Bundle |
registerBundle(java.util.jar.Manifest mf,
java.net.URL manifest)
Register the plugin bundle |
protected Bundle |
registerBundle(java.net.URL manifest)
Register the plugin bundle |
void |
registerExtensionPoints()
Look for Bundles/Plugins and register them. |
void |
registerExtensions()
Look for Bundles/Plugins and register them. |
void |
registerPluginExtensions(java.net.URL plugin,
Bundle bundle)
Register extension and extension points |
void |
resolveConstraints()
Resolve constraints declared in bundle manifest.mf files. |
java.net.URL |
resolveURLAsFileURL(java.net.URL url)
Converts a URL that uses a user-defined protocol into a URL that uses the file protocol. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
| Constructor Detail |
|---|
public NonManagedPluginRegistry(ClassLoaderResolver clr,
java.lang.String bundleCheckType)
clr - the ClassLoaderResolverbundleCheckType - Type of check on bundles (EXCEPTION, LOG, NONE)| Method Detail |
|---|
public ExtensionPoint getExtensionPoint(java.lang.String id)
getExtensionPoint in interface PluginRegistryid - the unique id of the extension point
public ExtensionPoint[] getExtensionPoints()
getExtensionPoints in interface PluginRegistrypublic void registerExtensionPoints()
registerExtensionPoints in interface PluginRegistry
public void registerPluginExtensions(java.net.URL plugin,
Bundle bundle)
plugin - the URL to the pluginbundle - the bundlepublic void registerExtensions()
registerExtensions in interface PluginRegistryprotected Bundle registerBundle(java.net.URL manifest)
manifest - the url to the meta-inf/manifest.mf file or a jar file
protected Bundle registerBundle(java.util.jar.Manifest mf,
java.net.URL manifest)
mf - the Manifestmanifest - the url to the meta-inf/manifest.mf file or a jar file
public java.lang.Object createExecutableExtension(ConfigurationElement confElm,
java.lang.String name,
java.lang.Class[] argsClass,
java.lang.Object[] args)
throws java.lang.ClassNotFoundException,
java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
ConfigurationElement
createExecutableExtension in interface PluginRegistryconfElm - the configuration elementname - the attribute name
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public java.lang.Class loadClass(java.lang.String pluginId,
java.lang.String className)
throws java.lang.ClassNotFoundException
loadClass in interface PluginRegistrypluginId - the plugin idclassName - the class name
java.lang.ClassNotFoundException
public java.net.URL resolveURLAsFileURL(java.net.URL url)
throws java.io.IOException
resolveURLAsFileURL in interface PluginRegistryurl - the url to be converted
java.io.IOExceptionpublic void resolveConstraints()
resolveConstraints in interface PluginRegistrypublic Bundle[] getBundles()
getBundles in interface PluginRegistryjava.lang.UnsupportedOperationException - if this operation is not supported by the implementation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||