2.17.2: 2011-06-17

net.sf.basedb.util.extensions
Interface Extension<A extends Action>

All Known Implementing Classes:
ExtensionBean, Registry.RegisteredExtension

public interface Extension<A extends Action>

Represents a concrete implementation of an extension to an extension point. Each extension must have a unique ID. We recommend that ID:s are generated in the same way as Java package names. An extension defines an ActionFactory which is a factory class that knows how to create actions. The actions should be of the same class (or a subclass) as specified by the ExtensionPoint.getActionClass() method of the extension point that the extension is extending.

If the extension point allows it, the extension may also provide a RendererFactory. See ExtensionPoint.allowRendererOverride().

Extensions can, for example, be created:

Before an extension can be used it must be registered with Registry.registerExtension(Extension). The extension point that the extension extends must of course already be registered in the same registry.

Version:
2.7
Author:
nicklas
Last modified
$Date: 2008-09-11 22:08:14 +0200 (Thu, 11 Sep 2008) $

Method Summary
 About getAbout()
          Get information about the extensions.
 ActionFactory<? extends A> getActionFactory()
          Get the factory class for creating actions.
 String getExtends()
          Get the ID of the extension point this extension is extending.
 String 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> getRendererFactory()
          Get an optional factory class for creating renderers for the actions.
 

Method Detail

getId

String getId()
Get the ID of the extension.

Returns:
A non-null unique identifier value

getExtends

String getExtends()
Get the ID of the extension point this extension is extending.

Returns:
A non-null identifier value

getIndex

float getIndex()
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 external ExtensionsFilter implementation.

Returns:
The index value

getAbout

About getAbout()
Get information about the extensions. This is optional, but we recommend that at least some documentation and contact information is given.

Returns:
Optional information about the extension

getActionFactory

ActionFactory<? extends A> getActionFactory()
Get the factory class for creating actions. The factory must create objects of the same class or a subclass as the ExtensionPoint.getActionClass() method of the extended extension point returns.

Returns:
An action factory (required)

getRendererFactory

RendererFactory<? super A> getRendererFactory()
Get an optional factory class for creating renderers for the actions. This factory will only be used if the extension point allows it.

Returns:
A renderer factory or null
See Also:
ExtensionPoint.allowRendererOverride()

2.17.2: 2011-06-17