|
2.8.3: 2008-10-15 | ||||||||
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>
public abstract class InvokationContext<A extends Action>
Keeps contextual information about a single invokation of
extensions. The Registry.useExtensions(ClientContext, ExtensionsFilter, String...)
will create invokation contexts for each enabled extension that
extends any of the given extension points.
Instances of this class are passed to factory methods,
for example ActionFactory.getActions(InvokationContext)
to make it possible for the factories to know anything about
the context the extension was invoked in.
Do not confuse the invokation context with the a
ClientContext
object. The invokation context contains
the client context (see getClientContext()
but has also
a lot more information collected from other parts of the
extensions system.
Field Summary | |
---|---|
protected static Logger |
log
|
Constructor Summary | |
---|---|
protected |
InvokationContext()
|
Method Summary | |
---|---|
protected abstract A[] |
getActions()
Get the actions, or null if there is no current extension. |
abstract Object |
getAttribute(String name)
Get the value of an attribute that has been registered for the extension. |
abstract ClientContext |
getClientContext()
Get the client context that was passed to the Registry.useExtensions(ClientContext, ExtensionsFilter, String...) |
abstract Extension<A> |
getExtension()
Get information about the extension. |
abstract ExtensionPoint<? super A> |
getExtensionPoint()
Get information about the extension point. |
protected abstract Registry |
getRegistry()
Get the registry where this invokation originated from. |
protected abstract Renderer<? super A> |
getRenderer()
Get the renderer, if any. |
protected abstract 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 |
---|
protected static final Logger log
Constructor Detail |
---|
protected InvokationContext()
Method Detail |
---|
public abstract ClientContext getClientContext()
Registry.useExtensions(ClientContext, ExtensionsFilter, String...)
method.
public abstract ExtensionPoint<? super A> getExtensionPoint()
public abstract Extension<A> getExtension()
RendererFactory
methods
are called for a renderer factory attached to an extension
point.
public abstract Object getAttribute(String name)
name
- The name of the attribute
Registry.getAttribute(String, String)
protected abstract Registry getRegistry()
protected abstract void prepareRendererFactory()
protected abstract Renderer<? super A> getRenderer()
protected abstract A[] getActions()
|
2.8.3: 2008-10-15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |