View Javadoc

1   /*
2    * Copyright 2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
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  package org.kuali.ole.sys.web.struts;
17  
18  import org.apache.commons.lang.StringUtils;
19  import org.kuali.rice.kns.web.struts.form.KualiForm;
20  
21  /**
22   * This class is the action form for balance inquiries.
23   */
24  public class KualiBalanceInquiryReportMenuForm extends KualiForm {
25      private static final long serialVersionUID = 1L;
26  
27      // parameter fields
28      private String referenceOriginCode;
29      private String referenceNumber;
30      private String referenceTypeCode;
31      private String debitCreditCode;
32      private String chartOfAccountsCode;
33      private String accountNumber;
34      private String financialObjectCode;
35      private String subAccountNumber;
36      private String financialSubObjectCode;
37      private String projectCode;
38      private String objectTypeCode;
39      private String universityFiscalYear;
40  
41      private String docFormKey;
42      // need this next attribute b/c the lookup overwrites the docFormKey
43      // improperly when it cancels back to the report menu (this)
44      // this holds the official docFormKey for the calling TP eDoc
45      private String balanceInquiryReportMenuCallerDocFormKey;
46      private String backLocation;
47  
48      /**
49       * @return String
50       */
51      public String getBackLocation() {
52          return backLocation;
53      }
54  
55      /**
56       * @param backLocation
57       */
58      public void setBackLocation(String backLocation) {
59          this.backLocation = backLocation;
60      }
61  
62      /**
63       * @return String
64       */
65      public String getDocFormKey() {
66          return docFormKey;
67      }
68  
69      /**
70       * @param docFormKey
71       */
72      public void setDocFormKey(String docFormKey) {
73          this.docFormKey = docFormKey;
74      }
75  
76      /**
77       * Builds out the lookupParameters for the GLPE balance inquiry.
78       * 
79       * @return String
80       */
81      public String getGeneralLedgerPendingEntryBalanceInquiryLookupParameters() {
82          return buildGenericBalanceInquiryLookupParameters();
83      }
84  
85      /**
86       * This method builds out the common balance inquiry lookup parameters based upon what was entered in the calling accounting
87       * line.
88       * 
89       * @return String
90       */
91      private String buildGenericBalanceInquiryLookupParameters() {
92          String lookupParameters = "";
93  
94          if (StringUtils.isNotBlank(chartOfAccountsCode)) {
95              lookupParameters += "chartOfAccountsCode:chartOfAccountsCode";
96          }
97          if (StringUtils.isNotBlank(accountNumber)) {
98              lookupParameters += ",accountNumber:accountNumber";
99          }
100         if (StringUtils.isNotBlank(subAccountNumber)) {
101             lookupParameters += ",subAccountNumber:subAccountNumber";
102         }
103         if (StringUtils.isNotBlank(financialObjectCode)) {
104             lookupParameters += ",financialObjectCode:financialObjectCode";
105         }
106         if (StringUtils.isNotBlank(financialSubObjectCode)) {
107             lookupParameters += ",financialSubObjectCode:financialSubObjectCode";
108         }
109         if (StringUtils.isNotBlank(objectTypeCode)) {
110             lookupParameters += ",objectTypeCode:financialObjectTypeCode";
111         }
112         if (StringUtils.isNotBlank(debitCreditCode)) {
113             lookupParameters += ",debitCreditCode:transactionDebitCreditCode";
114         }
115         if (StringUtils.isNotBlank(referenceOriginCode)) {
116             lookupParameters += ",referenceOriginCode:referenceFinancialSystemOriginationCode";
117         }
118         if (StringUtils.isNotBlank(referenceTypeCode)) {
119             lookupParameters += ",referenceTypeCode:referenceFinancialDocumentTypeCode";
120         }
121         if (StringUtils.isNotBlank(referenceNumber)) {
122             lookupParameters += ",referenceNumber:referenceFinancialDocumentNumber";
123         }
124         if (StringUtils.isNotBlank(projectCode)) {
125             lookupParameters += ",projectCode:projectCode";
126         }
127         if (StringUtils.isNotBlank(universityFiscalYear)) {
128             lookupParameters += ",universityFiscalYear:universityFiscalYear";
129         }
130 
131         return lookupParameters;
132     }
133 
134     /**
135      * @return String
136      */
137     public String getGeneralLedgerBalanceBalanceInquiryLookupParameters() {
138         return buildGenericBalanceInquiryLookupParameters();
139     }
140 
141     /**
142      * @return String
143      */
144     public String getGeneralLedgerEntryBalanceInquiryLookupParameters() {
145         return buildGenericBalanceInquiryLookupParameters();
146     }
147 
148     /**
149      * @return String
150      */
151     public String getBalancesByConsolidationBalanceInquiryLookupParameters() {
152         return buildGenericBalanceInquiryLookupParameters();
153     }
154 
155     /**
156      * @return String
157      */
158     public String getAvailableBalancesBalanceInquiryLookupParameters() {
159         return buildGenericBalanceInquiryLookupParameters();
160     }
161 
162     /**
163      * @return String
164      */
165     public String getOpenEncumbrancesBalanceInquiryLookupParameters() {
166         return buildGenericBalanceInquiryLookupParameters();
167     }
168 
169     /**
170      * @return String
171      */
172     public String getCashBalancesBalanceInquiryLookupParameters() {
173         return buildGenericBalanceInquiryLookupParameters();
174     }
175 
176     /**
177      * @return String
178      */
179     public String getAccountNumber() {
180         return accountNumber;
181     }
182 
183     /**
184      * @param accountNumber
185      */
186     public void setAccountNumber(String accountNumber) {
187         this.accountNumber = accountNumber;
188     }
189 
190     /**
191      * @return String
192      */
193     public String getChartOfAccountsCode() {
194         return chartOfAccountsCode;
195     }
196 
197     /**
198      * @param chartOfAccountsCode
199      */
200     public void setChartOfAccountsCode(String chartOfAccountsCode) {
201         this.chartOfAccountsCode = chartOfAccountsCode;
202     }
203 
204     /**
205      * @return String
206      */
207     public String getDebitCreditCode() {
208         return debitCreditCode;
209     }
210 
211     /**
212      * @param debitCreditCode
213      */
214     public void setDebitCreditCode(String debitCreditCode) {
215         this.debitCreditCode = debitCreditCode;
216     }
217 
218     /**
219      * @return String
220      */
221     public String getFinancialObjectCode() {
222         return financialObjectCode;
223     }
224 
225     /**
226      * @param financialObjectCode
227      */
228     public void setFinancialObjectCode(String financialObjectCode) {
229         this.financialObjectCode = financialObjectCode;
230     }
231 
232     /**
233      * @return String
234      */
235     public String getFinancialSubObjectCode() {
236         return financialSubObjectCode;
237     }
238 
239     /**
240      * @param financialSubObjectCode
241      */
242     public void setFinancialSubObjectCode(String financialSubObjectCode) {
243         this.financialSubObjectCode = financialSubObjectCode;
244     }
245 
246     /**
247      * @return String
248      */
249     public String getObjectTypeCode() {
250         return objectTypeCode;
251     }
252 
253     /**
254      * @param objectTypeCode
255      */
256     public void setObjectTypeCode(String objectTypeCode) {
257         this.objectTypeCode = objectTypeCode;
258     }
259 
260     /**
261      * @return String
262      */
263     public String getProjectCode() {
264         return projectCode;
265     }
266 
267     /**
268      * @param projectCode
269      */
270     public void setProjectCode(String projectCode) {
271         this.projectCode = projectCode;
272     }
273 
274     /**
275      * @return String
276      */
277     public String getReferenceNumber() {
278         return referenceNumber;
279     }
280 
281     /**
282      * @param referenceNumber
283      */
284     public void setReferenceNumber(String referenceNumber) {
285         this.referenceNumber = referenceNumber;
286     }
287 
288     /**
289      * @return String
290      */
291     public String getReferenceOriginCode() {
292         return referenceOriginCode;
293     }
294 
295     /**
296      * @param referenceOriginCode
297      */
298     public void setReferenceOriginCode(String referenceOriginCode) {
299         this.referenceOriginCode = referenceOriginCode;
300     }
301 
302     /**
303      * @return String
304      */
305     public String getReferenceTypeCode() {
306         return referenceTypeCode;
307     }
308 
309     /**
310      * @param referenceTypeCode
311      */
312     public void setReferenceTypeCode(String referenceTypeCode) {
313         this.referenceTypeCode = referenceTypeCode;
314     }
315 
316     /**
317      * @return String
318      */
319     public String getSubAccountNumber() {
320         return subAccountNumber;
321     }
322 
323     /**
324      * @param subAccountNumber
325      */
326     public void setSubAccountNumber(String subAccountNumber) {
327         this.subAccountNumber = subAccountNumber;
328     }
329 
330     /**
331      * @return String
332      */
333     public String getBalanceInquiryReportMenuCallerDocFormKey() {
334         return balanceInquiryReportMenuCallerDocFormKey;
335     }
336 
337     /**
338      * @param balanceInquiryReportMenuCallerDocFormKey
339      */
340     public void setBalanceInquiryReportMenuCallerDocFormKey(String balanceInquiryReportMenuCallerDocFormKey) {
341         this.balanceInquiryReportMenuCallerDocFormKey = balanceInquiryReportMenuCallerDocFormKey;
342     }
343 
344     /**
345      * Gets the universityFiscalYear attribute. 
346      * @return Returns the universityFiscalYear.
347      */
348     public String getUniversityFiscalYear() {
349         return universityFiscalYear;
350     }
351 
352     /**
353      * Sets the universityFiscalYear attribute value.
354      * @param universityFiscalYear The universityFiscalYear to set.
355      */
356     public void setUniversityFiscalYear(String universityFiscalYear) {
357         this.universityFiscalYear = universityFiscalYear;
358     }
359 }