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.module.purap.document.service;
017
018 import java.io.ByteArrayOutputStream;
019 import java.util.Collection;
020 import java.util.List;
021
022 import org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem;
023 import org.kuali.kfs.module.purap.businessobject.PurchaseOrderVendorQuote;
024 import org.kuali.kfs.module.purap.document.BulkReceivingDocument;
025 import org.kuali.kfs.module.purap.document.PurchaseOrderDocument;
026
027 /**
028 * Defines methods that must be implemented by classes providing a PrintService.
029 */
030 public interface PrintService {
031 /**
032 * Create the Purchase Order Quote Requests List Pdf document and send it back to the Action so that it can be dealt with.
033 *
034 * @param po The PurchaseOrderDocument.
035 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
036 * @return Collection of error strings
037 */
038 public Collection generatePurchaseOrderQuoteRequestsListPdf(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream);
039
040 /**
041 * Create the Purchase Order Quote Requests List Pdf document and save it so that it can be faxed in a later process.
042 *
043 * @param po The PurchaseOrderDocument.
044 * @return Collection of error strings.
045 */
046 public Collection savePurchaseOrderQuoteRequestsListPdf(PurchaseOrderDocument po);
047
048 /**
049 * Create the Purchase Order Quote Pdf document and send it back to the Action so that it can be dealt with.
050 *
051 * @param po PurchaseOrderDocument that holds the Quote.
052 * @param povq PurchaseOrderVendorQuote that is being transmitted to.
053 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
054 * @param environment The current environment used (e.g. DEV if it is a development environment).
055 * @return Collection of error strings.
056 */
057 public Collection generatePurchaseOrderQuotePdf(PurchaseOrderDocument po, PurchaseOrderVendorQuote povq, ByteArrayOutputStream byteArrayOutputStream, String environment);
058
059 /**
060 * Create the Purchase Order Quote Pdf document and save it so that it can be faxed in a later process.
061 *
062 * @param po PurchaseOrderDocument that holds the Quote.
063 * @param povq PurchaseOrderVendorQuote that is being transmitted to.
064 * @param environment The current environment used (e.g. DEV if it is a development environment).
065 * @return Collection of error strings.
066 */
067 public Collection savePurchaseOrderQuotePdf(PurchaseOrderDocument po, PurchaseOrderVendorQuote povq, String environment);
068
069 /**
070 * Create the Purchase Order Pdf document for non-retransmission and send it back to the Action so that it can be dealt with.
071 *
072 * @param po The PurchaseOrderDocument.
073 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
074 * @param environment The current environment used (e.g. DEV if it is a development environment).
075 * @param retransmitItems The items selected by the user to be retransmitted.
076 * @return Collection of error strings.
077 */
078 public Collection generatePurchaseOrderPdf(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream, String environment, List<PurchaseOrderItem> retransmitItems);
079
080 /**
081 * Create the Purchase Order Pdf document for retransmission and send it back to the Action so that it can be dealt with.
082 *
083 * @param po The PurchaseOrderDocument.
084 * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
085 * @param environment The current environment used (e.g. DEV if it is a development environment).
086 * @param retransmitItems The items selected by the user to be retransmitted.
087 * @return Collection of error strings.
088 */
089 public Collection generatePurchaseOrderPdfForRetransmission(PurchaseOrderDocument po, ByteArrayOutputStream byteArrayOutputStream, String environment, List<PurchaseOrderItem> retransmitItems);
090
091 /**
092 * Create the Purchase Order Pdf document for non-retransmission and save it so that it can be faxed in a later process.
093 *
094 * @param po The PurchaseOrderDocument.
095 * @param environment The current environment used (e.g. DEV if it is a development environment).
096 * @return Collection of error strings.
097 */
098 public Collection savePurchaseOrderPdf(PurchaseOrderDocument po, String environment);
099
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 }