1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.document.web.struts;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import javax.servlet.http.HttpServletRequest;
22
23 import org.kuali.ole.fp.businessobject.CapitalAssetInformation;
24 import org.kuali.ole.fp.businessobject.CreditCardDetail;
25 import org.kuali.ole.fp.document.CapitalAssetEditable;
26 import org.kuali.ole.fp.document.CreditCardReceiptDocument;
27 import org.kuali.ole.sys.context.SpringContext;
28 import org.kuali.rice.kns.service.BusinessObjectDictionaryService;
29
30
31
32
33 public class CreditCardReceiptForm extends CapitalAccountingLinesFormBase implements CapitalAssetEditable {
34 protected CreditCardDetail newCreditCardReceipt;
35 protected List<CapitalAssetInformation> capitalAssetInformation;
36
37
38
39
40 public CreditCardReceiptForm() {
41 super();
42
43 setNewCreditCardReceipt(new CreditCardDetail());
44
45 capitalAssetInformation = new ArrayList<CapitalAssetInformation>();
46 this.capitalAccountingLine.setCanCreateAsset(false);
47 }
48
49 @Override
50 protected String getDefaultDocumentTypeName() {
51 return "OLE_CCR";
52 }
53
54
55
56
57 public CreditCardReceiptDocument getCreditCardReceiptDocument() {
58 return (CreditCardReceiptDocument) getDocument();
59 }
60
61
62
63
64 public CreditCardDetail getNewCreditCardReceipt() {
65 return newCreditCardReceipt;
66 }
67
68
69
70
71 public void setNewCreditCardReceipt(CreditCardDetail newCreditCardReceipt) {
72 this.newCreditCardReceipt = newCreditCardReceipt;
73 }
74
75
76
77
78
79
80
81 @Override
82 public void populate(HttpServletRequest request) {
83 super.populate(request);
84
85
86
87 SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(getNewCreditCardReceipt());
88
89 List<CreditCardDetail> creditCardReceipts = getCreditCardReceiptDocument().getCreditCardReceipts();
90 for (CreditCardDetail detail : creditCardReceipts) {
91 SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(detail);
92 }
93
94 }
95
96
97
98
99 public List<CapitalAssetInformation> getCapitalAssetInformation() {
100 return this.capitalAssetInformation;
101 }
102
103
104
105
106 public void setCapitalAssetInformation(List<CapitalAssetInformation> capitalAssetInformation) {
107 this.capitalAssetInformation = capitalAssetInformation;
108 }
109 }