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.util.List;
019    
020    import org.kuali.kfs.module.purap.document.RequisitionDocument;
021    
022    /**
023     * Defines methods that must be implemented by classes providing a RequisitionService.
024     */
025    public interface RequisitionService extends PurchasingDocumentSpecificService {
026    
027        /**
028         * Obtains the requisition document from the database given a requisition id as the input parameter
029         * 
030         * @param id the requisition id of the document we want to obtain.
031         * @return RequisitionDocument the requisition document whose requisition id is the id in the input parameter of this method.
032         */
033        public RequisitionDocument getRequisitionById(Integer id);
034    
035        /**
036         * Checks whether the requisition is eligible to become an Automatic Purchase Order (APO)
037         * 
038         * @param requisition the requisition document to be checked.
039         * @return boolean true if the requisition is eligible to become APO.
040         */
041        public boolean isAutomaticPurchaseOrderAllowed(RequisitionDocument requisition);
042        
043        /**
044         * Returns the list of Requisitions that are awaiting contract manager assignment
045         *
046         * @return List<RequisitionDocument>
047         */
048        public List<RequisitionDocument> getRequisitionsAwaitingContractManagerAssignment();
049        
050        /**
051         * Returns the count of how many Requisitions are awaiting contract manager assignment
052         *
053         * @return int
054         */
055        public int getCountOfRequisitionsAwaitingContractManagerAssignment();
056    
057    }