Package net.sf.basedb.util.extensions
Class Registry.RegisteredExtension<A extends Action>
java.lang.Object
net.sf.basedb.util.extensions.Registry.RegisteredExtension<A>
- All Implemented Interfaces:
Extension<A>
- Enclosing class:
- Registry
static class Registry.RegisteredExtension<A extends Action> extends Object implements Extension<A>
Internal representation of an extension.
-
Field Summary
Fields Modifier and Type Field Description private Registry.RegisteredAbout
about
private ActionFactory<? extends A>
actionFactory
private ClassLoader
classLoader
private String
extensionPoint
private String
id
private float
index
private Throwable
lastError
private A
lastErrorAction
private RendererFactory<? super A>
rendererFactory
private Registry.RegisteredExtensionPoint<? super A>
rep
-
Constructor Summary
Constructors Constructor Description RegisteredExtension(Extension<A> extension, Registry.RegisteredExtensionPoint<? super A> rep, ClassLoader classLoader)
Create a new registered extension by copying the information from the parameter. -
Method Summary
Modifier and Type Method Description (package private) void
clearError()
About
getAbout()
Get information about the extensions.ActionFactory<? extends A>
getActionFactory()
Get the factory class for creating actions.(package private) ClassLoader
getClassLoader()
String
getExtends()
Get the ID of the extension point this extension is extending.(package private) Registry.RegisteredExtensionPoint<? super A>
getExtensionPoint()
Get the extension point this extension is registered with.String
getId()
Get the ID of the extension.float
getIndex()
The extensions in an extension point are by default ordered by their index value.(package private) Throwable
getLastError()
RendererFactory<? super A>
getRendererFactory()
Get an optional factory class for creating renderers for the actions.(package private) void
setError(A action, Throwable t)
String
toString()
(package private) void
update(Extension<A> extension, ClassLoader classLoader)
Update the registered information.
-
Field Details
-
rep
-
id
-
extensionPoint
-
about
-
index
private float index -
actionFactory
-
rendererFactory
-
classLoader
-
lastError
-
lastErrorAction
-
-
Constructor Details
-
RegisteredExtension
RegisteredExtension(Extension<A> extension, Registry.RegisteredExtensionPoint<? super A> rep, ClassLoader classLoader)Create a new registered extension by copying the information from the parameter.
-
-
Method Details
-
getId
Description copied from interface:Extension
Get the ID of the extension. -
getExtends
Description copied from interface:Extension
Get the ID of the extension point this extension is extending.- Specified by:
getExtends
in interfaceExtension<A extends Action>
- Returns:
- A non-null identifier value
-
getIndex
public float getIndex()Description copied from interface:Extension
The extensions in an extension point are by default ordered by their index value. Extensions with a low value are ordered before extensions with a high value. The ordering may be overridden by providing an externalExtensionsFilter
implementation. -
getActionFactory
Description copied from interface:Extension
Get the factory class for creating actions. The factory must create objects of the same class or a subclass as theExtensionPoint.getActionClass()
method of the extended extension point returns.- Specified by:
getActionFactory
in interfaceExtension<A extends Action>
- Returns:
- An action factory (required)
-
getRendererFactory
Description copied from interface:Extension
Get an optional factory class for creating renderers for the actions. This factory will only be used if the extension point allows it.- Specified by:
getRendererFactory
in interfaceExtension<A extends Action>
- Returns:
- A renderer factory or null
- See Also:
ExtensionPoint.allowRendererOverride()
-
getAbout
Description copied from interface:Extension
Get information about the extensions. This is optional, but we recommend that at least some documentation and contact information is given. -
toString
-
update
Update the registered information. -
getExtensionPoint
Registry.RegisteredExtensionPoint<? super A> getExtensionPoint()Get the extension point this extension is registered with. -
getClassLoader
ClassLoader getClassLoader()- Since:
- 3.2
-
setError
-
clearError
void clearError() -
getLastError
Throwable getLastError()
-