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 java.util.Collection;
019 import java.util.List;
020 import java.util.Map;
021 import java.util.Set;
022
023 import org.kuali.kfs.integration.ec.EffortCertificationReport;
024 import org.kuali.kfs.module.ec.businessobject.EffortCertificationReportDefinition;
025 import org.kuali.kfs.module.ec.businessobject.EffortCertificationReportEarnPaygroup;
026
027 /**
028 * Define the services that are related to EffortCertificationReportDefinition
029 */
030 public interface EffortCertificationReportDefinitionService {
031
032 /**
033 * find a report definition by the primary key. The primary key is provided by the given field values.
034 *
035 * @param fieldValues the given field values containing the primary key of a report definition
036 * @return a report definition with the given primary key
037 */
038 public EffortCertificationReportDefinition findReportDefinitionByPrimaryKey(Map<String, String> fieldValues);
039
040 /**
041 * check if an effort certification report has been defined.
042 *
043 * @param effortCertificationReportDefinition the given effort certification report definition
044 * @return a message if a report has not been defined; otherwise, return null
045 */
046 public String validateEffortCertificationReportDefinition(EffortCertificationReportDefinition effortCertificationReportDefinition);
047
048 /**
049 * find all position object group codes for the given report definition
050 *
051 * @param reportDefinition the specified report definition
052 * @return all position object group codes for the given report definition
053 */
054 public List<String> findPositionObjectGroupCodes(EffortCertificationReportDefinition reportDefinition);
055
056 /**
057 * store the earn code and pay group combination in a Map for the specified report definition
058 *
059 * @param reportDefinition the specified report definition
060 * @return the earn code and pay group combination for the specified report definition as a Map
061 */
062 public Map<String, Set<String>> findReportEarnCodePayGroups(EffortCertificationReportDefinition reportDefinition);
063
064 /**
065 * find the earn code and pay group combination for the specified report definition
066 *
067 * @param reportDefinition the specified report definition
068 * @return the earn code and pay group combination for the specified report definition
069 */
070 public Collection<EffortCertificationReportEarnPaygroup> findReportEarnPay(EffortCertificationReportDefinition reportDefinition);
071
072 /**
073 * determine whether the given report definition has been used to generate effort certification document
074 *
075 * @param reportDefinition the given report definition
076 * @return true if the given report definition has been used; otherwise, false
077 */
078 public boolean hasBeenUsedForEffortCertificationGeneration(EffortCertificationReportDefinition reportDefinition);
079
080 /**
081 * determine whether the given report definition has been used to generate effort certification documents for the given employee
082 *
083 * @param emplid the given employee id
084 * @param reportDefinition the given report definition
085 * @return true if the given report definition has been used for the employee; otherwise, false
086 */
087 public boolean hasBeenUsedForEffortCertificationGeneration(String emplid, EffortCertificationReport reportDefinition);
088
089 /**
090 * determine whether there is any pending/temporary effort certification waiting for the given report definition
091 *
092 * @param reportDefinition the given report definition
093 * @return true if there is any pending/temporary effort certification waiting for process; otherwise, false
094 */
095 public boolean hasPendingEffortCertification(String emplid, EffortCertificationReportDefinition reportDefinition);
096
097 /**
098 * determine whether there is any approved effort certification for the given report definition and employee
099 *
100 * @param emplid the given employee id
101 * @param reportDefinition the given report definition
102 * @return true if there is any approved effort certification for the employee; otherwise, false
103 */
104 public boolean hasApprovedEffortCertification(String emplid, EffortCertificationReportDefinition reportDefinition);
105 }