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