Class BTDataCollectionSheetInstanceRequestUnlock
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionSheetInstanceRequestUnlockEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DataCollectionSheetInstanceRequestUnlockEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<DataCollectionSheetInstanceRequestUnlockEvent>
overit.geocallapp.wfm.mobileforms.bl.instance.task.BTDataCollectionSheetInstanceRequestUnlock
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DataCollectionSheetInstanceRequestUnlockEvent.class)
public class BTDataCollectionSheetInstanceRequestUnlock
extends BTDataCollection<DataCollectionSheetInstanceRequestUnlockEvent>
Business task for requesting to unlock a data collection sheet.
This task processes DataCollectionSheetInstanceRequestUnlockEvent events and
sets the unlock request flag to true after validating that the sheet meets all requirements
for unlocking.
The request unlock workflow involves:
- Validating the sheet meets unlock requirements (via
DataCollectionSheetInstanceUnlockingRequestCheckEvent) - Loading the sheet from the database
- Setting the unlock request flag to true
- Updating the sheet in the database
- Since:
- 22.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckSheet(Long sheetId, PoolKit poolKit) Validates that the sheet meets all requirements for requesting unlock.protected voidexecute(DataCollectionSheetInstanceRequestUnlockEvent event, PoolKit poolKit) Executes the request unlock workflow.protected voidlaunchUpdateEvent(BODataCollectionSheet sheet, PoolKit poolKit) protected BODataCollectionSheetLoads a data collection sheet by its ID.protected voidupdateSheet(Long sheetId, PoolKit poolKit) Updates the sheet by setting the unlock request flag to true.Methods inherited from class overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection
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
-
BTDataCollectionSheetInstanceRequestUnlock
public BTDataCollectionSheetInstanceRequestUnlock()
-
-
Method Details
-
execute
protected void execute(DataCollectionSheetInstanceRequestUnlockEvent event, PoolKit poolKit) throws DAException, DAValidateException Executes the request unlock workflow.- Specified by:
executein classValidExecutionBusinessTask<DataCollectionSheetInstanceRequestUnlockEvent>- Parameters:
event- the request unlock event containing the sheet IDpoolKit- the database connection pool kit for database operations- Throws:
DAException- if a database error occursDAValidateException- if the sheet ID is null or validation fails
-
checkSheet
Validates that the sheet meets all requirements for requesting unlock.- Parameters:
sheetId- the unique identifier of the sheet to validatepoolKit- the database connection pool kit for database operations- Throws:
DAException- if a database error occurs during validationDAValidateException- if the sheet does not meet unlock requirements
-
updateSheet
Updates the sheet by setting the unlock request flag to true.- Parameters:
sheetId- the unique identifier of the sheet to updatepoolKit- the database connection pool kit for database operations- Throws:
DAException- if a database error occurs during updateDAValidateException- if validation fails during update
-
launchUpdateEvent
protected void launchUpdateEvent(BODataCollectionSheet sheet, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
loadSheet
protected BODataCollectionSheet loadSheet(Long sheetId, PoolKit poolKit) throws DAValidateException, DAException Loads a data collection sheet by its ID.- Parameters:
sheetId- the unique identifier of the sheet to loadpoolKit- the database connection pool kit for database operations- Returns:
- the loaded data collection sheet
- Throws:
DAValidateException- if the sheet ID is invalid or sheet not foundDAException- if a database error occurs during loading
-