Class BTCapacityPlanningScenarioCoverageResourceReport
java.lang.Object
overit.geocall.bl.BusinessTask<CapacityPlanningScenarioCoverageResourceReportEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CapacityPlanningScenarioCoverageResourceReportEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CapacityPlanningScenarioCoverageResourceReportEvent>
overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageReport<CapacityPlanningScenarioCoverageResourceReportEvent>
overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageResourceReport
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CapacityPlanningScenarioCoverageResourceReportEvent.class)
public class BTCapacityPlanningScenarioCoverageResourceReport
extends BTCapacityPlanningScenarioCoverageReport<CapacityPlanningScenarioCoverageResourceReportEvent>
Business task to generate the coverage resource report for a capacity planning scenario.
- Since:
- 19.0
- See Also:
-
Field Summary
Fields inherited from class overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageReport
FROM, MONTH, TOFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddailyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Date day, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given day.protected voidexecute(CapacityPlanningScenarioCoverageResourceReportEvent event, PoolKit poolKit) Calculate the coverage resource for a capacity planning scenario.formatCoverageResourceReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, List<Long> resourceIds, PoolKit poolKit) Formats the coverage resource report by processing available and committed capacity data for given resources.formatCoverageSkillReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, PoolKit poolKit) Formats the coverage resource report by processing available and committed capacity data for searched skills.formatCoverageTimeReport(BOCapacityPlanningScenario scenario, List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, DateTimeRange date) Format the coverage resource report.loadAvailableCapacity(Long resourceForecastHeader, List<Long> resourceIds, DateTimeRange date, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, PoolKit poolKit) Load the available capacity of a resource forecast detail grouped by the specifiedTimeGroupingType.loadCommittedCapacity(Long capacityPlanningScenarioId, List<Long> resourceIds, List<Long> activityIds, DateTimeRange date, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, PoolKit poolKit) Load the committed capacity of a capacity planning scenario grouped by the specifiedCapacityPlanningScenarioCoverageResourceGroupingType.protected voidmonthlyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Long month, Long year, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given month.protected voidpopulateOutput(CapacityPlanningScenarioCoverageResourceReportOutput output, List<Map<String, Object>> availableCapacityFiltered, List<Map<String, Object>> committedCapacityFiltered) Populate the output with the data from the available and committed capacity.protected List<BOForecastResource> searchResources(List<Long> resourceIds, PoolKit poolKit) Search for forecast resources based on the provided resource ids.protected voidValidates the input parameters.protected voidweeklyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Long week, Long year, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given week.Methods inherited from class overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageReport
filterActivitiesBySkills, filterResourcesBySkills, getDistributedWorkload, getForecastActivitiesDetails, getSourceTimeframes, isValidExecution, loadActivities, loadCapacityPlanningScenario, loadResources, populateAvailableCapacityOutput, populateCommittedCapacityOutput, populateDemandOutput, searchSkills, timeframeToMapMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTCapacityPlanningScenarioCoverageResourceReport
public BTCapacityPlanningScenarioCoverageResourceReport()
-
-
Method Details
-
execute
protected void execute(CapacityPlanningScenarioCoverageResourceReportEvent event, PoolKit poolKit) throws DAException, DAValidateException Calculate the coverage resource for a capacity planning scenario.- Specified by:
executein classValidExecutionBusinessTask<CapacityPlanningScenarioCoverageResourceReportEvent>- Parameters:
event- theCapacityPlanningScenarioCoverageTimeReportEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(CapacityPlanningScenarioCoverageResourceReportFilter input) throws DAValidateException Validates the input parameters.- Throws:
DAValidateException
-
loadAvailableCapacity
protected List<Map<String,Object>> loadAvailableCapacity(Long resourceForecastHeader, List<Long> resourceIds, DateTimeRange date, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, PoolKit poolKit) throws DAException, DAValidateException Load the available capacity of a resource forecast detail grouped by the specifiedTimeGroupingType.- Parameters:
resourceForecastHeader- the resource forecast header idresourceIds- the list of resourcesdate- the filter dategroupingType- the grouping typepoolKit- thePoolKit- Returns:
- the list of available capacity
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadCommittedCapacity
protected List<Map<String,Object>> loadCommittedCapacity(Long capacityPlanningScenarioId, List<Long> resourceIds, List<Long> activityIds, DateTimeRange date, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, PoolKit poolKit) throws DAException, DAValidateException Load the committed capacity of a capacity planning scenario grouped by the specifiedCapacityPlanningScenarioCoverageResourceGroupingType.- Parameters:
capacityPlanningScenarioId- the capacity planning scenario idresourceIds- the list of resourcesactivityIds- the list of activitiesdate- the filter dategroupingType- the grouping typepoolKit- thePoolKit- Returns:
- the list of committed capacity
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
formatCoverageTimeReport
protected List<CapacityPlanningScenarioCoverageResourceReportOutput> formatCoverageTimeReport(BOCapacityPlanningScenario scenario, List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, CapacityPlanningScenarioCoverageResourceGroupingType groupingType, DateTimeRange date) Format the coverage resource report.- Parameters:
scenario- the capacity planning scenarioavailableCapacity- the available capacitycommittedCapacity- the committed capacitygroupingType- the grouping typedate-- Returns:
- the list of
CapacityPlanningScenarioCoverageResourceReportOutput
-
formatCoverageResourceReport
protected List<CapacityPlanningScenarioCoverageResourceReportOutput> formatCoverageResourceReport(List<Map<String, Object>> availableCapacity, List<Map<String, throws DAException, DAValidateExceptionObject>> committedCapacity, List<Long> resourceIds, PoolKit poolKit) Formats the coverage resource report by processing available and committed capacity data for given resources.- Parameters:
availableCapacity- List of maps containing available capacity data for resourcescommittedCapacity- List of maps containing committed capacity data for resourcesresourceIds- List of resource IDs to include in the reportpoolKit- ThePoolKit- Returns:
- list of
CapacityPlanningScenarioCoverageResourceReportOutputobjects containing formatted report data - Throws:
DAException- If there is an error accessing the dataDAValidateException- If there is a validation error
-
formatCoverageSkillReport
protected List<CapacityPlanningScenarioCoverageResourceReportOutput> formatCoverageSkillReport(List<Map<String, Object>> availableCapacity, List<Map<String, throws DAException, DAValidateExceptionObject>> committedCapacity, PoolKit poolKit) Formats the coverage resource report by processing available and committed capacity data for searched skills.- Parameters:
availableCapacity- List of maps containing available capacity data for resourcescommittedCapacity- List of maps containing committed capacity data for resourcespoolKit- ThePoolKit- Returns:
- list of
CapacityPlanningScenarioCoverageResourceReportOutputobjects containing formatted report data - Throws:
DAException- If there is an error accessing the dataDAValidateException- If there is a validation error
-
dailyReport
protected void dailyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Date day, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given day.- Parameters:
availableCapacity- the list of available capacitycommittedCapacity- the list of committed capacityday- the dayoutput- theCapacityPlanningScenarioCoverageResourceReportOutput
-
weeklyReport
protected void weeklyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Long week, Long year, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given week.- Parameters:
availableCapacity- the list of available capacitycommittedCapacity- the list of committed capacityweek- the weekyear- the yearoutput- theCapacityPlanningScenarioCoverageResourceReportOutput
-
monthlyReport
protected void monthlyReport(List<Map<String, Object>> availableCapacity, List<Map<String, Object>> committedCapacity, Long month, Long year, CapacityPlanningScenarioCoverageResourceReportOutput output) Create a report for the given month.- Parameters:
availableCapacity- the list of available capacitycommittedCapacity- the list of committed capacitymonth- the monthyear- the yearoutput- theCapacityPlanningScenarioCoverageResourceReportOutput
-
populateOutput
protected void populateOutput(CapacityPlanningScenarioCoverageResourceReportOutput output, List<Map<String, Object>> availableCapacityFiltered, List<Map<String, Object>> committedCapacityFiltered) Populate the output with the data from the available and committed capacity.- Parameters:
output- theCapacityPlanningScenarioCoverageResourceReportOutputavailableCapacityFiltered- the available capacity filtered by the periodcommittedCapacityFiltered- the committed capacity filtered by the period
-
searchResources
protected List<BOForecastResource> searchResources(List<Long> resourceIds, PoolKit poolKit) throws DAException, DAValidateException Search for forecast resources based on the provided resource ids.- Parameters:
resourceIds- List of resource IDs to search forpoolKit-PoolKit- Returns:
- list of
BOForecastResourceobjects matching the search criteria - Throws:
DAException- if there is an error during data accessDAValidateException- if there is a validation error
-