public interface ActionFactory<A extends Action>
Action
:s. Action factories are part of an extension
(see Extension.getActionFactory()
).
Action factory implementations must be thread-safe, since a single instance of the factory may have to serve multiple requests at the same time.
Note 1! A single factory instance may be used by more than one extension. This is at the control of the client application.
Note 2! The BASE web-client uses the XmlLoader
to
define extensions. The XmlLoader
always create a
separate factory instance for each extension. The XmlLoader
also requires that the factories has a public no-argument constructor.
Modifier and Type | Method and Description |
---|---|
A[] |
getActions(InvokationContext<? super A> context)
This method may be called one or several times for each request.
|
boolean |
prepareContext(InvokationContext<? super A> context)
This method is called once for each request/use of an
extension and have two purposes:
The factory should decide if the extension should be enabled or
not.
|
boolean prepareContext(InvokationContext<? super A> context)
JspContext
.
context
- The current invokation contextA[] getActions(InvokationContext<? super A> context)
context
- The current invokation context