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    package org.kuali.kfs.module.endow.util;
017    
018    import java.util.List;
019    
020    import org.apache.struts.upload.FormFile;
021    import org.kuali.kfs.module.endow.businessobject.EndowmentTransactionLine;
022    
023    /**
024     * Defines an abstraction for parsing serialized <code>PurApItem</code> lines.
025     */
026    public interface LineParser {
027    
028        /**
029         * Parses the items from the specified import file line by line,
030         * and generates items of the specified type from the parsed data.
031         * 
032         * @param itemFile the input file from which items are parsed
033         * @param itemClass a subclass of PurApItem, of which new items shall be generated
034         * @param documentNumber the number of the docment that contains the items to be imported
035         * @return a list of items of a subclass of PurApItem.
036         */
037        public List<EndowmentTransactionLine> importLines( FormFile lineFile, Class<? extends EndowmentTransactionLine> lineClass, String documentNumber ) throws Exception;
038    
039    }
040