1 /* 2 * Copyright 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 17 package org.kuali.ole.fp.document.service; 18 19 import java.io.OutputStream; 20 21 import org.kuali.ole.fp.document.CashReceiptDocument; 22 23 24 /** 25 * Service for handling creation of the cover sheet of the <code>{@link CashReceiptDocument}</code> 26 * 27 */ 28 public interface CashReceiptCoverSheetService { 29 30 /** 31 * This method determines whether or not cover sheet printing is allowed for the provided cash receipt document. 32 * 33 * @param crDoc The document that the cover sheet will be printed for. 34 * @return True if coverSheet printing is allowed for the given CashReceiptDocument, false otherwise. 35 */ 36 public boolean isCoverSheetPrintingAllowed(CashReceiptDocument crDoc); 37 38 39 /** 40 * Generate a cover sheet for the <code>{@link CashReceiptDocument}</code>. An <code>{@link OutputStream}</code> is written 41 * to for the coversheet. 42 * 43 * @param document The <code>{@link CashReceiptDocument}</code> the cover sheet is being generated for. 44 * @param searchPath A directory path used to identify the path to the template that will be used for creating this cover sheet. 45 * @param OutputStream The output stream that the printable cover sheet will be piped to. 46 * @exception Exception Thrown if there are any problems generating the cover sheet. 47 */ 48 public void generateCoverSheet(CashReceiptDocument document, String searchPath, OutputStream outputStream) throws Exception; 49 }