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