2.8.0: 2008-09-08

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

java.lang.Object
  extended by net.sf.basedb.util.extensions.InvokationContext<A>
      extended by net.sf.basedb.util.extensions.ExtensionPointContext<A>

 class ExtensionPointContext<A extends Action>
extends InvokationContext<A>

Invokation context for an extension point.

Version:
2.7
Author:
nicklas
Last modified
$Date: 2008-09-05 17:16:27 +0200 (Fri, 05 Sep 2008) $

Field Summary
private  ClientContext clientContext
           
private  ExtensionPoint<? super A> extensionPoint
           
private  boolean hasCreatedRenderer
           
private  Registry registry
           
private  Renderer<? super A> renderer
           
 
Fields inherited from class net.sf.basedb.util.extensions.InvokationContext
log
 
Constructor Summary
ExtensionPointContext(Registry registry, ClientContext clientContext, ExtensionPoint<? super A> extensionPoint)
           
 
Method Summary
protected  A[] getActions()
          Always null, since this is an extension point context.
 Object getAttribute(String name)
          Always null, since this is an extension point context.
 ClientContext getClientContext()
          Get the client context that was passed to the Registry.useExtensions(ClientContext, ExtensionsFilter, String...)
 Extension<A> getExtension()
          Always null, since this is an extension point context.
 ExtensionPoint<? super A> getExtensionPoint()
          Get information about the extension point.
protected  Registry getRegistry()
          Get the registry where this invokation originated from.
protected  Renderer<? super A> getRenderer()
          If the extension point defines a renderer factory, creates a new renderer unless one already exists.
protected  void prepareRendererFactory()
          Prepare the renderer factory if the extension or extension point has one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientContext

private final ClientContext clientContext

registry

private final Registry registry

extensionPoint

private final ExtensionPoint<? super A extends Action> extensionPoint

renderer

private Renderer<? super A extends Action> renderer

hasCreatedRenderer

private boolean hasCreatedRenderer
Constructor Detail

ExtensionPointContext

ExtensionPointContext(Registry registry,
                      ClientContext clientContext,
                      ExtensionPoint<? super A> extensionPoint)
Method Detail

getClientContext

public ClientContext getClientContext()
Description copied from class: InvokationContext
Get the client context that was passed to the Registry.useExtensions(ClientContext, ExtensionsFilter, String...) method.

Specified by:
getClientContext in class InvokationContext<A extends Action>
Returns:
The client context, or null if the client didn't pass any context object

getExtensionPoint

public ExtensionPoint<? super A> getExtensionPoint()
Description copied from class: InvokationContext
Get information about the extension point.

Specified by:
getExtensionPoint in class InvokationContext<A extends Action>
Returns:
An extension point object

getExtension

public Extension<A> getExtension()
Always null, since this is an extension point context.

Specified by:
getExtension in class InvokationContext<A extends Action>
Returns:
An extension object, or null if there is no current extension

getAttribute

public Object getAttribute(String name)
Always null, since this is an extension point context.

Specified by:
getAttribute in class InvokationContext<A extends Action>
Parameters:
name - The name of the attribute
Returns:
The attribute value, or null if no attribute has been registered
See Also:
Registry.getAttribute(String, String)

getRegistry

protected Registry getRegistry()
Description copied from class: InvokationContext
Get the registry where this invokation originated from.

Specified by:
getRegistry in class InvokationContext<A extends Action>

prepareRendererFactory

protected void prepareRendererFactory()
Description copied from class: InvokationContext
Prepare the renderer factory if the extension or extension point has one.

Specified by:
prepareRendererFactory in class InvokationContext<A extends Action>

getRenderer

protected Renderer<? super A> getRenderer()
If the extension point defines a renderer factory, creates a new renderer unless one already exists.

Specified by:
getRenderer in class InvokationContext<A extends Action>
Returns:
A renderer, or null if no factory has been defined

getActions

protected A[] getActions()
Always null, since this is an extension point context.

Specified by:
getActions in class InvokationContext<A extends Action>

2.8.0: 2008-09-08