Class BTActivityForecastHeaderUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<ActivityForecastHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ActivityForecastHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ActivityForecastHeaderUpdateEvent>
overit.geocallapp.wfm.forecastcapacity.bl.forecast.activity.task.BTActivityForecastHeaderUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ActivityForecastHeaderUpdateEvent.class)
public class BTActivityForecastHeaderUpdate
extends ValidPermissionBusinessTask<ActivityForecastHeaderUpdateEvent>
Business task in order to update a
When the
BOActivityForecastHeader. When the
ActivityForecastHeaderUpdateEvent is launched the BT notices the
call and updates the BOActivityForecastHeader basing on the event's input. Required fields:
- Code
- Description
- State
- Start Date
- End Date
Permission:
Error Code:
- 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 voidexecute(ActivityForecastHeaderUpdateEvent event, PoolKit poolKit) Updates theBOActivityForecastHeaderwith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidvalidateAndCompleteInput(BOActivityForecastHeader input, PoolKit poolKit) Validates the data before the update.protected voidvalidateCode(String code, PoolKit poolKit) Validates the code: must be uniqueprotected voidvalidateFieldsLength(BOActivityForecastHeader input, PoolKit pk) Validates the fields' length of theBOActivityForecastHeaderinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.Methods 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
-
BTActivityForecastHeaderUpdate
public BTActivityForecastHeaderUpdate()
-
-
Method Details
-
execute
protected void execute(ActivityForecastHeaderUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theBOActivityForecastHeaderwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<ActivityForecastHeaderUpdateEvent>- Parameters:
event- theActivityForecastHeaderUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateAndCompleteInput
protected void validateAndCompleteInput(BOActivityForecastHeader input, PoolKit poolKit) throws DAException, DAValidateException Validates the data before the update.- Parameters:
input- theBOActivityForecastHeaderto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-
validateCode
Validates the code: must be unique- Parameters:
code- the code to checkpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-
validateFieldsLength
protected void validateFieldsLength(BOActivityForecastHeader input, PoolKit pk) throws DAException, DAValidateException Validates the fields' length of theBOActivityForecastHeaderinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.- Parameters:
input- theBOActivityForecastHeaderinput to be checkedpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-
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
-