Package net.sf.basedb.util.extensions
Class Registry.RegisteredExtension<A extends Action>
- java.lang.Object
-
- net.sf.basedb.util.extensions.Registry.RegisteredExtension<A>
-
-
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
All Methods Instance Methods Concrete Methods 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 Detail
-
rep
private final Registry.RegisteredExtensionPoint<? super A extends Action> rep
-
id
private final String id
-
extensionPoint
private final String extensionPoint
-
about
private Registry.RegisteredAbout about
-
index
private float index
-
actionFactory
private ActionFactory<? extends A extends Action> actionFactory
-
rendererFactory
private RendererFactory<? super A extends Action> rendererFactory
-
classLoader
private ClassLoader classLoader
-
lastError
private Throwable lastError
-
-
Constructor Detail
-
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 Detail
-
getId
public String getId()
Description copied from interface:Extension
Get the ID of the extension.
-
getExtends
public String 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
public ActionFactory<? extends A> 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
public RendererFactory<? super A> 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
public About 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.
-
update
void update(Extension<A> extension, ClassLoader classLoader)
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
-
clearError
void clearError()
-
getLastError
Throwable getLastError()
-
-