1 package org.kuali.ole.coa.businessobject;
2
3 import org.apache.commons.lang.StringUtils;
4 import org.apache.commons.lang.time.DateFormatUtils;
5 import org.apache.commons.lang.time.DateUtils;
6 import org.apache.log4j.Logger;
7 import org.kuali.ole.olekrad.service.OLELegacyDataAdapterHelperService;
8 import org.kuali.ole.sys.OLEPropertyConstants;
9 import org.kuali.ole.sys.ObjectUtil;
10 import org.kuali.ole.sys.context.SpringContext;
11 import org.kuali.rice.core.api.datetime.DateTimeService;
12 import org.kuali.rice.core.api.util.type.KualiDecimal;
13 import org.kuali.rice.kew.api.doctype.DocumentTypeService;
14 import org.kuali.rice.kew.doctype.bo.DocumentType;
15 import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
16 import org.kuali.rice.kim.api.identity.Person;
17 import org.kuali.rice.kim.api.identity.PersonService;
18 import org.kuali.rice.krad.bo.PersistableAttachmentBase;
19 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20
21 import java.text.DateFormat;
22 import java.text.SimpleDateFormat;
23 import java.util.*;
24
25
26
27
28
29
30
31
32 public class OLEAccountDelegateGlobalFormModel extends PersistableBusinessObjectBase{
33 private static final Logger LOG = Logger.getLogger(AccountDelegateModel.class);
34
35 private String chartOfAccountsCode;
36 private String organizationCode;
37 private String accountDelegateModelName;
38 private boolean active;
39 private List<AccountDelegateModelDetail> accountDelegateModelDetails;
40
41 private Organization organization;
42 private Chart chartOfAccounts;
43
44
45
46
47
48
49
50 public String getChartOfAccountsCode() {
51 return chartOfAccountsCode;
52 }
53
54
55
56
57
58
59 public void setChartOfAccountsCode(String chartOfAccountsCode) {
60 this.chartOfAccountsCode = chartOfAccountsCode;
61 }
62
63
64
65
66
67
68
69 public String getOrganizationCode() {
70 return organizationCode;
71 }
72
73
74
75
76
77
78 public void setOrganizationCode(String organizationCode) {
79 this.organizationCode = organizationCode;
80 }
81
82
83
84
85
86
87
88 public String getAccountDelegateModelName() {
89 return accountDelegateModelName;
90 }
91
92
93
94
95
96
97 public void setAccountDelegateModelName(String organizationRoutingModelName) {
98 this.accountDelegateModelName = organizationRoutingModelName;
99 }
100
101
102
103
104
105
106
107 public Organization getOrganization() {
108 return organization;
109 }
110
111
112
113
114
115
116
117 public void setOrganization(Organization organization) {
118 this.organization = organization;
119 }
120
121
122
123
124
125
126 public Chart getChartOfAccounts() {
127 return chartOfAccounts;
128 }
129
130
131
132
133
134
135
136 public void setChartOfAccounts(Chart chartOfAccounts) {
137 this.chartOfAccounts = chartOfAccounts;
138 }
139
140
141
142
143
144
145 public List<AccountDelegateModelDetail> getAccountDelegateModelDetails() {
146 return accountDelegateModelDetails;
147 }
148
149
150
151
152
153
154 public void setAccountDelegateModelDetails(List<AccountDelegateModelDetail> organizationRoutingModel) {
155 this.accountDelegateModelDetails = organizationRoutingModel;
156 }
157
158
159
160
161 protected LinkedHashMap toStringMapper() {
162 LinkedHashMap m = new LinkedHashMap();
163 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
164 m.put("organizationCode", this.organizationCode);
165 m.put("accountDelegateModelName", this.accountDelegateModelName);
166 return m;
167 }
168
169
170
171
172 @Override
173 public void linkEditableUserFields() {
174 super.linkEditableUserFields();
175 if (this == null) {
176 throw new IllegalArgumentException("parameter passed in was null");
177 }
178 List bos = new ArrayList();
179 bos.addAll(getAccountDelegateModelDetails());
180 new OLELegacyDataAdapterHelperService().linkUserFields(bos);
181 }
182
183
184
185
186
187 public boolean isActive() {
188 return active;
189 }
190
191
192
193
194
195 public void setActive(boolean active) {
196 this.active = active;
197 }
198
199
200 }