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.batch.service; 017 018 019 import java.util.List; 020 021 import org.kuali.kfs.module.ec.businessobject.EffortCertificationDocumentBuild; 022 import org.kuali.kfs.module.ec.businessobject.EffortCertificationReportDefinition; 023 024 /** 025 * The interface defines the methods that extract Labor Ledger records of the employees who were paid on a grant or cost shared 026 * during the selected reporting period. 027 */ 028 public interface EffortCertificationExtractService { 029 030 /** 031 * extract Labor Ledger records of the employees who were paid on a grant or cost shared during a reporting period. The 032 * reporting period can be determined by both of fiscal year and report number declared as system parameters. 033 */ 034 public void extract(); 035 036 /** 037 * extract Labor Ledger records of the employees who were paid on a grant or cost shared during a reporting period. The 038 * reporting period can be determined by both of fiscal year and report number. 039 * 040 * @param fiscalYear the given fiscal year with which Labor ledgers can be extracted. 041 * @param reportNumber the given report number to run. 042 */ 043 public void extract(Integer fiscalYear, String reportNumber); 044 045 /** 046 * extract Labor Ledger records of the given employee for the given report definition, and create effort certification document 047 * build. 048 * 049 * @param emplid the given employee id 050 * @param effortCertificationReportDefiniton the given report definition 051 * 052 * @return an effort certification document build generated for the given employee 053 */ 054 public EffortCertificationDocumentBuild extract(String emplid, EffortCertificationReportDefinition effortCertificationReportDefiniton); 055 056 /** 057 * find the employees who were paid based on a set of specified pay type within the given report periods. Here, a pay type can 058 * be determined by earn code and pay group. The employees are eligible for effort certification. 059 * 060 * @param reportDefinition the specified report definition 061 * @return the employees who were paid based on a set of specified pay type within the given report periods 062 */ 063 public List<String> findEmployeesEligibleForEffortCertification(EffortCertificationReportDefinition reportDefinition); 064 065 /** 066 * determine whether the given employee is eligible for effort certification within the given report periods. Here, a pay type 067 * can be determined by earn code and pay group. 068 * 069 * @param emplid the given employee id 070 * @param reportDefinition the specified report definition 071 * @return true if the given employee is eligible for effort certification within the given report periods; otherwise, false 072 */ 073 public boolean isEmployeeEligibleForEffortCertification(String emplid, EffortCertificationReportDefinition reportDefinition); 074 }