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