Class BTResourceAddressInsert
java.lang.Object
overit.geocall.bl.BusinessTask<ResourceAddressInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ResourceAddressInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ResourceAddressInsertEvent>
overit.geocallapp.wfm.resources.bl.resource.address.task.BTResourceAddressInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ResourceAddressInsertEvent.class)
public class BTResourceAddressInsert
extends ValidPermissionBusinessTask<ResourceAddressInsertEvent>
Business task in order to insert a
When the
BOResourceAddress. When the
ResourceAddressInsertEvent is launched the BT notices the call and inserts the BOResourceAddress basing on the event's input.Required fields:
- address
- description
Permission:
Error Code:
Codes.PROPERTY_REQUIRED: Property "address" is requiredCodes.PROPERTY_REQUIRED: Property "description" is requiredCodes.ResourceAddress.RESOURCE_ADDRESS_ALREADY_PRESENTThere is already a relation between resource and address.
- 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 TypeMethodDescriptionprotected voidcheckAlreadyExists(BOResourceAddress resourceAddress, PoolKit poolKit) protected voidexecute(ResourceAddressInsertEvent event, PoolKit pk) Writes the inserted resource address id into the event journal.protected LonginsertResourceAddress(BOResourceAddress resourceAddress, PoolKit pk) booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOResourceAddress resourceAddress, PoolKit poolKit) 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
-
BTResourceAddressInsert
public BTResourceAddressInsert()
-
-
Method Details
-
execute
protected void execute(ResourceAddressInsertEvent event, PoolKit pk) throws DAException, DAValidateException Writes the inserted resource address id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<ResourceAddressInsertEvent>- Parameters:
event- theResourceAddressInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
insertResourceAddress
protected Long insertResourceAddress(BOResourceAddress resourceAddress, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
validate
protected void validate(BOResourceAddress resourceAddress, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
checkAlreadyExists
protected void checkAlreadyExists(BOResourceAddress resourceAddress, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
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
-