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.fp.document.service;
017    
018    
019    import java.io.IOException;
020    import java.io.OutputStream;
021    
022    import org.kuali.kfs.fp.document.DisbursementVoucherDocument;
023    import org.kuali.rice.kns.workflow.service.KualiWorkflowDocument;
024    
025    import com.lowagie.text.DocumentException;
026    
027    /**
028     * This service interface defines the methods that a DisbursementVoucherCoverSheetService implementation must provide.
029     * 
030     */
031    public interface DisbursementVoucherCoverSheetService {
032    
033        /**
034         * Generates a disbursement voucher cover sheet.
035         * 
036         * @param templateDirectory The file system directory which contains the template.
037         * @param templateName The name of the template file used to generate the cover sheet.
038         * @param document The DisbursementVoucherDocument used to generate the cover sheet.
039         * @param outputStream The stream to write out the new cover sheet.
040         * @throws DocumentException Thrown if there is a problem pulling data from the document to create the cover sheet.
041         * @throws IOException Thrown if there is a problem writing the cover sheet to the output stream.
042         */
043        public void generateDisbursementVoucherCoverSheet(String templateDirectory, String templateName, DisbursementVoucherDocument document, OutputStream outputStream) throws DocumentException, IOException;
044    
045        /**
046         * checks the status of the document to see if the cover sheet is printable
047         * 
048         * @param document submitted document
049         * @return true if document is not canceled, initiated, disapproved, exception, or saved
050         */
051        public boolean isCoverSheetPrintable(DisbursementVoucherDocument document);
052    }