Action classes
Calyxo provides the de.odysseus.calyxo.control.Action interface. All action implementations must implement this interface. Actions are instantiated and initialized by the controller during start up.
The Action interface defines two methods:
-
After instantiation, the controller gives the action the opportunity
to do some initialization.
An object reflecting the action configuration element and the module
context are passed in.
public void init( ActionConfig config, ModuleContext context) throws Exception;
-
The execute method will be called to "invoke" the action,
passing the request and response objects as parameters.
It returns an object reflecting a dispatch configuration element.
public DispatchConfig execute( HttpServletRequest request, HttpServletResponse response) throws Exception;
For your convenience, there is also an abstract base action implementation, namely de.odysseus.calyxo.control.AbstractAction. This class provides methods to serve the module context, action configuration, as well as a "message support" to save error, warning and info messages.


