View Javadoc
1   /*
2    * Copyright 2006 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.ole.fp.businessobject;
18  
19  import static org.kuali.ole.sys.OLEPropertyConstants.ACCOUNT_NUMBER;
20  import static org.kuali.ole.sys.OLEPropertyConstants.AMOUNT;
21  import static org.kuali.ole.sys.OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE;
22  import static org.kuali.ole.sys.OLEPropertyConstants.FINANCIAL_DOCUMENT_LINE_DESCRIPTION;
23  import static org.kuali.ole.sys.OLEPropertyConstants.FINANCIAL_OBJECT_CODE;
24  import static org.kuali.ole.sys.OLEPropertyConstants.FINANCIAL_SUB_OBJECT_CODE;
25  import static org.kuali.ole.sys.OLEPropertyConstants.ORGANIZATION_REFERENCE_ID;
26  import static org.kuali.ole.sys.OLEPropertyConstants.PROJECT_CODE;
27  import static org.kuali.ole.sys.OLEPropertyConstants.REFERENCE_NUMBER;
28  import static org.kuali.ole.sys.OLEPropertyConstants.REFERENCE_ORIGIN_CODE;
29  import static org.kuali.ole.sys.OLEPropertyConstants.SUB_ACCOUNT_NUMBER;
30  
31  import org.kuali.ole.sys.businessobject.AccountingLineParserBase;
32  
33  
34  /**
35   * This class represents a <code>GeneralErrorCorrectionDocument</code> accounting line parser.
36   * 
37   * @see org.kuali.ole.fp.document.GeneralErrorCorrectionDocument
38   */
39  public class GeneralErrorCorrectionDocumentAccountingLineParser extends AccountingLineParserBase {
40      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 };
41  
42      /**
43       * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getSourceAccountingLineFormat()
44       */
45      @Override
46      public String[] getSourceAccountingLineFormat() {
47          return removeChartFromFormatIfNeeded(GEC_FORMAT);
48      }
49  
50      /**
51       * @see org.kuali.rice.krad.bo.AccountingLineParserBase#getTargetAccountingLineFormat()
52       */
53      @Override
54      public String[] getTargetAccountingLineFormat() {
55          return removeChartFromFormatIfNeeded(GEC_FORMAT);
56      }
57  
58  }