1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.web.struts;
17
18 import java.util.Map;
19
20 import javax.servlet.http.HttpServletRequest;
21 import javax.servlet.http.HttpServletResponse;
22
23 import org.apache.struts.action.ActionForm;
24 import org.apache.struts.action.ActionForward;
25 import org.apache.struts.action.ActionMapping;
26 import org.kuali.ole.sys.context.SpringContext;
27 import org.kuali.ole.sys.service.ElectronicFundTransferActionHelper;
28 import org.kuali.ole.sys.service.ElectronicPaymentClaimingService;
29 import org.kuali.rice.kns.web.struts.action.KualiAction;
30 import org.kuali.rice.krad.util.GlobalVariables;
31
32 public class ElectronicFundTransferAction extends KualiAction {
33 private final static String START_BEAN = "electronicFundTransferStartAction";
34 private final static String REFRESH_BEAN = "electronicFundTransferRefreshAction";
35 private final static String CLAIM_BEAN = "electronicFundTransferClaimAction";
36 private final static String CANCEL_BEAN = "electronicFundTransferCancelAction";
37
38
39
40
41 @Override
42 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
43 ElectronicFundTransferForm eftForm = (ElectronicFundTransferForm)form;
44 eftForm.setAvailableClaimingDocumentStrategies(SpringContext.getBean(ElectronicPaymentClaimingService.class).getClaimingDocumentChoices(GlobalVariables.getUserSession().getPerson()));
45 return super.execute(mapping, form, request, response);
46 }
47
48
49
50
51
52
53
54
55
56
57 public ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
58 return getActionHelpers().get(ElectronicFundTransferAction.START_BEAN).performAction((ElectronicFundTransferForm)form, mapping, request.getParameterMap(), getApplicationBaseUrl());
59 }
60
61
62
63
64
65
66
67
68
69
70 public ActionForward refresh(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
71 return getActionHelpers().get(ElectronicFundTransferAction.REFRESH_BEAN).performAction((ElectronicFundTransferForm)form, mapping, request.getParameterMap(), getApplicationBaseUrl());
72 }
73
74
75
76
77
78
79
80
81
82
83 public ActionForward claim(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
84 return getActionHelpers().get(ElectronicFundTransferAction.CLAIM_BEAN).performAction((ElectronicFundTransferForm)form, mapping, request.getParameterMap(), getApplicationBaseUrl());
85 }
86
87
88
89
90
91
92
93
94
95
96 public ActionForward cancel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
97 return getActionHelpers().get(ElectronicFundTransferAction.CANCEL_BEAN).performAction((ElectronicFundTransferForm)form, mapping, request.getParameterMap(), getApplicationBaseUrl());
98 }
99
100
101
102
103 private Map<String, ElectronicFundTransferActionHelper> getActionHelpers() {
104 return SpringContext.getBeansOfType(ElectronicFundTransferActionHelper.class);
105 }
106 }
107