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

public abstract class BTDataCollectionSheetInstanceUnlockCheckBase<I> extends BTDataCollection<I>
See Also:
  • Field Details

  • 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 load
      poolKit - 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 found
      DAException - 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 validate
      poolKit - the database connection pool kit for database operations
      Throws:
      DAValidateException - if any validation check fails
      DAException - if a database error occurs during validation
    • checkLockUnlockEnabled

      protected void checkLockUnlockEnabled(BODataCollectionSheet sheet) throws DAValidateException
      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

      protected void checkClosed(BODataCollectionSheet sheet) throws DAValidateException
      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

      protected void checkAssociatedToOperation(BODataCollectionSheet sheet) throws DAValidateException
      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

      protected void checkOperation(BODataCollectionSheet sheet) throws DAValidateException
      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 validate
      poolKit - the database connection pool kit for database operations
      Throws:
      DAException - if a database error occurs while loading work order data
      DAValidateException - 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