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.module.purap.document.service;
17
18 import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
19 import org.kuali.ole.module.purap.document.RequisitionDocument;
20 import org.kuali.rice.kew.api.exception.WorkflowException;
21
22 import java.util.List;
23
24 /**
25 * Defines methods that must be implemented by classes providing a RequisitionService.
26 */
27 public interface RequisitionService extends PurchasingDocumentSpecificService {
28
29 /**
30 * Creates a Requisition object from Purchaser Order
31 *
32 * @param purDocument
33 * @return
34 * @throws WorkflowException
35 */
36 public RequisitionDocument generateRequisitionFromPurchaseOrder(PurchaseOrderDocument purDocument) throws WorkflowException;
37
38 /**
39 * Obtains the requisition document from the database given a requisition id as the input parameter
40 *
41 * @param id the requisition id of the document we want to obtain.
42 * @return RequisitionDocument the requisition document whose requisition id is the id in the input parameter of this method.
43 */
44 public RequisitionDocument getRequisitionById(Integer id);
45
46 /**
47 * Checks whether the requisition is eligible to become an Automatic Purchase Order (APO)
48 *
49 * @param requisition the requisition document to be checked.
50 * @return boolean true if the requisition is eligible to become APO.
51 */
52 public boolean isAutomaticPurchaseOrderAllowed(RequisitionDocument requisition);
53
54 /**
55 * Returns the list of Requisitions that are awaiting contract manager assignment
56 *
57 * @return List<RequisitionDocument>
58 */
59 public List<RequisitionDocument> getRequisitionsAwaitingContractManagerAssignment();
60
61 /**
62 * Returns the count of how many Requisitions are awaiting contract manager assignment
63 *
64 * @return int
65 */
66 public int getCountOfRequisitionsAwaitingContractManagerAssignment();
67
68 }