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.HashMap;
020    
021    import org.kuali.kfs.module.purap.document.BulkReceivingDocument;
022    import org.kuali.rice.kew.exception.WorkflowException;
023    
024    public interface BulkReceivingService {
025    
026        /**
027         * Populates a Bulk Receiving Document with information from a Purchase Order.
028         * 
029         * @param blkRecDoc
030         */
031        public void populateBulkReceivingFromPurchaseOrder(BulkReceivingDocument blkRecDoc);
032    
033        /**
034         * A save is done passing the continue purap event so as to call a populate within
035         * prepare for save. 
036         *
037         * @param blkRecDoc
038         * @throws WorkflowException
039         */
040        public void populateAndSaveBulkReceivingDocument(BulkReceivingDocument blkRecDoc) throws WorkflowException;
041    
042        /**
043         * Checks for duplicate Bulk Receiving documents and passes back a list of those found
044         * where vendor date, packing slip number or bill of lading match on previous bulk receiving
045         * documents by purchase order.
046         * 
047         * @param blkRecDoc
048         * @return
049         */
050        public HashMap<String, String> bulkReceivingDuplicateMessages(BulkReceivingDocument blkRecDoc);
051    
052        public boolean canPrintReceivingTicket(BulkReceivingDocument blkRecDoc);
053        
054        public void performPrintReceivingTicketPDF(String blkDocId, ByteArrayOutputStream baosPDF);
055        
056        public String getBulkReceivingDocumentNumberInProcessForPurchaseOrder(Integer poId,String bulkReceivingDocumentNumber);
057        
058    }