|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.action.Action
org.apache.struts.actions.DispatchAction
org.apache.struts.actions.LookupDispatchAction
org.appfuse.webapp.action.BaseAction
Implementation of Action that contains base methods for logging and conducting pre/post perform actions. This class is intended to be a base class for all Struts actions.
| Field Summary | |
protected ApplicationContext |
ctx
|
protected static org.apache.commons.logging.Log |
log
|
static String |
SECURE
|
| Fields inherited from class org.apache.struts.actions.LookupDispatchAction |
keyMethodMap, localeMap |
| Fields inherited from class org.apache.struts.actions.DispatchAction |
clazz, messages, methods, types |
| Fields inherited from class org.apache.struts.action.Action |
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
| Constructor Summary | |
BaseAction()
|
|
| Method Summary | |
protected ActionForward |
cancelled(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
Method which is dispatched to when the request is a cancel button submit. |
protected boolean |
checkSsl(ActionMapping mapping,
HttpServletRequest request,
HttpServletResponse response)
Method to check and see if https is required for this resource |
protected Object |
convert(Object o)
|
protected Object |
convertDates(Object obj,
Object form)
|
protected Object |
convertLists(Object o)
|
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
Override the execute method in LookupDispatchAction to parse URLs and forward to methods without parameters. |
protected ActionForm |
getActionForm(ActionMapping mapping,
HttpServletRequest request)
Convenience method for getting an action form base on it's mapped scope. |
Object |
getBean(String name)
Convenience method to bind objects in Actions |
ActionErrors |
getErrors(HttpServletRequest request)
Convenience method to initialize errors in a subclass. |
Map |
getKeyMethodMap()
Provides the mapping from resource key to method name |
protected String |
getLookupMapName(HttpServletRequest request,
String keyName,
ActionMapping mapping)
Lookup the method name corresponding to the client request's locale. |
ActionMessages |
getMessages(HttpServletRequest request)
Convenience method to initialize messages in a subclass. |
protected String |
getMethodName(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
String parameter)
Returns the method name, given a parameter's value. |
String |
getResumeId(HttpServletRequest request)
Convenience method to lookup the user's resumeId |
protected User |
getUser(HttpSession session)
Convenience method to get the userForm from the session |
protected void |
removeFormBean(ActionMapping mapping,
HttpServletRequest request)
Convenience method for removing the obsolete form bean. |
protected void |
updateFormBean(ActionMapping mapping,
HttpServletRequest request,
Object form)
Convenience method to update a formBean in it's scope |
| Methods inherited from class org.apache.struts.actions.DispatchAction |
dispatchMethod, getMethod, unspecified |
| Methods inherited from class org.apache.struts.action.Action |
execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.commons.logging.Log log
public static final String SECURE
protected ApplicationContext ctx
| Constructor Detail |
public BaseAction()
| Method Detail |
public Object getBean(String name)
name -
public String getResumeId(HttpServletRequest request)
throws Exception
request -
Exceptionpublic Map getKeyMethodMap()
protected Object convertDates(Object obj,
Object form)
ConvertUtil.convertDates(java.lang.Object, java.lang.Object)
protected Object convert(Object o)
throws Exception
ExceptionConvertUtil.convert(java.lang.Object)
protected Object convertLists(Object o)
throws Exception
ExceptionConvertUtil.convertLists(java.lang.Object)public ActionMessages getMessages(HttpServletRequest request)
request - the current request
public ActionErrors getErrors(HttpServletRequest request)
request - the current request
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
mapping - The ActionMapping used to select this instancerequest - The HTTP request we are processingresponse - The HTTP response we are creatingform - The optional ActionForm bean for this request (if any)
Exception - if an error occurs
protected ActionForm getActionForm(ActionMapping mapping,
HttpServletRequest request)
mapping - The ActionMapping used to select this instancerequest - The HTTP request we are processing
protected String getLookupMapName(HttpServletRequest request,
String keyName,
ActionMapping mapping)
throws ServletException
request - The HTTP request we are processingkeyName - The parameter name to use as the properties keymapping - The ActionMapping used to select this instance
ServletException - if keyName cannot be resolved
protected String getMethodName(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
String parameter)
throws Exception
mapping - The ActionMapping used to select this instanceform - The optional ActionForm bean for this request (if any)request - The HTTP request we are processingresponse - The HTTP response we are creatingparameter - The ActionMapping parameter's name
Exceptionprotected User getUser(HttpSession session)
session - the current user's session
protected ActionForward cancelled(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
DispatchAction should override this method if
they wish to provide default behavior different than returning null.
Exception
protected boolean checkSsl(ActionMapping mapping,
HttpServletRequest request,
HttpServletResponse response)
mapping - The ActionMapping used to select this instancerequest - The HTTP request we are processingresponse - The HTTP response we are creating
protected void removeFormBean(ActionMapping mapping,
HttpServletRequest request)
mapping - The ActionMapping used to select this instancerequest - The HTTP request we are processing
protected void updateFormBean(ActionMapping mapping,
HttpServletRequest request,
Object form)
mapping - The ActionMapping used to select this instancerequest - The HTTP request we are processingform - The ActionForm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||