Anyframe Web

anyframe.web.struts.action
Class AbstractActionSupport

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.springframework.web.struts.ActionSupport
          extended by anyframe.web.struts.action.AbstractActionSupport
Direct Known Subclasses:
DefaultDispatchActionSupport, DefaultForwardAction

public abstract class AbstractActionSupport
extends org.springframework.web.struts.ActionSupport

Abstract Action Class which provide token, exception, error logging, pre/post execution features.

  • getLogger : Setup Logger
  • preProcess : Check Synchronized Token
  • Process : Call Business Method
  • postProcess : Check post Condition
  • processInvalidTokenException
  • processUnCheckedException
  • processCheckedException
  • processFinally
  • Author:
    Byunghun Woo

    Field Summary
     
    Fields inherited from class org.apache.struts.action.Action
    servlet
     
    Constructor Summary
    AbstractActionSupport()
               
     
    Method Summary
     org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
               Process the specified non-HTTP request, and create the corresponding non-HTTP response (or forward to another web component that will create it), with provision for handling exceptions thrown by the business logic.
     org.apache.commons.logging.Log getLogger()
              Core Framework Delegation Util Method to get Logger
    protected  java.lang.Object getService(java.lang.String name)
              Returns using the bean name for the bean registered in WebApplicationContext.
     org.apache.struts.action.ActionForward postProcess(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionForward forward)
               The basic method which execute some post condition actions eg. exception processing etc.
     void preProcess(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
               The basic method which execute some pre condition actions eg.
    abstract  org.apache.struts.action.ActionForward process(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
               The abstract method which sub classes must implement
     org.apache.struts.action.ActionForward processCheckedException(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception checkedException)
               The basic method which execute some business exceptional condition actions
     org.apache.struts.action.ActionForward processFinally(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionForward forward)
               The basic method which execute some common condition actions
     org.apache.struts.action.ActionForward processInvalidTokenException(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception tokenException)
               The basic method which execute some token invalid exceptional condition actions
     org.apache.struts.action.ActionForward processUnCheckedException(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception unCheckedException)
               The basic method which execute some system exceptional condition actions
     
    Methods inherited from class org.springframework.web.struts.ActionSupport
    getMessageSourceAccessor, getServletContext, getTempDir, getWebApplicationContext, initWebApplicationContext, onDestroy, onInit, setServlet
     
    Methods inherited from class org.apache.struts.action.Action
    addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    AbstractActionSupport

    public AbstractActionSupport()
    Method Detail

    getLogger

    public org.apache.commons.logging.Log getLogger()
                                             throws java.lang.Exception
    Core Framework Delegation Util Method to get Logger

    Throws:
    java.lang.Exception

    execute

    public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws java.lang.Exception

    Process the specified non-HTTP request, and create the corresponding non-HTTP response (or forward to another web component that will create it), with provision for handling exceptions thrown by the business logic. Return an ActionForward instance describing where and how control should be forwarded, or null if the response has already been completed.

    The default implementation attempts to forward to the HTTP version of this method.

    Overrides:
    execute in class org.apache.struts.action.Action
    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    process

    public abstract org.apache.struts.action.ActionForward process(org.apache.struts.action.ActionMapping mapping,
                                                                   org.apache.struts.action.ActionForm form,
                                                                   javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)
                                                            throws java.lang.Exception

    The abstract method which sub classes must implement

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    preProcess

    public void preProcess(org.apache.struts.action.ActionMapping mapping,
                           org.apache.struts.action.ActionForm form,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.lang.Exception

    The basic method which execute some pre condition actions eg. authorization, authentication, token validation, etc.

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    postProcess

    public org.apache.struts.action.ActionForward postProcess(org.apache.struts.action.ActionMapping mapping,
                                                              org.apache.struts.action.ActionForm form,
                                                              javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response,
                                                              org.apache.struts.action.ActionForward forward)
                                                       throws java.lang.Exception

    The basic method which execute some post condition actions eg. exception processing etc.

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    processFinally

    public org.apache.struts.action.ActionForward processFinally(org.apache.struts.action.ActionMapping mapping,
                                                                 org.apache.struts.action.ActionForm form,
                                                                 javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response,
                                                                 org.apache.struts.action.ActionForward forward)
                                                          throws java.lang.Exception

    The basic method which execute some common condition actions

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    processCheckedException

    public org.apache.struts.action.ActionForward processCheckedException(org.apache.struts.action.ActionMapping mapping,
                                                                          org.apache.struts.action.ActionForm form,
                                                                          javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response,
                                                                          java.lang.Exception checkedException)
                                                                   throws java.lang.Exception

    The basic method which execute some business exceptional condition actions

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    processUnCheckedException

    public org.apache.struts.action.ActionForward processUnCheckedException(org.apache.struts.action.ActionMapping mapping,
                                                                            org.apache.struts.action.ActionForm form,
                                                                            javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response,
                                                                            java.lang.Exception unCheckedException)
                                                                     throws java.lang.Exception

    The basic method which execute some system exceptional condition actions

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    processInvalidTokenException

    public org.apache.struts.action.ActionForward processInvalidTokenException(org.apache.struts.action.ActionMapping mapping,
                                                                               org.apache.struts.action.ActionForm form,
                                                                               javax.servlet.http.HttpServletRequest request,
                                                                               javax.servlet.http.HttpServletResponse response,
                                                                               java.lang.Exception tokenException)
                                                                        throws java.lang.Exception

    The basic method which execute some token invalid exceptional condition actions

    Parameters:
    mapping - The ActionMapping used to select this instance
    form - The optional ActionForm bean for this request (if any)
    request - The non-HTTP request we are processing
    response - The non-HTTP response we are creating
    Returns:
    The forward to which control should be transferred, or null if the response has been completed.
    Throws:
    java.lang.Exception - if the application business logic throws an exception.

    getService

    protected java.lang.Object getService(java.lang.String name)
    Returns using the bean name for the bean registered in WebApplicationContext.

    Parameters:
    name - The bean name registered in ApplicationContext.
    Returns:
    Returns the bean appropriate to the Object Service.

    Anyframe Web

    Copyright © 2008-2009 Samsung SDS. All Rights Reserved.