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 */ 016 017package org.kuali.ole.fp.businessobject; 018 019import static org.kuali.ole.sys.OLEPropertyConstants.ACCOUNT_NUMBER; 020import static org.kuali.ole.sys.OLEPropertyConstants.AMOUNT; 021import static org.kuali.ole.sys.OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE; 022import static org.kuali.ole.sys.OLEPropertyConstants.FINANCIAL_OBJECT_CODE; 023import static org.kuali.ole.sys.OLEPropertyConstants.FINANCIAL_SUB_OBJECT_CODE; 024import static org.kuali.ole.sys.OLEPropertyConstants.ORGANIZATION_REFERENCE_ID; 025import static org.kuali.ole.sys.OLEPropertyConstants.PROJECT_CODE; 026import static org.kuali.ole.sys.OLEPropertyConstants.REFERENCE_NUMBER; 027import static org.kuali.ole.sys.OLEPropertyConstants.SUB_ACCOUNT_NUMBER; 028 029import org.kuali.ole.sys.businessobject.AccountingLineParserBase; 030 031 032/** 033 * This class represents a <code>PreEncumbranceDocument</code> accounting line parser. 034 * 035 * @see org.kuali.ole.fp.document.PreEncumbranceDocument 036 */ 037public class PreEncumbranceDocumentAccountingLineParser extends AccountingLineParserBase { 038 protected static final String[] PE_SOURCE_FORMAT = { CHART_OF_ACCOUNTS_CODE, ACCOUNT_NUMBER, SUB_ACCOUNT_NUMBER, FINANCIAL_OBJECT_CODE, FINANCIAL_SUB_OBJECT_CODE, PROJECT_CODE, ORGANIZATION_REFERENCE_ID, AMOUNT }; 039 protected static final String[] PE_TARGET_FORMAT = { CHART_OF_ACCOUNTS_CODE, ACCOUNT_NUMBER, SUB_ACCOUNT_NUMBER, FINANCIAL_OBJECT_CODE, FINANCIAL_SUB_OBJECT_CODE, PROJECT_CODE, ORGANIZATION_REFERENCE_ID, REFERENCE_NUMBER, AMOUNT }; 040 041 /** 042 * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getSourceAccountingLineFormat() 043 */ 044 @Override 045 public String[] getSourceAccountingLineFormat() { 046 return removeChartFromFormatIfNeeded(PE_SOURCE_FORMAT); 047 } 048 049 /** 050 * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getTargetAccountingLineFormat() 051 */ 052 @Override 053 public String[] getTargetAccountingLineFormat() { 054 return removeChartFromFormatIfNeeded(PE_TARGET_FORMAT); 055 } 056 057}