Class BTCrewShellManagement<I>
java.lang.Object
overit.geocall.bl.BusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<I>
overit.geocallapp.wfm.crewshell.bl.task.BTCrewShellManagement<I>
- Type Parameters:
I- the generic type
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
- Direct Known Subclasses:
BTCrewShellInsert,BTCrewShellUpdate
Generic business task for Crew Shell entities.
Before executing its purpose, the task checks whether the Crew Shell module is active and if the current user has the required permissions.
Before executing its purpose, the task checks whether the Crew Shell module is active and if the current user has the required permissions.
- Since:
- 16.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 TypeMethodDescriptionbooleanDetermines whether the current state is valid for execution.protected List<BOCrewShell> retrieveCrewShellsByCode(String code, Long operationCenter, PoolKit pk) Retrieves the list ofBOCrewShellobjects having the same code.protected voidvalidateCodeDuplication(BOCrewShell input, PoolKit pk) Validates theBOCrewShellinput's code.protected voidvalidateCrewSize(BOCrewShell input, PoolKit pk) Validates theBOCrewShellinput's size.protected voidvalidateFieldsLength(BOCrewShell input, PoolKit pk) Validates the fields' length of theBOCrewShellinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.protected voidvalidateMandatoryFields(BOCrewShell input, PoolKit poolKit) Validates theBOCrewShellobject's mandatory fields.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, execute, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTCrewShellManagement
public BTCrewShellManagement()
-
-
Method Details
-
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
-
validateMandatoryFields
protected void validateMandatoryFields(BOCrewShell input, PoolKit poolKit) throws DAValidateException Validates theBOCrewShellobject's mandatory fields. Mandatory fields are code, movementType and crewSize.- Parameters:
input- theBOCrewShellobject to be insertedpoolKit- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exception
-
validateFieldsLength
Validates the fields' length of theBOCrewShellinput to be checked : code's length must not exceed 50 characters and the description's length must not exceed 255 characters.- Parameters:
input- theBOCrewShellinput to be checkedpk- thePoolKitpk- Throws:
DAValidateException- if there is a data validation exception
-
validateCrewSize
Validates theBOCrewShellinput's size. It is not possible to insert/update theBOCrewShellinput if ths size is null or smaller than 0.- Parameters:
input- theBOCrewShellinputpk- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exception
-
validateCodeDuplication
protected void validateCodeDuplication(BOCrewShell input, PoolKit pk) throws DAException, DAValidateException Validates theBOCrewShellinput's code. It is not possible to insert/update theBOCrewShellinput if there is already aBOCrewShellobject having the same operation center.- Parameters:
input- theBOCrewShellinputpk- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException
-
retrieveCrewShellsByCode
protected List<BOCrewShell> retrieveCrewShellsByCode(String code, Long operationCenter, PoolKit pk) throws DAValidateException, DAException Retrieves the list ofBOCrewShellobjects having the same code.- Parameters:
code- theBOCrewShellobject's codepk- thePoolKitpoolKit- Returns:
- the list of
BOCrewShellobjects having the same code - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-