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 header from Strings 031 */ 032 public class CollectorBatchHeaderFieldUtil 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.BATCH_SEQUENCE_NUMBER, 056 KFSPropertyConstants.KUALI_USER_PERSON_EMAIL_ADDRESS, 057 KFSPropertyConstants.COLLECTOR_BATCH_PERSON_USER_ID, 058 KFSPropertyConstants.DEPARTMENT_NAME, 059 KFSPropertyConstants.MAILING_ADDRESS, 060 KFSPropertyConstants.CAMPUS_CODE, 061 KFSPropertyConstants.PHONE_NUMBER 062 }; 063 } 064 }