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.util.Comparator; 019 import java.util.Map; 020 021 import org.kuali.kfs.gl.businessobject.OriginEntryInformation; 022 import org.kuali.kfs.gl.businessobject.PosterOutputSummaryAmountHolder; 023 import org.kuali.kfs.gl.businessobject.PosterOutputSummaryEntry; 024 import org.kuali.kfs.gl.businessobject.Transaction; 025 026 /** 027 * Interface for service methods which support the poster output summary report 028 */ 029 public interface PosterOutputSummaryService { 030 /** 031 * adds a transaction amount to a given poster output summary amount holder 032 * @param t the transaction with an amount to add 033 * @param amountHolder the amount holder to add the amount to 034 */ 035 public abstract void addAmountToAmountHolder(Transaction t, PosterOutputSummaryAmountHolder amountHolder); 036 037 /** 038 * adds an origin entry amount to a given poster output summary amount holder 039 * @param oe the origin entry with an amount to add 040 * @param amountHolder the amount holder to add the amount to 041 */ 042 public abstract void addAmountToAmountHolder(OriginEntryInformation oe, PosterOutputSummaryAmountHolder amountHolder); 043 044 /** 045 * Returns an instance of the comparator to use when sorting poster output summary entries 046 * @return an instance of a good comparator 047 */ 048 public abstract Comparator<PosterOutputSummaryEntry> getEntryComparator(); 049 050 /** 051 * Summarizes the given transaction to the map 052 * @param transaction the transaction to summarize 053 * @param entries the map of entries 054 */ 055 public abstract void summarize(Transaction transaction, Map<String, PosterOutputSummaryEntry> entries); 056 057 /** 058 * Summarizes the given origin entry to the map 059 * @param originEntry the origin entry to summarize 060 * @param entries the map of entries that holds all summarizations 061 */ 062 public abstract void summarize(OriginEntryInformation originEntry, Map<String, PosterOutputSummaryEntry> entries); 063 064 }