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.gl.service;
017    
018    import java.io.BufferedOutputStream;
019    import java.io.BufferedReader;
020    import java.io.IOException;
021    import java.io.PrintStream;
022    import java.sql.Date;
023    import java.util.Collection;
024    import java.util.Iterator;
025    import java.util.List;
026    import java.util.Map;
027    
028    import org.kuali.kfs.gl.businessobject.LedgerEntryHolder;
029    import org.kuali.kfs.gl.businessobject.OriginEntryFull;
030    import org.kuali.kfs.gl.businessobject.OriginEntryGroup;
031    import org.kuali.kfs.gl.businessobject.OriginEntryStatistics;
032    import org.kuali.kfs.gl.businessobject.PosterOutputSummaryEntry;
033    import org.kuali.kfs.gl.businessobject.Transaction;
034    import org.kuali.kfs.sys.Message;
035    
036    /**
037     * An interface of methods to interact with Origin Entries
038     */
039    public interface OriginEntryService {
040        
041        public void createEntry(OriginEntryFull originEntry, PrintStream ps);
042    
043        /**
044         * writes out a list of origin entries to an output stream.
045         * 
046         * @param entries an Iterator of entries to save as text
047         * @param bw the output stream to write origin entries to
048         */
049        public void flatFile(Iterator<OriginEntryFull> entries, BufferedOutputStream bw);
050    
051        /**
052         * get the summarized information of the entries that belong to the entry groups with the given group id list
053         * 
054         * @param groupIdList the origin entry groups
055         * @return a set of summarized information of the entries within the specified group
056         */
057        public LedgerEntryHolder getSummaryByGroupId(Collection groupIdList);
058        
059        /**
060         * get the summarized information of poster input entries that belong to the entry groups with the given group id list
061         * 
062         * @param groupIdList the origin entry groups
063         * @return a map of summarized information of poster input entries within the specified groups
064         */
065        public Map<String, PosterOutputSummaryEntry> getPosterOutputSummaryByGroupId(Collection groupIdList);
066    
067        public Integer getGroupCount(String groupId);
068        
069        public Map getEntriesByBufferedReader(BufferedReader inputBufferedReader, List<OriginEntryFull> originEntryList);
070        
071        public  Map getEntriesByGroupIdWithPath(String fileNameWithPath, List<OriginEntryFull> originEntryList);
072    }