View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  package org.kuali.kfs.fp.businessobject;
21  
22  import static org.kuali.kfs.sys.KFSPropertyConstants.ACCOUNT_NUMBER;
23  import static org.kuali.kfs.sys.KFSPropertyConstants.AMOUNT;
24  import static org.kuali.kfs.sys.KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE;
25  import static org.kuali.kfs.sys.KFSPropertyConstants.FINANCIAL_DOCUMENT_LINE_DESCRIPTION;
26  import static org.kuali.kfs.sys.KFSPropertyConstants.FINANCIAL_OBJECT_CODE;
27  import static org.kuali.kfs.sys.KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE;
28  import static org.kuali.kfs.sys.KFSPropertyConstants.ORGANIZATION_REFERENCE_ID;
29  import static org.kuali.kfs.sys.KFSPropertyConstants.PROJECT_CODE;
30  import static org.kuali.kfs.sys.KFSPropertyConstants.REFERENCE_NUMBER;
31  import static org.kuali.kfs.sys.KFSPropertyConstants.SUB_ACCOUNT_NUMBER;
32  
33  import org.kuali.kfs.sys.businessobject.AccountingLineParserBase;
34  
35  
36  /**
37   * This class represents a <code>PreEncumbranceDocument</code> accounting line parser.
38   *
39   * @see org.kuali.kfs.fp.document.PreEncumbranceDocument
40   */
41  public class PreEncumbranceDocumentAccountingLineParser extends AccountingLineParserBase {
42      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, FINANCIAL_DOCUMENT_LINE_DESCRIPTION, AMOUNT };
43      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 };
44  
45      /**
46       * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getSourceAccountingLineFormat()
47       */
48      @Override
49      public String[] getSourceAccountingLineFormat() {
50          return removeChartFromFormatIfNeeded(PE_SOURCE_FORMAT);
51      }
52  
53      /**
54       * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getTargetAccountingLineFormat()
55       */
56      @Override
57      public String[] getTargetAccountingLineFormat() {
58          return removeChartFromFormatIfNeeded(PE_TARGET_FORMAT);
59      }
60  
61  }