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.ec.service;
017    
018    import org.kuali.kfs.module.ec.businessobject.EffortCertificationDocumentBuild;
019    import org.kuali.kfs.module.ec.document.EffortCertificationDocument;
020    
021    /**
022     * To define the services related to the effort certification document
023     * 
024     * @see org.kuali.kfs.module.ec.document.EffortCertificationDocument
025     */
026    public interface EffortCertificationDocumentService {
027    
028        /**
029         * process the approved effort certification document
030         * 
031         * @param effortCertificationDocument the approved effort certification document
032         */
033        public void processApprovedEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument);
034    
035        /**
036         * create an effort certification document from the given document build record, and route it for approval
037         * 
038         * @param effortCertificationDocumentBuild the given effort certification document build
039         */
040        public boolean createAndRouteEffortCertificationDocument(EffortCertificationDocumentBuild effortCertificationDocumentBuild);
041    
042        /**
043         * populate the given effort certification document with the given effort certification document build
044         * 
045         * @param effortCertificationDocument the given effort certification document
046         * @param effortCertificationDocumentBuild the given effort certification document build
047         * 
048         * @return true if the given document has been populated sucessfully; otherwise, false
049         */
050        public boolean populateEffortCertificationDocument(EffortCertificationDocument effortCertificationDocument, EffortCertificationDocumentBuild effortCertificationDocumentBuild);
051    
052        /**
053         * generate salary expense transfer document from the given effort certification document
054         * 
055         * @param effortCertificationDocument the given effort certification document
056         * 
057         * @return true if the generation is complete successfully; otherwise, return false
058         */
059        public boolean generateSalaryExpenseTransferDocument(EffortCertificationDocument effortCertificationDocument);
060        
061        /**
062         * delete the detail lines associated with the given effort certification document if they have been persisted
063         * 
064         * @param effortCertificationDocument the given effort certification document
065         */
066        public void removeEffortCertificationDetailLines(EffortCertificationDocument effortCertificationDocument);
067    
068        /**
069         * add the adHoc route recipient into the given document when the effort on any detail line has been changed.
070         * 
071         * @param effortCertificationDocument the given effort certification document
072         */
073        public void addRouteLooping(EffortCertificationDocument effortCertificationDocument);    
074    }