001/*
002 * Copyright 2006 The Kuali Foundation
003 * 
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * 
008 * http://www.opensource.org/licenses/ecl2.php
009 * 
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.ole.gl;
017
018
019/**
020 * This class contains the constants being used by various general ledger components
021 */
022public final class Constant {
023    public static final String EMPTY_STRING = "";
024
025    public static final String PENDING_ENTRY_OPTION = "dummyBusinessObject.pendingEntryOption";
026    public static final String APPROVED_PENDING_ENTRY = "Approved";
027    public static final String ALL_PENDING_ENTRY = "All";
028    public static final String NO_PENDING_ENTRY = "No";
029
030    public static final String CONSOLIDATION_OPTION = "dummyBusinessObject.consolidationOption";
031    public static final String CONSOLIDATION = "Consolidation";
032    public static final String DETAIL = "Detail";
033    public static final String EXCLUDE_SUBACCOUNTS = "Exclude Sub-Accounts";
034
035    public static final String AMOUNT_VIEW_OPTION = "dummyBusinessObject.amountViewOption";
036    public static final String MONTHLY = "Monthly";
037    public static final String ACCUMULATE = "Accumulate";
038    
039    public static final String BLANK_LINE_OPTION = "dummyBusinessObject.blankLineOption";
040    public static final String SHOW_BLANK_LINE = "Yes";
041    public static final String NOT_SHOW_BLANK_LINE = "No";
042
043    public static final String COST_SHARE_OPTION = "dummyBusinessObject.costShareOption";
044    public static final String COST_SHARE_EXCLUDE = "Exclude";
045    public static final String COST_SHARE_INCLUDE = "Include";
046
047    public static final String DEBIT_CREDIT_OPTION = "dummyBusinessObject.debitCreditOption";
048    public static final String DEBIT_CREDIT_INCLUDE = "Include";
049    public static final String DEBIT_CREDIT_EXCLUDE = "Exclude";
050    
051    public static final String ZERO_ENCUMBRANCE_OPTION = "dummyBusinessObject.zeroEncumbranceOption";
052    public static final String ZERO_ENCUMBRANCE_INCLUDE = "Include";
053    public static final String ZERO_ENCUMBRANCE_EXCLUDE = "Exclude";
054
055    public static final String SUB_ACCOUNT_OPTION = "subAccountNumber";
056
057    public static final String DOCUMENT_APPROVED_CODE_APPROVED = "A";
058    public static final String DOCUMENT_APPROVED_CODE_PENDING = "N";
059    public static final String DOCUMENT_APPROVED_CODE_PROCESSED = "X";
060
061    public static final String BALANCE_TYPE_PE = "PE";
062    public static final String BALANCE_TYPE_CB = "CB";
063
064    public static final String CONSOLIDATED_SUB_ACCOUNT_NUMBER = "*ALL*";
065    public static final String CONSOLIDATED_SUB_OBJECT_CODE = "*ALL*";
066    public static final String CONSOLIDATED_OBJECT_TYPE_CODE = "*ALL*";
067
068    public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE = "glAccountBalanceLookupable";
069    public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_CONSOLIDATION = "glAccountBalanceByConsolidationLookupable";
070    public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_LEVEL = "glAccountBalanceByLevelLookupable";
071    public static final String GL_LOOKUPABLE_ACCOUNT_BALANCE_BY_OBJECT = "glAccountBalanceByObjectLookupable";
072    public static final String GL_LOOKUPABLE_BALANCE = "glBalanceLookupable";
073    public static final String GL_LOOKUPABLE_CASH_BALANCE = "glCashBalanceLookupable";
074    public static final String GL_LOOKUPABLE_ENCUMBRANCE = "glEncumbranceLookupable";
075    public static final String GL_LOOKUPABLE_ENTRY = "glEntryLookupable";
076    public static final String GL_LOOKUPABLE_PENDING_ENTRY = "glPendingEntryLookupable";
077
078    public static final String RETURN_LOCATION_VALUE = "portal.do";
079    public static final String LOOKUP_BUTTON_VALUE = "Drill Down";
080
081    public static final String TOTAL_ACCOUNT_BALANCE_INCOME = "Income";
082    public static final String TOTAL_ACCOUNT_BALANCE_EXPENSE_GROSS = "Expense (Gross)";
083    public static final String TOTAL_ACCOUNT_BALANCE_EXPENSE_IN = "Expense (Net Transfer In)";
084    public static final String TOTAL_ACCOUNT_BALANCE_AVAILABLE = "Avaliable Balance";
085
086    public static final String SEARCH_RESULTS = "searchResults";
087    
088    public enum DocumentApprovedCode{
089        APPROVED(DOCUMENT_APPROVED_CODE_APPROVED, "APPROVED"), PENDING(DOCUMENT_APPROVED_CODE_PENDING, "PENDING"), PROCESSED(DOCUMENT_APPROVED_CODE_PROCESSED, "PROCESSED");
090        
091        public String code;
092        public String description;
093        private DocumentApprovedCode(String code, String description) {
094            this.code = code;
095            this.description = description;
096        }
097        
098        public static String getDescription(String code) {
099            for(DocumentApprovedCode approvedCode : DocumentApprovedCode.values()) {
100                if(approvedCode.code.equals(code)) {
101                    return approvedCode.description;
102                }
103            }
104            
105            return null;
106        }
107    }
108}