001 /*
002 * Copyright 2011 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 */
016 package org.kuali.kfs.gl.businessobject;
017
018 import java.util.HashMap;
019 import java.util.List;
020 import java.util.Map;
021
022 import org.kuali.kfs.sys.KFSPropertyConstants;
023 import org.kuali.kfs.sys.businessobject.BusinessObjectStringParserFieldUtils;
024 import org.kuali.kfs.sys.context.SpringContext;
025 import org.kuali.rice.kns.bo.BusinessObject;
026 import org.kuali.rice.kns.datadictionary.AttributeDefinition;
027 import org.kuali.rice.kns.service.DataDictionaryService;
028
029 /**
030 * This class has utility methods for parsing OriginEntries from Strings
031 */
032 public class OriginEntryFieldUtil extends BusinessObjectStringParserFieldUtils {
033
034 /**
035 * Returns the class to parse into - OriginEntryFull
036 * @see org.kuali.kfs.sys.businessobject.BusinessObjectStringParserFieldUtils#getBusinessObjectClass()
037 */
038 @Override
039 public Class<? extends BusinessObject> getBusinessObjectClass() {
040 return OriginEntryFull.class;
041 }
042
043 /**
044 * Returns the fields to be parsed from a String, in order, to form an OriginEntryFull
045 * @see org.kuali.kfs.sys.businessobject.BusinessObjectStringParserFieldUtils#getOrderedProperties()
046 */
047 @Override
048 public String[] getOrderedProperties() {
049 return new String[] {
050 KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR,
051 KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE,
052 KFSPropertyConstants.ACCOUNT_NUMBER,
053 KFSPropertyConstants.SUB_ACCOUNT_NUMBER,
054 KFSPropertyConstants.FINANCIAL_OBJECT_CODE,
055 KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE,
056 KFSPropertyConstants.FINANCIAL_BALANCE_TYPE_CODE,
057 KFSPropertyConstants.FINANCIAL_OBJECT_TYPE_CODE,
058 KFSPropertyConstants.UNIVERSITY_FISCAL_PERIOD_CODE,
059 KFSPropertyConstants.FINANCIAL_DOCUMENT_TYPE_CODE,
060 KFSPropertyConstants.FINANCIAL_SYSTEM_ORIGINATION_CODE,
061 KFSPropertyConstants.DOCUMENT_NUMBER,
062 KFSPropertyConstants.TRANSACTION_ENTRY_SEQUENCE_NUMBER,
063 KFSPropertyConstants.TRANSACTION_LEDGER_ENTRY_DESC,
064 KFSPropertyConstants.TRANSACTION_LEDGER_ENTRY_AMOUNT,
065 KFSPropertyConstants.TRANSACTION_DEBIT_CREDIT_CODE,
066 KFSPropertyConstants.TRANSACTION_DATE,
067 KFSPropertyConstants.ORGANIZATION_DOCUMENT_NUMBER,
068 KFSPropertyConstants.PROJECT_CODE,
069 KFSPropertyConstants.ORGANIZATION_REFERENCE_ID,
070 KFSPropertyConstants.REFERENCE_FIN_DOCUMENT_TYPE_CODE,
071 KFSPropertyConstants.FIN_SYSTEM_REF_ORIGINATION_CODE,
072 KFSPropertyConstants.FINANCIAL_DOCUMENT_REFERENCE_NBR,
073 KFSPropertyConstants.FINANCIAL_DOCUMENT_REVERSAL_DATE,
074 KFSPropertyConstants.TRANSACTION_ENCUMBRANCE_UPDT_CD
075 };
076 }
077 }