Class BTDataCollectionSheetInstanceUnlockCheckBase<I>
java.lang.Object
overit.geocall.bl.BusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<I>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<I>
overit.geocallapp.wfm.orchestrator.documents.mobileforms.bl.instance.task.BTDataCollectionSheetInstanceUnlockCheckBase<I>
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
- Direct Known Subclasses:
BTDataCollectionSheetInstanceUnlockCheck,BTDataCollectionSheetInstanceUnlockingRequestCheck
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidValidates that the sheet scope is associated with work order operations.protected voidcheckClosed(BODataCollectionSheet sheet) Validates that the sheet is in closed state.protected voidValidates that the lock/unlock feature is enabled for the sheet.protected voidValidates that the sheet is associated with a work order operation.protected voidcheckSheet(BODataCollectionSheet sheet, PoolKit poolKit) Performs comprehensive validation checks on the sheet before unlocking.protected voidcheckWorkorderOpen(BODataCollectionSheet sheet, PoolKit poolKit) Validates that the associated work order is open.protected DocumentsIntegrationServicegetIntegrationService(PoolKit poolKit) Gets or creates the work orders integration service instance.protected BODataCollectionSheetLoads a data collection sheet by its ID.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, execute, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
documentsIntegrationService
-
-
Constructor Details
-
BTDataCollectionSheetInstanceUnlockCheckBase
public BTDataCollectionSheetInstanceUnlockCheckBase()
-
-
Method Details
-
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
-
checkSheet
protected void checkSheet(BODataCollectionSheet sheet, PoolKit poolKit) throws DAValidateException, DAException Performs comprehensive validation checks on the sheet before unlocking.- Parameters:
sheet- the data collection sheet to validatepoolKit- the database connection pool kit for database operations- Throws:
DAValidateException- if any validation check failsDAException- if a database error occurs during validation
-
checkLockUnlockEnabled
Validates that the lock/unlock feature is enabled for the sheet.- Parameters:
sheet- the data collection sheet to validate- Throws:
DAValidateException- if lock/unlock is not supported for this sheet (error code: DATACOLLECTION_SHEET_LOCK_UNLOCK_NOT_SUPPORTED)
-
checkClosed
Validates that the sheet is in closed state.- Parameters:
sheet- the data collection sheet to validate- Throws:
DAValidateException- if the sheet is not in closed state (error code: DATACOLLECTION_SHEET_MUST_BE_IN_CLOSED_STATE)
-
checkAssociatedToOperation
Validates that the sheet scope is associated with work order operations.- Parameters:
sheet- the data collection sheet to validate- Throws:
DAValidateException- if the sheet scope is not operation-related (error code: DATACOLLECTION_SHEET_SCOPE_NOT_OPERATION)
-
checkOperation
Validates that the sheet is associated with a work order operation.- Parameters:
sheet- the data collection sheet to validate- Throws:
DAValidateException- if the sheet is not associated with a work order operation (error code: DATACOLLECTION_SHEET_NOT_ASSOCIATED_TO_WO_OPERATION)
-
checkWorkorderOpen
protected void checkWorkorderOpen(BODataCollectionSheet sheet, PoolKit poolKit) throws DAException, DAValidateException Validates that the associated work order is open.- Parameters:
sheet- the data collection sheet to validatepoolKit- the database connection pool kit for database operations- Throws:
DAException- if a database error occurs while loading work order dataDAValidateException- if the work order is closed and user lacks override permission
-
getIntegrationService
protected DocumentsIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Gets or creates the work orders integration service instance.- Parameters:
poolKit- the database connection pool kit for service initialization- Returns:
- the work orders integration service instance
- Throws:
DAValidateException- if the service cannot be created
-