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