com.poscoict.glueframework.web.control.struts
Class GlueAbstractAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.poscoict.glueframework.web.control.struts.GlueAbstractAction
Direct Known Subclasses:
GlueSimpleAction

public abstract class GlueAbstractAction
extends org.apache.struts.action.Action

GlueSimpleActionÀ» »ç¿ëÇÏÁö ¾Ê°í GlueSimpleAction¿¡ ±â´ÉÀ» È®ÀåÇϱ⠿øÇÏ´Â °æ¿ì »ç¿ë. ¸ðµç »ç¿ëÀÚ ActionÀº ÀÌ Class¸¦ »ó¼Ó ¹Þ¾Æ¾ß ÇÏ¸ç ¹Ýµå½Ã beforeExecute()¿Í afterExecute()¸¦ ±¸ÇöÇÏ¿©¾ß ÇÑ´Ù. GlueAbstractAction È®Àå Class¿¡¼­´Â beforeExecute() --> execute() --> afterExecute() ¼øÀ¸·Î È£ÃâÇÑ´Ù. µû¶ó¼­ execute()´Â Overriding ÇÒ ¼ö ¾ø´Ù. GlueContext´Â beforeExecute()¿¡¼­´Â »ç¿ëÇÒ ¼ö ¾ø´Ù. ±× ÀÌÀ¯´Â GlueContext´Â execute()¿¡¼­ »ý¼ºÇϱ⠶§¹®ÀÌ´Ù. beforeExecute()ÀÇ ½ÇÇà °á°ú´Â request¿¡ ÀúÀåÇÏ¿©¾ß ÇÑ´Ù. ÇØ´ç ³»¿ëÀº GlueContext¿¡ ÀÚµ¿À¸·Î ÀúÀåµÇ°í ÀÌÈÄÀÇ Method¿¡¼­ GlueContext¸¦ ÅëÇØ Data¸¦ Á¢±ÙÇÒ ¼ö ÀÖ´Ù. afterExecute()¿¡¼­ GlueContextÀÇ Data°¡ ÇÊ¿äÇÑ °æ¿ì ´ÙÀ½°ú °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

 GlueContext ctx = (GlueContext) request.getAttribute( GlueWebConstants.CONTEXT );
 


Field Summary
protected  org.slf4j.Logger logger
          logger
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
GlueAbstractAction()
           
 
Method Summary
abstract  org.apache.struts.action.ActionForward afterExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          ÀÌ Method¸¦ Override ÇÏ¿© GlueBizController¸¦ È£ÃâÇÑ ÈÄ¿¡ ¼öÇà ÇÏ´Â ³»¿ëÀ» ±¸ÇöÇÑ´Ù.
abstract  GlueWebContext beforeExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          ÀÌ Method¸¦ Override ÇÏ¿© GlueBizController¸¦ È£ÃâÇϱâ Àü¿¡ ¼öÇà ÇÏ´Â ³»¿ëÀ» ±¸ÇöÇÑ´Ù.
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
          Internal Use Only.
protected  GlueMultipartRequest processUploadFile(HttpServletRequest request)
          Deprecated.  
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.slf4j.Logger logger
logger

Constructor Detail

GlueAbstractAction

public GlueAbstractAction()
Method Detail

processUploadFile

protected GlueMultipartRequest processUploadFile(HttpServletRequest request)
                                          throws Exception
Deprecated. 

Throws:
Exception

execute

public final org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                            org.apache.struts.action.ActionForm form,
                                                            HttpServletRequest request,
                                                            HttpServletResponse response)
                                                     throws IOException,
                                                            ServletException
Internal Use Only. ÀÌ Method¸¦ Override ÇÏÁö ¸¶½Ê½Ã¿ä.ÀÌ Method´Â FrameWork ³»ºÎÀûÀΠȣÃâ¿¡ »ç¿ëµÇ°í User°¡ Define ÇÏ¿© »ç¿ëÇÒ Method´Â beforeExecute()°ú afterExecute()ÀÌ´Ù.

Overrides:
execute in class org.apache.struts.action.Action
Parameters:
mapping - ActionMapping
form - ActionForm
request - HttpServletRequest
response - HttpServletResponse
Returns:
ActionForward ´ÙÀ½ forward Name
Throws:
IOException
ServletException

beforeExecute

public abstract GlueWebContext beforeExecute(org.apache.struts.action.ActionMapping mapping,
                                             org.apache.struts.action.ActionForm form,
                                             HttpServletRequest request,
                                             HttpServletResponse response)
ÀÌ Method¸¦ Override ÇÏ¿© GlueBizController¸¦ È£ÃâÇϱâ Àü¿¡ ¼öÇà ÇÏ´Â ³»¿ëÀ» ±¸ÇöÇÑ´Ù. ¸¸ÀÏ GlueBizController¸¦ È£ÃâÇϱâ Àü¿¡ ¼±Çà ÀÛ¾÷ÀÌ ÇÊ¿äÇϰųª StrutsÀÇ Action¿¡¼­ ¹Ýµå½Ã ó¸®ÇØ¾ß µÇ´Â ³»¿ëÀÌ ÀÖ´Ù¸é ÀÌ Method¸¦ OverrideÇÏ¿© ±¸ÇöÇÑ´Ù. ¼öÇà °á°ú °ªÀº request.setAttribute()¸¦ ÀÌ¿ëÇÏ¿© ÀúÀåÇÏ°í ÇØ´ç ³»¿ëÀº ServiceÀÇ Activity¿¡¼­ GlueContext ¸¦ ÅëÇØ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¶ÇÇÑ afterExecute()¿¡¼­ request.getAttribute() ¸¦ ÀÌ¿ëÇÏ¿© ¿©±â¼­ ÀúÀåÇÑ °ªÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù.

Parameters:
mapping - ActionMapping
form - ActionForm
request - HttpServletRequest
response - HttpServletResponse

afterExecute

public abstract org.apache.struts.action.ActionForward afterExecute(org.apache.struts.action.ActionMapping mapping,
                                                                    org.apache.struts.action.ActionForm form,
                                                                    HttpServletRequest request,
                                                                    HttpServletResponse response)
ÀÌ Method¸¦ Override ÇÏ¿© GlueBizController¸¦ È£ÃâÇÑ ÈÄ¿¡ ¼öÇà ÇÏ´Â ³»¿ëÀ» ±¸ÇöÇÑ´Ù. ¸¸ÀÏ GlueBizController¸¦ È£ÃâÇÑ ÈÄ¿¡ ÀÛ¾÷ÀÌ ÇÊ¿äÇϰųª StrutsÀÇ Action¿¡¼­ ¹Ýµå½Ã ó¸®ÇØ¾ß µÇ´Â ³»¿ëÀÌ ÀÖ´Ù¸é ÀÌ Method¸¦ OverrideÇÏ¿© ±¸ÇöÇÑ´Ù. °á°ú°ªÀº ¾Æ·¡¿Í °°ÀÌ ÀúÀåÇÏ¿© »ç¿ëÇÑ´Ù.
 GlueContext ctx = (GlueContext) request.getAttribute( GlueWebConstants.CONTEXT );
 ctx.put( key, value );
 

Parameters:
mapping - ActionMapping
form - ActionForm
request - HttpServletRequest
response - HttpServletResponse


Copyright © 2013–2015 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.