Class BTCapacityPlanningScenarioCoverageActivityReport
java.lang.Object
overit.geocall.bl.BusinessTask<CapacityPlanningScenarioCoverageActivityReportEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CapacityPlanningScenarioCoverageActivityReportEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CapacityPlanningScenarioCoverageActivityReportEvent>
overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageReport<CapacityPlanningScenarioCoverageActivityReportEvent>
overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioCoverageActivityReport
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CapacityPlanningScenarioCoverageActivityReportEvent.class)
public class BTCapacityPlanningScenarioCoverageActivityReport
extends BTCapacityPlanningScenarioCoverageReport<CapacityPlanningScenarioCoverageActivityReportEvent>
Business task to generate the coverage activity 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>> committedCapacity, List<Map<String, Object>> demand, Date day, CapacityPlanningScenarioCoverageActivityReportOutput output) Create a report for the given day.protected voidexecute(CapacityPlanningScenarioCoverageActivityReportEvent event, PoolKit poolKit) Calculate the coverage activity for a capacity planning scenario.formatCoverageActivityReport(List<Map<String, Object>> demand, List<Map<String, Object>> committedCapacity, List<Long> activityIds, PoolKit poolKit) Formats the coverage activity report by processing available and committed capacity data for given activities.formatCoverageSkillReport(List<Map<String, Object>> demand, 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>> committedCapacity, List<Map<String, Object>> demand, TimeGroupingType groupingType, DateTimeRange date) Format the coverage time report.loadCommittedCapacity(Long capacityPlanningScenarioId, List<Long> resourceIds, List<Long> activityIds, DateTimeRange date, CapacityPlanningScenarioCoverageActivityGroupingType groupingType, PoolKit poolKit) Load the committed capacity of a capacity planning scenario grouped by the specifiedCapacityPlanningScenarioCoverageActivityGroupingType.loadDemand(Long activityForecastHeader, List<Long> activityIds, DateTimeRange date, CapacityPlanningScenarioCoverageActivityGroupingType groupingType, PoolKit poolKit) Load the demand of the resource forecast header grouped by the specifiedCapacityPlanningScenarioCoverageActivityGroupingType.protected voidmonthlyReport(List<Map<String, Object>> committedCapacity, List<Map<String, Object>> demand, Long month, Long year, CapacityPlanningScenarioCoverageActivityReportOutput output) Create a report for the given month.protected voidpopulateOutput(CapacityPlanningScenarioCoverageActivityReportOutput output, List<Map<String, Object>> committedCapacityFiltered, List<Map<String, Object>> demandFiltered) Populate the output with the data from the available and committed capacity.protected List<BOForecastActivity> searchActivities(List<Long> activityIds, PoolKit poolKit) Search for forecast activity based on the provided activity ids.protected voidValidates the input parameters.protected voidweeklyReport(List<Map<String, Object>> committedCapacity, List<Map<String, Object>> demand, Long week, Long year, CapacityPlanningScenarioCoverageActivityReportOutput 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
-
BTCapacityPlanningScenarioCoverageActivityReport
public BTCapacityPlanningScenarioCoverageActivityReport()
-
-
Method Details
-
execute
protected void execute(CapacityPlanningScenarioCoverageActivityReportEvent event, PoolKit poolKit) throws DAException, DAValidateException Calculate the coverage activity for a capacity planning scenario.- Specified by:
executein classValidExecutionBusinessTask<CapacityPlanningScenarioCoverageActivityReportEvent>- Parameters:
event- theCapacityPlanningScenarioCoverageActivityReportEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(CapacityPlanningScenarioCoverageActivityReportFilter input) throws DAValidateException Validates the input parameters.- Throws:
DAValidateException
-
loadDemand
protected List<Map<String,Object>> loadDemand(Long activityForecastHeader, List<Long> activityIds, DateTimeRange date, CapacityPlanningScenarioCoverageActivityGroupingType groupingType, PoolKit poolKit) throws DAException, DAValidateException Load the demand of the resource forecast header grouped by the specifiedCapacityPlanningScenarioCoverageActivityGroupingType.- Parameters:
activityForecastHeader- the resource forecast header idactivityIds- the list of activity idsdate- the filter date rangegroupingType- the grouping typepoolKit- thePoolKit- Returns:
- the list of demand
- 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, CapacityPlanningScenarioCoverageActivityGroupingType groupingType, PoolKit poolKit) throws DAException, DAValidateException Load the committed capacity of a capacity planning scenario grouped by the specifiedCapacityPlanningScenarioCoverageActivityGroupingType.- 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<CapacityPlanningScenarioCoverageActivityReportOutput> formatCoverageTimeReport(BOCapacityPlanningScenario scenario, List<Map<String, Object>> committedCapacity, List<Map<String, Object>> demand, TimeGroupingType groupingType, DateTimeRange date) Format the coverage time report.- Parameters:
scenario- the capacity planning scenariocommittedCapacity- the committed capacitydemand- the demandgroupingType- the grouping typedate-- Returns:
- the list of
CapacityPlanningScenarioCoverageActivityReportOutput
-
formatCoverageActivityReport
protected List<CapacityPlanningScenarioCoverageActivityReportOutput> formatCoverageActivityReport(List<Map<String, Object>> demand, List<Map<String, throws DAException, DAValidateExceptionObject>> committedCapacity, List<Long> activityIds, PoolKit poolKit) Formats the coverage activity report by processing available and committed capacity data for given activities.- Parameters:
demand- List of maps containing demand data for activitycommittedCapacity- List of maps containing committed capacity data for resourcesactivityIds- List of activity IDs to include in the reportpoolKit- ThePoolKit- Returns:
- list of
CapacityPlanningScenarioCoverageActivityReportOutputobjects containing formatted report data - Throws:
DAException- If there is an error accessing the dataDAValidateException- If there is a validation error
-
formatCoverageSkillReport
protected List<CapacityPlanningScenarioCoverageActivityReportOutput> formatCoverageSkillReport(List<Map<String, Object>> demand, 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:
demand- List of maps containing the demand for the activitiescommittedCapacity- List of maps containing committed capacity data for activitiespoolKit- ThePoolKit- Returns:
- list of
CapacityPlanningScenarioCoverageActivityReportOutputobjects 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>> committedCapacity, List<Map<String, Object>> demand, Date day, CapacityPlanningScenarioCoverageActivityReportOutput output) Create a report for the given day.- Parameters:
committedCapacity- the list of committed capacityday- the dayoutput- theCapacityPlanningScenarioCoverageActivityReportOutput
-
weeklyReport
protected void weeklyReport(List<Map<String, Object>> committedCapacity, List<Map<String, Object>> demand, Long week, Long year, CapacityPlanningScenarioCoverageActivityReportOutput output) Create a report for the given week.- Parameters:
committedCapacity- the list of committed capacitydemand- the list of demandweek- the weekyear- the yearoutput- theCapacityPlanningScenarioCoverageActivityReportOutput
-
monthlyReport
protected void monthlyReport(List<Map<String, Object>> committedCapacity, List<Map<String, Object>> demand, Long month, Long year, CapacityPlanningScenarioCoverageActivityReportOutput output) Create a report for the given month.- Parameters:
committedCapacity- the list of committed capacitydemand- the list of demandmonth- the monthyear- the yearoutput- theCapacityPlanningScenarioCoverageActivityReportOutput
-
populateOutput
protected void populateOutput(CapacityPlanningScenarioCoverageActivityReportOutput output, List<Map<String, Object>> committedCapacityFiltered, List<Map<String, Object>> demandFiltered) Populate the output with the data from the available and committed capacity.- Parameters:
output- theCapacityPlanningScenarioCoverageActivityReportOutputcommittedCapacityFiltered- the committed capacity filtered by the perioddemandFiltered- the demand filtered by the period
-
searchActivities
protected List<BOForecastActivity> searchActivities(List<Long> activityIds, PoolKit poolKit) throws DAException, DAValidateException Search for forecast activity based on the provided activity ids.- Parameters:
activityIds- List of activity IDs to search forpoolKit-PoolKit- Returns:
- list of
BOForecastActivityobjects matching the search criteria - Throws:
DAException- if there is an error during data accessDAValidateException- if there is a validation error
-