Class BTResourceForecastHeaderCancel
java.lang.Object
overit.geocall.bl.BusinessTask<ResourceForecastHeaderCancelEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ResourceForecastHeaderCancelEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ResourceForecastHeaderCancelEvent>
overit.geocallapp.wfm.forecastcapacity.bl.forecast.resource.task.BTResourceForecastManagement<ResourceForecastHeaderCancelEvent>
overit.geocallapp.wfm.forecastcapacity.bl.forecast.resource.task.BTResourceForecastHeaderCancel
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ResourceForecastHeaderCancelEvent.class)
public class BTResourceForecastHeaderCancel
extends BTResourceForecastManagement<ResourceForecastHeaderCancelEvent>
Business task in order to cancel a
When the
BOResourceForecastHeader. When the
ResourceForecastHeaderCancelEvent is launched
the BT notices the call and cancels the BOResourceForecastHeader basing on the event's input. - Since:
- 15.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancelResourceForecastHeader(Long resourceForecastHeaderId, PoolKit poolKit) Cancels the resource forecast header.protected voidexecute(ResourceForecastHeaderCancelEvent event, PoolKit poolKit) Cancels the givenBOResourceForecastHeader.booleanDetermines whether the current state is valid for execution.Methods inherited from class overit.geocallapp.wfm.forecastcapacity.bl.forecast.resource.task.BTResourceForecastManagement
searchResourceForecastByCode, validateCodeDuplication, validateDates, validateFieldsLengthMethods 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
-
BTResourceForecastHeaderCancel
public BTResourceForecastHeaderCancel()
-
-
Method Details
-
execute
protected void execute(ResourceForecastHeaderCancelEvent event, PoolKit poolKit) throws DAException, DAValidateException Cancels the givenBOResourceForecastHeader.- Specified by:
executein classValidExecutionBusinessTask<ResourceForecastHeaderCancelEvent>- Parameters:
event- theResourceForecastHeaderCancelEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
cancelResourceForecastHeader
protected void cancelResourceForecastHeader(Long resourceForecastHeaderId, PoolKit poolKit) throws DAValidateException, DAException Cancels the resource forecast header. The cancellation is logical, i.e. the status is set to CANCELLED- Parameters:
resourceForecastHeaderId- theBOResourceForecastHeaderidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Specified by:
isValidExecutionin interfaceValidExecution- Overrides:
isValidExecutionin classBTResourceForecastManagement<ResourceForecastHeaderCancelEvent>- Returns:
- true if execution is valid, false otherwise
-