1 /*
2 * Copyright 2009 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.util.Comparator;
19 import java.util.Map;
20
21 import org.kuali.ole.gl.businessobject.OriginEntryInformation;
22 import org.kuali.ole.gl.businessobject.PosterOutputSummaryAmountHolder;
23 import org.kuali.ole.gl.businessobject.PosterOutputSummaryEntry;
24 import org.kuali.ole.gl.businessobject.Transaction;
25
26 /**
27 * Interface for service methods which support the poster output summary report
28 */
29 public interface PosterOutputSummaryService {
30 /**
31 * adds a transaction amount to a given poster output summary amount holder
32 * @param t the transaction with an amount to add
33 * @param amountHolder the amount holder to add the amount to
34 */
35 public abstract void addAmountToAmountHolder(Transaction t, PosterOutputSummaryAmountHolder amountHolder);
36
37 /**
38 * adds an origin entry amount to a given poster output summary amount holder
39 * @param oe the origin entry with an amount to add
40 * @param amountHolder the amount holder to add the amount to
41 */
42 public abstract void addAmountToAmountHolder(OriginEntryInformation oe, PosterOutputSummaryAmountHolder amountHolder);
43
44 /**
45 * Returns an instance of the comparator to use when sorting poster output summary entries
46 * @return an instance of a good comparator
47 */
48 public abstract Comparator<PosterOutputSummaryEntry> getEntryComparator();
49
50 /**
51 * Summarizes the given transaction to the map
52 * @param transaction the transaction to summarize
53 * @param entries the map of entries
54 */
55 public abstract void summarize(Transaction transaction, Map<String, PosterOutputSummaryEntry> entries);
56
57 /**
58 * Summarizes the given origin entry to the map
59 * @param originEntry the origin entry to summarize
60 * @param entries the map of entries that holds all summarizations
61 */
62 public abstract void summarize(OriginEntryInformation originEntry, Map<String, PosterOutputSummaryEntry> entries);
63
64 }