net.anotheria.maf.action
Interface Action

All Known Implementing Classes:
AbstractAction, ForwardAction, ShowMappingsAction

public interface Action

An action is the base of the MAF. Everything that is mapped to a request path must be an action. Actions are singletons (or at least the framework knows only one instance of them).

Author:
lrosenberg

Method Summary
 ActionCommand execute(ActionMapping mapping, FormBean formBean, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Called by the framework.
 void postProcess(ActionMapping mapping, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Called by the framework after call to the execute.
 void preProcess(ActionMapping mapping, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Called by the framework prior to call to the execute.
 

Method Detail

preProcess

void preProcess(ActionMapping mapping,
                javax.servlet.http.HttpServletRequest req,
                javax.servlet.http.HttpServletResponse res)
                throws Exception
Called by the framework prior to call to the execute. Useful for action hierarchies to put common activities (authorisation checks etc) into classes higher in the class hierarchy.

Parameters:
mapping -
req -
res -
Throws:
Exception

execute

ActionCommand execute(ActionMapping mapping,
                      FormBean formBean,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res)
                      throws Exception
Called by the framework. This is the method where you implement controller-logic (mvc) in your action.

Parameters:
mapping - action mapping
formBean - backing bean
req - http request
res - http response
Returns:
a forward to another action or jsp for view rendering.
Throws:
Exception - any exception

postProcess

void postProcess(ActionMapping mapping,
                 javax.servlet.http.HttpServletRequest req,
                 javax.servlet.http.HttpServletResponse res)
                 throws Exception
Called by the framework after call to the execute.

Parameters:
mapping -
req -
res -
Throws:
Exception


Copyright © 2010-2013 anotheria.net. All Rights Reserved.