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 package org.kuali.kfs.gl.service; 20 21 import java.io.BufferedOutputStream; 22 import java.io.BufferedReader; 23 import java.io.PrintStream; 24 import java.util.Collection; 25 import java.util.Iterator; 26 import java.util.List; 27 import java.util.Map; 28 29 import org.kuali.kfs.gl.businessobject.LedgerEntryHolder; 30 import org.kuali.kfs.gl.businessobject.OriginEntryFull; 31 import org.kuali.kfs.gl.businessobject.PosterOutputSummaryEntry; 32 33 /** 34 * An interface of methods to interact with Origin Entries 35 */ 36 public interface OriginEntryService { 37 38 public void createEntry(OriginEntryFull originEntry, PrintStream ps); 39 40 /** 41 * writes out a list of origin entries to an output stream. 42 * 43 * @param entries an Iterator of entries to save as text 44 * @param bw the output stream to write origin entries to 45 */ 46 public void flatFile(Iterator<OriginEntryFull> entries, BufferedOutputStream bw); 47 48 /** 49 * get the summarized information of the entries that belong to the entry groups with the given group id list 50 * 51 * @param groupIdList the origin entry groups 52 * @return a set of summarized information of the entries within the specified group 53 */ 54 public LedgerEntryHolder getSummaryByGroupId(Collection groupIdList); 55 56 /** 57 * get the summarized information of poster input entries that belong to the entry groups with the given group id list 58 * 59 * @param groupIdList the origin entry groups 60 * @return a map of summarized information of poster input entries within the specified groups 61 */ 62 public Map<String, PosterOutputSummaryEntry> getPosterOutputSummaryByGroupId(Collection groupIdList); 63 64 public Integer getGroupCount(String groupId); 65 66 public Map getEntriesByBufferedReader(BufferedReader inputBufferedReader, List<OriginEntryFull> originEntryList); 67 68 public Map getEntriesByGroupIdWithPath(String fileNameWithPath, List<OriginEntryFull> originEntryList); 69 }