|
2.10.1: 2009-03-24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.extensions.InvokationContext<A>
net.sf.basedb.util.extensions.ExtensionContext<A>
class ExtensionContext<A extends Action>
Invokation context for an extension. Most calls are forwarded to the invokation context for the extension point this extension belongs to.
Field Summary | |
---|---|
private Registry.RegisteredExtension<A> |
extension
|
private boolean |
hasCreatedRenderer
|
private ExtensionPointContext<? super A> |
mainContext
|
private Renderer<? super A> |
renderer
|
Fields inherited from class net.sf.basedb.util.extensions.InvokationContext |
---|
log |
Constructor Summary | |
---|---|
ExtensionContext(ExtensionPointContext<? super A> mainContext,
Registry.RegisteredExtension<A> extension)
|
Method Summary | |
---|---|
protected void |
clearError()
Clear the registered error for the current extension or extension point. |
protected A[] |
getActions()
Call Extension.getActionFactory() and then
ActionFactory.getActions(InvokationContext) on the
returned factory. |
Object |
getAttribute(String name)
Get the value of an attribute that has been registered for the extension. |
ClientContext |
getClientContext()
Get the client context that was passed to the Registry.useExtensions(ClientContext, ExtensionsFilter, String...) |
Extension<A> |
getExtension()
Get information about the extension. |
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 allows it and this extension specifies a renderer factory, create a new renderer from it. |
(package private) boolean |
prepareActionFactory()
|
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 ExtensionPointContext<? super A extends Action> mainContext
private final Registry.RegisteredExtension<A extends Action> extension
private Renderer<? super A extends Action> renderer
private boolean hasCreatedRenderer
Constructor Detail |
---|
ExtensionContext(ExtensionPointContext<? super A> mainContext, Registry.RegisteredExtension<A> extension)
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()
InvokationContext
RendererFactory
methods
are called for a renderer factory attached to an extension
point.
getExtension
in class InvokationContext<A extends Action>
public Object getAttribute(String name)
InvokationContext
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()
Extension.getActionFactory()
and then
ActionFactory.getActions(InvokationContext)
on the
returned factory.
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>
boolean prepareActionFactory()
|
2.10.1: 2009-03-24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |