Class BTForecastActivityInsert
java.lang.Object
overit.geocall.bl.BusinessTask<ForecastActivityInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ForecastActivityInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ForecastActivityInsertEvent>
overit.geocallapp.wfm.forecastcapacity.bl.forecast.activity.forecastactivity.task.BTForecastActivityInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ForecastActivityInsertEvent.class)
public class BTForecastActivityInsert
extends ValidPermissionBusinessTask<ForecastActivityInsertEvent>
Business task in order to insert a
When the
BOForecastActivity. When the
ForecastActivityInsertEvent is launched the BT notices the
call and inserts 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(ForecastActivityInsertEvent event, PoolKit poolKit) Inserts the givenBOForecastActivityand writes the newly generated id into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidateAndCompleteInput(BOForecastActivity input, PoolKit poolKit) Validates the data before the insertion.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
-
BTForecastActivityInsert
public BTForecastActivityInsert()
-
-
Method Details
-
execute
protected void execute(ForecastActivityInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBOForecastActivityand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<ForecastActivityInsertEvent>- Parameters:
event- theForecastActivityInsertEventpoolKit- 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 insertion.- Parameters:
input- theBOForecastActivityto insertpoolKit- 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
-