001/*
002 * Copyright 2006 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
017package org.kuali.ole.fp.document.service;
018
019import java.io.OutputStream;
020
021import org.kuali.ole.fp.document.CashReceiptDocument;
022
023
024/**
025 * Service for handling creation of the cover sheet of the <code>{@link CashReceiptDocument}</code>
026 * 
027 */
028public interface CashReceiptCoverSheetService {
029
030    /**
031     * This method determines whether or not cover sheet printing is allowed for the provided cash receipt document.
032     * 
033     * @param crDoc The document that the cover sheet will be printed for.
034     * @return True if coverSheet printing is allowed for the given CashReceiptDocument, false otherwise.
035     */
036    public boolean isCoverSheetPrintingAllowed(CashReceiptDocument crDoc);
037
038
039    /**
040     * Generate a cover sheet for the <code>{@link CashReceiptDocument}</code>. An <code>{@link OutputStream}</code> is written
041     * to for the coversheet.
042     * 
043     * @param document The <code>{@link CashReceiptDocument}</code> the cover sheet is being generated for.
044     * @param searchPath A directory path used to identify the path to the template that will be used for creating this cover sheet.
045     * @param OutputStream The output stream that the printable cover sheet will be piped to.
046     * @exception Exception Thrown if there are any problems generating the cover sheet.
047     */
048    public void generateCoverSheet(CashReceiptDocument document, String searchPath, OutputStream outputStream) throws Exception;
049}