Class BTCapacityPlanningScenarioManagement<I>
java.lang.Object
overit.geocall.bl.BusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<I>
overit.geocallapp.wfm.forecastcapacity.bl.capacityplanning.scenario.task.BTCapacityPlanningScenarioManagement<I>
- Type Parameters:
I- the generic type
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
- Direct Known Subclasses:
BTCapacityPlanningScenarioCancel,BTCapacityPlanningScenarioInsert,BTCapacityPlanningScenarioUpdate
public abstract class BTCapacityPlanningScenarioManagement<I>
extends ValidPermissionBusinessTask<I>
Generic business task for Capacity Planning Scenario entities.
Before executing its purpose, the task checks whether the Forecast Management module is active and if the current user has the required permissions
Before executing its purpose, the task checks whether the Forecast Management module is active and if the current user has the required permissions
- Since:
- 15.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BOCache<BOActivityForecastHeader> protected BOCache<BOResourceForecastHeader> Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinit()booleanDetermines whether the current state is valid for execution.protected List<BOCapacityPlanningScenario> searchScenarioByCode(String code, PoolKit poolKit) protected voidValidates the scenario code: we cannot insert a new scenario with the same code of another scenarioprotected voidvalidateDates(BOCapacityPlanningScenario input, PoolKit pk) Validates whether the time ranges of theBOResourceForecastHeaderobject andBOActivityForecastHeaderobject overlap.protected voidValidates the fields' length of theBOCapacityPlanningScenarioinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.protected voidMethods 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, execute, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
resourceForecastHeaderBOCache
-
activityForecastHeaderBOCache
-
-
Constructor Details
-
BTCapacityPlanningScenarioManagement
public BTCapacityPlanningScenarioManagement()
-
-
Method Details
-
init
protected void init() -
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-
validateCodeDuplication
protected void validateCodeDuplication(BOCapacityPlanningScenario input, PoolKit pk) throws DAException, DAValidateException Validates the scenario code: we cannot insert a new scenario with the same code of another scenario- Parameters:
input- theBOCapacityPlanningScenarioto checkpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-
searchScenarioByCode
protected List<BOCapacityPlanningScenario> searchScenarioByCode(String code, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
validateOperationCenter
protected void validateOperationCenter(BOCapacityPlanningScenario input, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
validateDates
protected void validateDates(BOCapacityPlanningScenario input, PoolKit pk) throws DAException, DAValidateException Validates whether the time ranges of theBOResourceForecastHeaderobject andBOActivityForecastHeaderobject overlap. If they do not overlap, aDAValidateExceptionis thrown. Otherwise, theBOCapacityPlanningScenarioinput's coverageStartDate is set to the later date between the start dates of the resource forecast and the activity forecast, and theBOCapacityPlanningScenarioinput's coverageEndDate is set to the earlier date between the end dates of the two forecasts.- Parameters:
input- theBOCapacityPlanningScenarioto checkpk- thePoolKitobject- Throws:
DAValidateException- if the time ranges do not overlapDAException
-
validateFieldsLength
protected void validateFieldsLength(BOCapacityPlanningScenario input, PoolKit pk) throws DAException, DAValidateException Validates the fields' length of theBOCapacityPlanningScenarioinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.- Parameters:
input- theBOCapacityPlanningScenarioinput to be checkedpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-