01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: /*
17: * Created on Aug 12, 2004
18: *
19: */
20: package org.kuali.module.pdp.form.format;
21:
22: import javax.servlet.http.HttpServletRequest;
23:
24: import org.apache.struts.action.ActionErrors;
25: import org.apache.struts.action.ActionForm;
26: import org.apache.struts.action.ActionMapping;
27: import org.kuali.module.pdp.utilities.DateHandler;
28:
29: /**
30: * @author jsissom
31: */
32: public class FormatSelectionForm extends ActionForm {
33: private String[] customerProfileId;
34: private String paymentDate;
35: private String immediate;
36: private String paymentTypes;
37:
38: public FormatSelectionForm() {
39: super ();
40: }
41:
42: public void reset(ActionMapping mapping, HttpServletRequest request) {
43: if (customerProfileId != null) {
44: for (int i = 0; i < customerProfileId.length; i++) {
45: customerProfileId[i] = "";
46: }
47: immediate = "N";
48: }
49: }
50:
51: public ActionErrors validate(ActionMapping mapping,
52: HttpServletRequest request) {
53:
54: ActionErrors errors = new ActionErrors();
55: DateHandler.validDate(errors, "errors", paymentDate);
56: return errors;
57: }
58:
59: public String getPaymentTypes() {
60: return paymentTypes;
61: }
62:
63: public void setPaymentTypes(String paymentTypes) {
64: this .paymentTypes = paymentTypes;
65: }
66:
67: public String[] getCustomerProfileId() {
68: return customerProfileId;
69: }
70:
71: public void setCustomerProfileId(String[] customerProfileId) {
72: this .customerProfileId = customerProfileId;
73: }
74:
75: public String getCustomerProfileId(int index) {
76: return customerProfileId[index];
77: }
78:
79: public void setStringIndexed(int index, String value) {
80: customerProfileId[index] = value;
81: }
82:
83: public String getImmediate() {
84: return immediate;
85: }
86:
87: public void setImmediate(String immediate) {
88: this .immediate = immediate;
89: }
90:
91: public String getPaymentDate() {
92: return paymentDate;
93: }
94:
95: public void setPaymentDate(String paymentDate) {
96: this.paymentDate = paymentDate;
97: }
98: }
|