1 /*
2 * Copyright 2007 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.module.purap.document.service;
17
18 import org.kuali.ole.module.purap.businessobject.PurchaseOrderItem;
19 import org.kuali.ole.module.purap.businessobject.PurchaseOrderVendorQuote;
20 import org.kuali.ole.module.purap.document.BulkReceivingDocument;
21 import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
22
23 import java.io.ByteArrayOutputStream;
24 import java.util.Collection;
25 import java.util.List;
26
27 /**
28 * Defines methods that must be implemented by classes providing a PrintService.
29 */
30 public interface PrintService {
31 /**
32 * Create the Purchase Order Quote Requests List Pdf document and send it back to the Action so that it can be dealt with.
33 *
34 * @param po The PurchaseOrderDocument.
35 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
36 * @return Collection of error strings
37 */
38 public Collection generatePurchaseOrderQuoteRequestsListPdf(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream);
39
40 /**
41 * Create the Purchase Order Quote Requests List Pdf document and save it so that it can be faxed in a later process.
42 *
43 * @param po The PurchaseOrderDocument.
44 * @return Collection of error strings.
45 */
46 public Collection savePurchaseOrderQuoteRequestsListPdf(PurchaseOrderDocument po);
47
48 /**
49 * Create the Purchase Order Quote Pdf document and send it back to the Action so that it can be dealt with.
50 *
51 * @param po PurchaseOrderDocument that holds the Quote.
52 * @param povq PurchaseOrderVendorQuote that is being transmitted to.
53 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
54 * @param environment The current environment used (e.g. DEV if it is a development environment).
55 * @return Collection of error strings.
56 */
57 public Collection generatePurchaseOrderQuotePdf(PurchaseOrderDocument po, PurchaseOrderVendorQuote povq, ByteArrayOutputStream byteArrayOutputStream, String environment);
58
59 /**
60 * Create the Purchase Order Quote Pdf document and save it so that it can be faxed in a later process.
61 *
62 * @param po PurchaseOrderDocument that holds the Quote.
63 * @param povq PurchaseOrderVendorQuote that is being transmitted to.
64 * @param environment The current environment used (e.g. DEV if it is a development environment).
65 * @return Collection of error strings.
66 */
67 public Collection savePurchaseOrderQuotePdf(PurchaseOrderDocument po, PurchaseOrderVendorQuote povq, String environment);
68
69 /**
70 * Create the Purchase Order Pdf document for non-retransmission and send it back to the Action so that it can be dealt with.
71 *
72 * @param po The PurchaseOrderDocument.
73 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
74 * @param environment The current environment used (e.g. DEV if it is a development environment).
75 * @param retransmitItems The items selected by the user to be retransmitted.
76 * @return Collection of error strings.
77 */
78 public Collection generatePurchaseOrderPdf(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream, String environment, List<PurchaseOrderItem> retransmitItems);
79
80 /**
81 * Create the Purchase Order Pdf document for retransmission and send it back to the Action so that it can be dealt with.
82 *
83 * @param po The PurchaseOrderDocument.
84 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
85 * @param environment The current environment used (e.g. DEV if it is a development environment).
86 * @param retransmitItems The items selected by the user to be retransmitted.
87 * @return Collection of error strings.
88 */
89 public Collection generatePurchaseOrderPdfForRetransmission(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream, String environment, List<PurchaseOrderItem> retransmitItems);
90
91 /**
92 * Create the Purchase Order Pdf document for non-retransmission and save it so that it can be faxed in a later process.
93 *
94 * @param po The PurchaseOrderDocument.
95 * @param environment The current environment used (e.g. DEV if it is a development environment).
96 * @return Collection of error strings.
97 */
98 public Collection savePurchaseOrderPdf(PurchaseOrderDocument po, String environment);
99
100 /**
101 * Create the Purchase Order Pdf document for retransmission and save it so that it can be faxed in a later process.
102 *
103 * @param po The PurchaseOrderDocument.
104 * @param environment The current environment used (e.g. DEV if it is a development environment).
105 * @return Collection of error strings.
106 */
107 public Collection savePurchaseOrderPdfForRetransmission(PurchaseOrderDocument po, String environment);
108
109 public Collection generateBulkReceivingPDF(BulkReceivingDocument blkRecDoc, ByteArrayOutputStream stream);
110 }