Class BTSchedulingUserInsert
java.lang.Object
overit.geocall.bl.BusinessTask<SchedulingUserInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SchedulingUserInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SchedulingUserInsertEvent>
overit.geocallapp.wfm.core.bl.schedule.schedulingresource.user.task.BTSchedulingUserInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(SchedulingUserInsertEvent.class)
public class BTSchedulingUserInsert
extends ValidPermissionBusinessTask<SchedulingUserInsertEvent>
Business task in order to insert a
When the
BOSchedulingUser. When the
SchedulingUserInsertEvent is launched the BT notices the
call and inserts the BOSchedulingUser basing on the event's input.
Error Code:
Codes.C270_1365: User Type not definedCodes.C270_0695: Operation center not definedCodes.C270_0722: Surname not definedCodes.C270_0245: Name not definedCodes.C270_0766: Value of filed {0} is invalid. Enter Email of type name@domain.comCodes.C270_1368: Username not definedCodes.C270_0363: Serial number not definedCodes.C270_0048: Secondary serial number not definedCodes.C270_0537: Gender value not validCodes.C270_0353: Can not insert scheduling resource. There is another scheduling resource with the same usernameCodes.C270_0441: Can not insert scheduling resource. There is another scheduling resource with the same serial numberCodes.C270_1246: Can not insert scheduling resource. There is another user with the same username
Permission:
- Since:
- 9.2
- 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 voidafterInsert(BOSchedulingUser bo, PoolKit pk) Actions to perform after the insertionprotected voidexecute(SchedulingUserInsertEvent event, PoolKit pk) Inserts a newBOSchedulingUserwith all its needed components.protected Longinsert(BOSchedulingUser boSchedulingResource, PoolKit pk) Performs theBOSchedulingUserinsertionbooleanDetermines whether the current state is valid for execution.protected voidvalidate(BOSchedulingUser boSchedulingResource, PoolKit pk) Checks if the insertion is possible by performing some validations on the givenBOSchedulingUser.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
-
BTSchedulingUserInsert
public BTSchedulingUserInsert()
-
-
Method Details
-
execute
protected void execute(SchedulingUserInsertEvent event, PoolKit pk) throws DAException, DAValidateException Inserts a newBOSchedulingUserwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<SchedulingUserInsertEvent>- Parameters:
event- theSchedulingUserInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
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
-
validate
protected void validate(BOSchedulingUser boSchedulingResource, PoolKit pk) throws DAValidateException, DAException Checks if the insertion is possible by performing some validations on the givenBOSchedulingUser. This task consider only 'Normal' resource management type, so username and password can be null- Parameters:
boSchedulingResource- the scheduling resourcepk- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insert
protected Long insert(BOSchedulingUser boSchedulingResource, PoolKit pk) throws DAException, DAValidateException Performs theBOSchedulingUserinsertion- Parameters:
boSchedulingResource- the scheduling resourcepk- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
afterInsert
Actions to perform after the insertion- Parameters:
bo- the scheduling userpk- the pool kit
-