|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.extensions.InvokationContext<A> net.sf.basedb.util.extensions.ExtensionPointContext<A>
class ExtensionPointContext<A extends Action>
Invokation context for an extension point.
Field Summary | |
---|---|
private ClientContext |
clientContext
|
private ErrorHandler<? super A> |
errorHandler
|
private ErrorHandlerFactory<? super A> |
errorHandlerFactory
|
private Registry.RegisteredExtensionPoint<A> |
extensionPoint
|
private boolean |
hasCreatedRenderer
|
private Registry |
registry
|
private Renderer<? super A> |
renderer
|
Constructor Summary | |
---|---|
ExtensionPointContext(Registry registry,
ClientContext clientContext,
Registry.RegisteredExtensionPoint<A> extensionPoint,
ErrorHandlerFactory<? super A> errorHandlerFactory)
|
Method Summary | |
---|---|
protected void |
clearError()
Clear the registered error for the current extension or extension point. |
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...) |
protected ErrorHandler<? super A> |
getErrorHandler()
Get the error handler used in this context. |
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. |
private void |
handleError(String message,
Throwable t)
|
protected void |
prepareRendererFactory()
Prepare the renderer factory if the extension or extension point has one. |
protected void |
setError(A action,
Throwable t)
Register an error for the current extension or extension point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ClientContext clientContext
private final Registry registry
private final Registry.RegisteredExtensionPoint<A extends Action> extensionPoint
private final ErrorHandlerFactory<? super A extends Action> errorHandlerFactory
private Renderer<? super A extends Action> renderer
private boolean hasCreatedRenderer
private ErrorHandler<? super A extends Action> errorHandler
Constructor Detail |
---|
ExtensionPointContext(Registry registry, ClientContext clientContext, Registry.RegisteredExtensionPoint<A> extensionPoint, ErrorHandlerFactory<? super A> errorHandlerFactory)
Method Detail |
---|
public ClientContext getClientContext()
InvokationContext
Registry.useExtensions(ClientContext, ExtensionsFilter, String...)
method.
getClientContext
in class InvokationContext<A extends Action>
public ExtensionPoint<? super A> getExtensionPoint()
InvokationContext
getExtensionPoint
in class InvokationContext<A extends Action>
public Extension<A> getExtension()
getExtension
in class InvokationContext<A extends Action>
public Object getAttribute(String name)
getAttribute
in class InvokationContext<A extends Action>
name
- The name of the attribute
Registry.getAttribute(String, String)
protected Registry getRegistry()
InvokationContext
getRegistry
in class InvokationContext<A extends Action>
protected void prepareRendererFactory()
InvokationContext
prepareRendererFactory
in class InvokationContext<A extends Action>
protected Renderer<? super A> getRenderer()
getRenderer
in class InvokationContext<A extends Action>
protected A[] getActions()
getActions
in class InvokationContext<A extends Action>
protected void setError(A action, Throwable t)
InvokationContext
Registry.getLastExtensionError(String)
and Registry.getLastExtensionPointError(String)
setError
in class InvokationContext<A extends Action>
action
- The action that caused the errort
- The errorprotected void clearError()
InvokationContext
clearError
in class InvokationContext<A extends Action>
protected ErrorHandler<? super A> getErrorHandler()
InvokationContext
getErrorHandler
in class InvokationContext<A extends Action>
private void handleError(String message, Throwable t)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |