Class BTForecastShiftModelUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<ForecastShiftModelUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ForecastShiftModelUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ForecastShiftModelUpdateEvent>
overit.geocallapp.wfm.forecastcapacity.bl.forecast.resource.shiftmodel.task.BTForecastShiftModelUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ForecastShiftModelUpdateEvent.class)
public class BTForecastShiftModelUpdate
extends ValidPermissionBusinessTask<ForecastShiftModelUpdateEvent>
Business task in order to update a
When the
BOForecastShiftModel. When the
ForecastShiftModelUpdateEvent is launched the BT notices the
call and updates the BOForecastShiftModel basing on the event's input. Required fields:
- Code
- Description
- Duration
- Active
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(ForecastShiftModelUpdateEvent event, PoolKit poolKit) Updates theBOForecastShiftModelwith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidvalidateCode(String code, PoolKit poolKit) Validates the code: must be mandatory and uniqueprotected voidvalidateDuration(Long duration) Validates the duration: must be mandatory and greater than zeroprotected voidvalidateFieldsLength(BOForecastShiftModel input, PoolKit pk) Validates the fields' length of theBOForecastShiftModelinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.protected voidvalidateInput(BOForecastShiftModel input, PoolKit poolKit) Validates the data before the update.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
-
BTForecastShiftModelUpdate
public BTForecastShiftModelUpdate()
-
-
Method Details
-
execute
protected void execute(ForecastShiftModelUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theBOForecastShiftModelwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<ForecastShiftModelUpdateEvent>- Parameters:
event- theForecastShiftModelUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateInput
protected void validateInput(BOForecastShiftModel input, PoolKit poolKit) throws DAException, DAValidateException Validates the data before the update.- Parameters:
input- theBOForecastShiftModelto updatepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateDuration
Validates the duration: must be mandatory and greater than zero- Parameters:
duration- the duration to check- Throws:
DAValidateException- the DA validate exception
-
validateCode
Validates the code: must be mandatory and unique- Parameters:
code- the code to checkpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateFieldsLength
protected void validateFieldsLength(BOForecastShiftModel input, PoolKit pk) throws DAException, DAValidateException Validates the fields' length of theBOForecastShiftModelinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.- Parameters:
input- theBOForecastShiftModelinput 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
-