01: /*
02: * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
03: *
04: * This file is part of TransferCM.
05: *
06: * TransferCM is free software; you can redistribute it and/or modify it under the
07: * terms of the GNU General Public License as published by the Free Software
08: * Foundation; either version 2 of the License, or (at your option) any later
09: * version.
10: *
11: * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
12: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
18: * Fifth Floor, Boston, MA 02110-1301 USA
19: */
20:
21: package com.methodhead.util;
22:
23: import org.apache.struts.action.ActionMapping;
24: import org.apache.struts.action.DynaActionForm;
25: import javax.servlet.http.HttpServletRequest;
26: import javax.servlet.http.HttpServletResponse;
27: import com.methodhead.auth.AuthUser;
28:
29: /**
30: * A class that aggregates arguments passed to typical operations in MHF action
31: * classes. Many operations performed by actions in MHF accept a barrage of
32: * arguments: the typical Struts arguments (mapping, form, request, response),
33: * plus the current user.
34: */
35: public class OperationContext {
36:
37: // constructors /////////////////////////////////////////////////////////////
38:
39: public OperationContext(ActionMapping mapping, DynaActionForm form,
40: HttpServletRequest request, HttpServletResponse response,
41: AuthUser user) {
42:
43: this .mapping = mapping;
44: this .form = form;
45: this .request = request;
46: this .response = response;
47: this .user = user;
48: }
49:
50: // constants ////////////////////////////////////////////////////////////////
51:
52: // classes //////////////////////////////////////////////////////////////////
53:
54: // methods //////////////////////////////////////////////////////////////////
55:
56: // properties ///////////////////////////////////////////////////////////////
57:
58: // attributes ///////////////////////////////////////////////////////////////
59:
60: public ActionMapping mapping = null;
61: public DynaActionForm form = null;
62: public HttpServletRequest request = null;
63: public HttpServletResponse response = null;
64: public AuthUser user = null;
65: }
|