2.17.2: 2011-06-17

net.sf.basedb.util.extensions
Class Registry.RegisteredExtension<A extends Action>

java.lang.Object
  extended by 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
private  Registry.RegisteredAbout about
           
private  ActionFactory<? extends A> actionFactory
           
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
Registry.RegisteredExtension(Extension<A> extension, Registry.RegisteredExtensionPoint<? super A> rep)
          Create a new registered extension by copying the information from the parameter.
 
Method Summary
(package private)  void clearError()
           
 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.
(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)
          Update the registered information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

lastError

private Throwable lastError

lastErrorAction

private A extends Action lastErrorAction
Constructor Detail

Registry.RegisteredExtension

Registry.RegisteredExtension(Extension<A> extension,
                             Registry.RegisteredExtensionPoint<? super A> rep)
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.

Specified by:
getId in interface Extension<A extends Action>
Returns:
A non-null unique identifier value

getExtends

public String getExtends()
Description copied from interface: Extension
Get the ID of the extension point this extension is extending.

Specified by:
getExtends in interface Extension<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 external ExtensionsFilter implementation.

Specified by:
getIndex in interface Extension<A extends Action>
Returns:
The index value

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 the ExtensionPoint.getActionClass() method of the extended extension point returns.

Specified by:
getActionFactory in interface Extension<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 interface Extension<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.

Specified by:
getAbout in interface Extension<A extends Action>
Returns:
Optional information about the extension

toString

public String toString()
Overrides:
toString in class Object

update

void update(Extension<A> extension)
Update the registered information.


getExtensionPoint

Registry.RegisteredExtensionPoint<? super A> getExtensionPoint()
Get the extension point this extension is registered with.


setError

void setError(A action,
              Throwable t)

clearError

void clearError()

getLastError

Throwable getLastError()

2.17.2: 2011-06-17