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.AdvanceDepositDetail;
24 import org.kuali.ole.fp.businessobject.CapitalAssetInformation;
25 import org.kuali.ole.fp.document.AdvanceDepositDocument;
26 import org.kuali.ole.fp.document.CapitalAssetEditable;
27 import org.kuali.ole.sys.context.SpringContext;
28 import org.kuali.rice.kns.service.BusinessObjectDictionaryService;
29
30
31
32
33 public class AdvanceDepositForm extends CapitalAccountingLinesFormBase implements CapitalAssetEditable {
34 protected AdvanceDepositDetail newAdvanceDeposit;
35 protected List<CapitalAssetInformation> capitalAssetInformation;
36
37
38
39
40 public AdvanceDepositForm() {
41 super();
42
43 AdvanceDepositDetail advanceDepositDetail = new AdvanceDepositDetail();
44 advanceDepositDetail.setDefaultBankCode();
45 setNewAdvanceDeposit(advanceDepositDetail);
46
47 capitalAssetInformation = new ArrayList<CapitalAssetInformation>();
48 this.capitalAccountingLine.setCanCreateAsset(false);
49 }
50
51 @Override
52 protected String getDefaultDocumentTypeName() {
53 return "OLE_AD";
54 }
55
56
57
58
59 public AdvanceDepositDocument getAdvanceDepositDocument() {
60 return (AdvanceDepositDocument) getDocument();
61 }
62
63
64
65
66 public AdvanceDepositDetail getNewAdvanceDeposit() {
67 return newAdvanceDeposit;
68 }
69
70
71
72
73 public void setNewAdvanceDeposit(AdvanceDepositDetail newAdvanceDeposit) {
74 this.newAdvanceDeposit = newAdvanceDeposit;
75 }
76
77
78
79
80
81
82
83 @Override
84 public void populate(HttpServletRequest request) {
85 super.populate(request);
86
87
88 SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(getNewAdvanceDeposit());
89
90 List<AdvanceDepositDetail> advancedDeposits = getAdvanceDepositDocument().getAdvanceDeposits();
91 for (AdvanceDepositDetail detail : advancedDeposits) {
92 SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(detail);
93 }
94 }
95
96
97
98
99 public List<CapitalAssetInformation> getCapitalAssetInformation() {
100 return capitalAssetInformation;
101 }
102
103
104
105
106 public void setCapitalAssetInformation(List<CapitalAssetInformation> capitalAssetInformation) {
107 this.capitalAssetInformation = capitalAssetInformation;
108 }
109 }