001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.purap.service;
017:
018: import java.io.ByteArrayOutputStream;
019: import java.util.Collection;
020: import java.util.List;
021:
022: import org.kuali.module.purap.bo.PurchaseOrderItem;
023: import org.kuali.module.purap.bo.PurchaseOrderVendorQuote;
024: import org.kuali.module.purap.document.PurchaseOrderDocument;
025:
026: /**
027: * Defines methods that must be implemented by classes providing a PrintService.
028: */
029: public interface PrintService {
030: /**
031: * Create the Purchase Order Quote Requests List Pdf document and send it back to the Action so that it can be dealt with.
032: *
033: * @param po The PurchaseOrderDocument.
034: * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
035: * @return Collection of error strings
036: */
037: public Collection generatePurchaseOrderQuoteRequestsListPdf(
038: PurchaseOrderDocument po,
039: ByteArrayOutputStream byteArrayOutputStream);
040:
041: /**
042: * Create the Purchase Order Quote Requests List Pdf document and save it so that it can be faxed in a later process.
043: *
044: * @param po The PurchaseOrderDocument.
045: * @return Collection of error strings.
046: */
047: public Collection savePurchaseOrderQuoteRequestsListPdf(
048: PurchaseOrderDocument po);
049:
050: /**
051: * THIS CODE IS NOT USED IN RELEASE 2 BUT THE CODE WAS LEFT IN TO
052: * FACILITATE TURNING IT BACK ON EARLY IN THE DEVELOPMENT CYCLE OF RELEASE 3.
053: *
054: * Create the Purchase Order Quote Pdf document and send it back to the Action so that it can be dealt with.
055: *
056: * @param po PurchaseOrderDocument that holds the Quote.
057: * @param povq PurchaseOrderVendorQuote that is being transmitted to.
058: * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
059: * @param environment The current environment used (e.g. DEV if it is a development environment).
060: * @return Collection of error strings.
061: */
062: public Collection generatePurchaseOrderQuotePdf(
063: PurchaseOrderDocument po, PurchaseOrderVendorQuote povq,
064: ByteArrayOutputStream byteArrayOutputStream,
065: String environment);
066:
067: /**
068: * THIS CODE IS NOT USED IN RELEASE 2 BUT THE CODE WAS LEFT IN TO
069: * FACILITATE TURNING IT BACK ON EARLY IN THE DEVELOPMENT CYCLE OF RELEASE 3.
070: * Create the Purchase Order Quote Pdf document and save it so that it can be faxed in a later process.
071: *
072: * @param po PurchaseOrderDocument that holds the Quote.
073: * @param povq PurchaseOrderVendorQuote that is being transmitted to.
074: * @param environment The current environment used (e.g. DEV if it is a development environment).
075: * @return Collection of error strings.
076: */
077: public Collection savePurchaseOrderQuotePdf(
078: PurchaseOrderDocument po, PurchaseOrderVendorQuote povq,
079: String environment);
080:
081: /**
082: * Create the Purchase Order Pdf document for non-retransmission and send it back to the Action so that it can be dealt with.
083: *
084: * @param po The PurchaseOrderDocument.
085: * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
086: * @param environment The current environment used (e.g. DEV if it is a development environment).
087: * @param retransmitItems The items selected by the user to be retransmitted.
088: * @return Collection of error strings.
089: */
090: public Collection generatePurchaseOrderPdf(
091: PurchaseOrderDocument po,
092: ByteArrayOutputStream byteArrayOutputStream,
093: String environment, List<PurchaseOrderItem> retransmitItems);
094:
095: /**
096: * Create the Purchase Order Pdf document for retransmission and send it back to the Action so that it can be dealt with.
097: *
098: * @param po The PurchaseOrderDocument.
099: * @param byteArrayOutputStream ByteArrayOutputStream that the action is using, where the pdf will be printed to.
100: * @param environment The current environment used (e.g. DEV if it is a development environment).
101: * @param retransmitItems The items selected by the user to be retransmitted.
102: * @return Collection of error strings.
103: */
104: public Collection generatePurchaseOrderPdfForRetransmission(
105: PurchaseOrderDocument po,
106: ByteArrayOutputStream byteArrayOutputStream,
107: String environment, List<PurchaseOrderItem> retransmitItems);
108:
109: /**
110: * Create the Purchase Order Pdf document for non-retransmission and save it so that it can be faxed in a later process.
111: *
112: * @param po The PurchaseOrderDocument.
113: * @param environment The current environment used (e.g. DEV if it is a development environment).
114: * @return Collection of error strings.
115: */
116: public Collection savePurchaseOrderPdf(PurchaseOrderDocument po,
117: String environment);
118:
119: /**
120: * Create the Purchase Order Pdf document for retransmission and save it so that it can be faxed in a later process.
121: *
122: * @param po The PurchaseOrderDocument.
123: * @param environment The current environment used (e.g. DEV if it is a development environment).
124: * @return Collection of error strings.
125: */
126: public Collection savePurchaseOrderPdfForRetransmission(
127: PurchaseOrderDocument po, String environment);
128: }
|