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 package org.kuali.ole.fp.document.service;
17
18
19 import java.io.IOException;
20 import java.io.OutputStream;
21
22 import org.kuali.ole.fp.document.DisbursementVoucherDocument;
23
24 import com.lowagie.text.DocumentException;
25
26 /**
27 * This service interface defines the methods that a DisbursementVoucherCoverSheetService implementation must provide.
28 *
29 */
30 public interface DisbursementVoucherCoverSheetService {
31
32 /**
33 * Generates a disbursement voucher cover sheet.
34 *
35 * @param templateDirectory The file system directory which contains the template.
36 * @param templateName The name of the template file used to generate the cover sheet.
37 * @param document The DisbursementVoucherDocument used to generate the cover sheet.
38 * @param outputStream The stream to write out the new cover sheet.
39 * @throws DocumentException Thrown if there is a problem pulling data from the document to create the cover sheet.
40 * @throws IOException Thrown if there is a problem writing the cover sheet to the output stream.
41 */
42 public void generateDisbursementVoucherCoverSheet(String templateDirectory, String templateName, DisbursementVoucherDocument document, OutputStream outputStream) throws DocumentException, IOException;
43
44 /**
45 * checks the status of the document to see if the cover sheet is printable
46 *
47 * @param document submitted document
48 * @return true if document is not canceled, initiated, disapproved, exception, or saved
49 */
50 public boolean isCoverSheetPrintable(DisbursementVoucherDocument document);
51 }