1 7 package com.inversoft.verge.mvc.controller; 8 9 10 import javax.servlet.http.HttpServletRequest ; 11 import javax.servlet.http.HttpServletResponse ; 12 import javax.servlet.http.HttpSession ; 13 14 import com.inversoft.verge.util.RequestContext; 15 16 17 27 public class Action { 28 29 private HttpServletRequest request; 30 private HttpServletResponse response; 31 private Object action; 32 private RequestContext requestContext; 33 34 35 38 public Action(Object action, HttpServletRequest request, 39 HttpServletResponse response) { 40 this.action = action; 41 this.request = request; 42 this.response = response; 43 this.requestContext = new RequestContext(request); 44 } 45 46 49 public Action(Object action, HttpServletRequest request, 50 HttpServletResponse response, RequestContext requestContext) { 51 this.action = action; 52 this.request = request; 53 this.response = response; 54 this.requestContext = requestContext; 55 } 56 57 58 63 public HttpServletRequest getHttpServletRequest() { 64 return request; 65 } 66 67 71 public void detachHttpServletRequest() { 72 request = null; 73 } 74 75 80 public HttpServletResponse getHttpServletResponse() { 81 return response; 82 } 83 84 89 public HttpSession getHttpSession() { 90 return request.getSession(); 91 } 92 93 100 public Object getAction() { 101 return action; 102 } 103 104 111 protected void setAction(Object action) { 112 this.action = action; 113 } 114 115 120 public RequestContext getRequestContext() { 121 return requestContext; 122 } 123 } | Popular Tags |