/*
 * Copyright 2010 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.kfs.module.endow.businessobject;

import java.io.InputStream;
import java.util.List;

import org.kuali.kfs.module.endow.document.EndowmentTransactionLinesDocument;

// Bonnie: refer to AccountingLineParser
/**
 * Defines an abstraction for parsing serialized <code>EndowmentTransactionLine</code>
 */
public interface EndowmentTransactionLineParser {
    /**
     * @return <code>SourceTransactionLine</code> attribute format
     */
    public String[] getSourceTransactionLineFormat();

    /**
     * @return <code>TargetTransactionLine</code> attribute format
     */
    public String[] getTargetTransactionLineFormat();

    /**
     * @param transactionLineClass
     * @return String representation of the <code>String[]</code> attribute format with each attribute separated by a comma.
     */
    public String getExpectedTransactionLineFormatAsString(Class<? extends EndowmentTransactionLine> transactionLineClass);

    /**
     * parses a comma deliminated string into an <code>SourceAccountingLine</code> by populating the attributes found in the
     * getSourceAccountingLineFormat()
     * 
     * @param transactionalDocument
     * @param sourceTransactionLineString
     * @return EndowmentSourceTransactionLine
     */
    public EndowmentSourceTransactionLine parseSourceTransactionLine(EndowmentTransactionLinesDocument transactionalDocument, String sourceTransactionLineString);

    /**
     * parses a comma deliminated string into an <code>TargetAccountingLine</code> by populating the attributes found in the
     * getTargetAccountingLineFormat()
     * 
     * @param transactionalDocument
     * @param targetTransactionLineString
     * @return EndowmentTargetTransactionLine
     */
    public EndowmentTargetTransactionLine parseTargetAccountingLine(EndowmentTransactionLinesDocument transactionalDocument, String targetTransactionLineString);

    /**
     * generates a list of <code>SourceTransactionLine</code> from the inputStream
     * 
     * @param stream
     * @param document
     * @return List containing <code>EndowmentSourceTransactionLine</code>s
     */
    public List importEndowmentSourceTransactionLines(String fileName, InputStream stream, EndowmentTransactionLinesDocument document);

    /**
     * generates a list of <code>EndowmentTargetTransactionLine</code> from the inputStream
     * 
     * @param stream
     * @param document
     * @return List containing <code>EndowmentTargetTransactionLine</code>s
     */
    public List importEndowmentTargetTransactionLines(String fileName, InputStream stream, EndowmentTransactionLinesDocument document);

}

@@ -1033,22 +1033,25 @@
 @return 
-%3Ccode%3E
+Endowment
 SourceTr
@@ -1055,39 +1055,32 @@
 eTransactionLine
-%3C/code%3E
  attribute forma
@@ -1172,22 +1172,25 @@
 @return 
-%3Ccode%3E
+Endowment
 TargetTr
@@ -1202,23 +1202,16 @@
 tionLine
-%3C/code%3E
  attribu
@@ -1656,41 +1656,38 @@
  an 
-%3Ccode%3ESourceAccountingLine%3C/code%3E
+EndowmentSourceTransactionLine
  by 
@@ -1742,26 +1742,27 @@
 etSource
-Accounting
+Transaction
 LineForm
@@ -2136,22 +2136,25 @@
 into an 
-%3Ccode%3E
+Endowment
 TargetAc
@@ -2165,23 +2165,16 @@
 tingLine
-%3C/code%3E
  by popu
@@ -2221,34 +2221,35 @@
  * getTarget
-Accounting
+Transaction
 LineFormat()
@@ -2596,22 +2596,25 @@
 list of 
-%3Ccode%3E
+Endowment
 SourceTr
@@ -2618,39 +2618,32 @@
 eTransactionLine
-%3C/code%3E
  from the inputS
@@ -2727,38 +2727,32 @@
 List containing 
-%3Ccode%3E
 EndowmentSourceT
@@ -2761,32 +2761,24 @@
 nsactionLine
-%3C/code%3Es
 %0D%0A     */%0D%0A 
@@ -2951,22 +2951,16 @@
 list of 
-%3Ccode%3E
 Endowmen
@@ -2981,23 +2981,16 @@
 tionLine
-%3C/code%3E
  from th
@@ -3090,22 +3090,16 @@
 taining 
-%3Ccode%3E
 Endowmen
@@ -3124,16 +3124,8 @@
 Line
-%3C/code%3Es
 %0D%0A  

fix build failed problem