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.batch; 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 CollectorBatch from Strings for trailer record 031 */ 032 public class CollectorBatchTrailerRecordFieldUtil extends BusinessObjectStringParserFieldUtils { 033 034 /** 035 * Returns the class to parse into - CollectorBatch 036 * @see org.kuali.kfs.sys.businessobject.BusinessObjectStringParserFieldUtils#getBusinessObjectClass() 037 */ 038 @Override 039 public Class<? extends BusinessObject> getBusinessObjectClass() { 040 return CollectorBatch.class; 041 } 042 043 /** 044 * Returns the fields to be parsed from a String, in order, to form a CollectorBatch 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.ORGANIZATION_CODE, 053 KFSPropertyConstants.TRANSMISSION_DATE, 054 KFSPropertyConstants.COLLECTOR_BATCH_RECORD_TYPE, 055 KFSPropertyConstants.TRAILER_RECORD_FIRST_EMPTY_FIELD, 056 KFSPropertyConstants.TOTAL_RECORDS, 057 KFSPropertyConstants.TRAILER_RECORD_SECOND_EMPTY_FIELD, 058 KFSPropertyConstants.TOTAL_AMOUNT 059 }; 060 } 061 }