View Javadoc
1   /*
2    * Copyright 2006 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.gl;
17  
18  
19  /**
20   * This class contains the constants being used by various general ledger components
21   */
22  public final class Constant {
23      public static final String EMPTY_STRING = "";
24  
25      public static final String PENDING_ENTRY_OPTION = "dummyBusinessObject.pendingEntryOption";
26      public static final String APPROVED_PENDING_ENTRY = "Approved";
27      public static final String ALL_PENDING_ENTRY = "All";
28      public static final String NO_PENDING_ENTRY = "No";
29  
30      public static final String CONSOLIDATION_OPTION = "dummyBusinessObject.consolidationOption";
31      public static final String CONSOLIDATION = "Consolidation";
32      public static final String DETAIL = "Detail";
33      public static final String EXCLUDE_SUBACCOUNTS = "Exclude Sub-Accounts";
34  
35      public static final String AMOUNT_VIEW_OPTION = "dummyBusinessObject.amountViewOption";
36      public static final String MONTHLY = "Monthly";
37      public static final String ACCUMULATE = "Accumulate";
38      
39      public static final String BLANK_LINE_OPTION = "dummyBusinessObject.blankLineOption";
40      public static final String SHOW_BLANK_LINE = "Yes";
41      public static final String NOT_SHOW_BLANK_LINE = "No";
42  
43      public static final String COST_SHARE_OPTION = "dummyBusinessObject.costShareOption";
44      public static final String COST_SHARE_EXCLUDE = "Exclude";
45      public static final String COST_SHARE_INCLUDE = "Include";
46  
47      public static final String DEBIT_CREDIT_OPTION = "dummyBusinessObject.debitCreditOption";
48      public static final String DEBIT_CREDIT_INCLUDE = "Include";
49      public static final String DEBIT_CREDIT_EXCLUDE = "Exclude";
50      
51      public static final String ZERO_ENCUMBRANCE_OPTION = "dummyBusinessObject.zeroEncumbranceOption";
52      public static final String ZERO_ENCUMBRANCE_INCLUDE = "Include";
53      public static final String ZERO_ENCUMBRANCE_EXCLUDE = "Exclude";
54  
55      public static final String SUB_ACCOUNT_OPTION = "subAccountNumber";
56  
57      public static final String DOCUMENT_APPROVED_CODE_APPROVED = "A";
58      public static final String DOCUMENT_APPROVED_CODE_PENDING = "N";
59      public static final String DOCUMENT_APPROVED_CODE_PROCESSED = "X";
60  
61      public static final String BALANCE_TYPE_PE = "PE";
62      public static final String BALANCE_TYPE_CB = "CB";
63  
64      public static final String CONSOLIDATED_SUB_ACCOUNT_NUMBER = "*ALL*";
65      public static final String CONSOLIDATED_SUB_OBJECT_CODE = "*ALL*";
66      public static final String CONSOLIDATED_OBJECT_TYPE_CODE = "*ALL*";
67  
68      public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE = "glAccountBalanceLookupable";
69      public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_CONSOLIDATION = "glAccountBalanceByConsolidationLookupable";
70      public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_LEVEL = "glAccountBalanceByLevelLookupable";
71      public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_OBJECT = "glAccountBalanceByObjectLookupable";
72      public static final String GL_LOOKUPABLE_BALANCE = "glBalanceLookupable";
73      public static final String GL_LOOKUPABLE_CASH_BALANCE = "glCashBalanceLookupable";
74      public static final String GL_LOOKUPABLE_ENCUMBRANCE = "glEncumbranceLookupable";
75      public static final String GL_LOOKUPABLE_ENTRY = "glEntryLookupable";
76      public static final String GL_LOOKUPABLE_PENDING_ENTRY = "glPendingEntryLookupable";
77  
78      public static final String RETURN_LOCATION_VALUE = "portal.do";
79      public static final String LOOKUP_BUTTON_VALUE = "Drill Down";
80  
81      public static final String TOTAL_ACCOUNT_BALANCE_INCOME = "Income";
82      public static final String TOTAL_ACCOUNT_BALANCE_EXPENSE_GROSS = "Expense (Gross)";
83      public static final String TOTAL_ACCOUNT_BALANCE_EXPENSE_IN = "Expense (Net Transfer In)";
84      public static final String TOTAL_ACCOUNT_BALANCE_AVAILABLE = "Avaliable Balance";
85  
86      public static final String SEARCH_RESULTS = "searchResults";
87      
88      public enum DocumentApprovedCode{
89          APPROVED(DOCUMENT_APPROVED_CODE_APPROVED, "APPROVED"), PENDING(DOCUMENT_APPROVED_CODE_PENDING, "PENDING"), PROCESSED(DOCUMENT_APPROVED_CODE_PROCESSED, "PROCESSED");
90          
91          public String code;
92          public String description;
93          private DocumentApprovedCode(String code, String description) {
94              this.code = code;
95              this.description = description;
96          }
97          
98          public static String getDescription(String code) {
99              for(DocumentApprovedCode approvedCode : DocumentApprovedCode.values()) {
100                 if(approvedCode.code.equals(code)) {
101                     return approvedCode.description;
102                 }
103             }
104             
105             return null;
106         }
107     }
108 }