Class BTBundleLock
java.lang.Object
overit.geocall.bl.BusinessTask<BundleLockEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<BundleLockEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundler<BundleLockEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundleLock
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
Business task in order to lock a list of
When the
Bundles. When the
BundleLockEvent is launched the BT notices the call and
locks the Bundles basing on the event's input. Required fields:
- list of bundle ids
Permission:
Error Code:
Codes.OPERATION_NOT_PERMITTED: Operation not allowedCodes.Bundler.BUNDLE_CANCELLED_OR_CLOSED
Visibility:
- bundle headers associated to the same current user's operation center
- Since:
- 11.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks whether the current user has the permission to edit theBundle.protected voidexecute(BundleLockEvent event, PoolKit poolKit) Locks the givenBundles by calling theBundleHeaderLockedUpdateEvent.protected BOBundleHeaderloadBundleHeader(PoolKit poolKit, Long bundleId) Loads theBOBundleHeaderrelated to the given id.protected voidlockBundle(BOBundleHeader header, PoolKit poolKit) Performs the update of theBOBundleHeaderby locking it.Methods inherited from class overit.geocallapp.wfm.bundler.bl.task.BTBundler
getException, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTBundleLock
public BTBundleLock()
-
-
Method Details
-
execute
protected void execute(BundleLockEvent event, PoolKit poolKit) throws DAException, DAValidateException Locks the givenBundles by calling theBundleHeaderLockedUpdateEvent.- Specified by:
executein classValidExecutionBusinessTask<BundleLockEvent>- Parameters:
event- theBundleUnlockEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadBundleHeader
protected BOBundleHeader loadBundleHeader(PoolKit poolKit, Long bundleId) throws DAValidateException, DAException Loads theBOBundleHeaderrelated to the given id.- Parameters:
poolKit- thePoolKitbundleId- theBundleid- Returns:
- the loaded
BOBundleHeader - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
lockBundle
protected void lockBundle(BOBundleHeader header, PoolKit poolKit) throws DAValidateException, DAException Performs the update of theBOBundleHeaderby locking it.- Parameters:
header- the currentBOBundleHeaderpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUserPermission
Checks whether the current user has the permission to edit theBundle.- Throws:
DAValidateException- the DA validate exception
-