Package net.sf.basedb.util.extensions
Class ExtensionBean<A extends Action>
java.lang.Object
net.sf.basedb.util.extensions.ExtensionBean<A>
- All Implemented Interfaces:
Extension<A>
A bean-like implementation of the
Extension
interface.
This implementation adds setter methods for simple initialisation
of the bean properties.- Version:
- 2.7
- Author:
- nicklas
- Last modified
- $Date:2008-03-20 12:15:25 +0100 (Thu, 20 Mar 2008) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate About
private ActionFactory<? extends A>
private String
private String
private float
private RendererFactory<? super A>
-
Constructor Summary
ConstructorDescriptionCreate a new empty extension bean.ExtensionBean
(String id, String extensionPoint, float position, About about, ActionFactory<? extends A> actionFactory, RendererFactory<? super A> rendererFactory) Create a new fully initialised extension bean. -
Method Summary
Modifier and TypeMethodDescriptiongetAbout()
Get information about the extensions.ActionFactory<? extends A>
Get the factory class for creating actions.Get the ID of the extension point this extension is extending.getId()
Get the ID of the extension.float
getIndex()
The extensions in an extension point are by default ordered by their index value.RendererFactory<? super A>
Get an optional factory class for creating renderers for the actions.void
void
setActionFactory
(ActionFactory<? extends A> actionFactory) void
setExtends
(String extensionPoint) void
void
setIndex
(float index) void
setRendererFactory
(RendererFactory<? super A> rendererFactory) toString()
-
Field Details
-
id
-
extensionPoint
-
actionFactory
-
rendererFactory
-
about
-
index
private float index
-
-
Constructor Details
-
ExtensionBean
public ExtensionBean()Create a new empty extension bean. Use the setter methods to set the properties before registering the extension withRegistry.registerExtension(Extension, ClassLoader)
. -
ExtensionBean
public ExtensionBean(String id, String extensionPoint, float position, About about, ActionFactory<? extends A> actionFactory, RendererFactory<? super A> rendererFactory) Create a new fully initialised extension bean. See theExtension
interface for a description of the parameters.
-
-
Method Details
-
toString
-
getId
Description copied from interface:Extension
Get the ID of the extension. -
setId
-
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
-
setExtends
-
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. -
setIndex
public void setIndex(float index) -
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)
-
setActionFactory
-
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:
-
setRendererFactory
-
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. -
setAbout
-