Class DataCollectionSheetService

java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.datacollection.rs1.sheet.DataCollectionSheetService

@RestController @RequestMapping("documents/dynamic-forms/r1/sheets") @Resource(logging=true) public class DataCollectionSheetService extends PrivateService
Service for managing data collection sheets.
Since:
22.0
GCApi:
rest
  • Constructor Details

    • DataCollectionSheetService

      public DataCollectionSheetService()
  • Method Details

    • getCollection

      @GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionSheet>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @Valid @NotNull @Valid @NotNull DTODataCollectionSheetFilter filter) throws DAValidateException, DAException
      Retrieves a paginated collection of data collection sheets based on the provided search criteria.
      Parameters:
      page - the pagination parameters (page number, page size)
      fields - optional collection of field names to include in the response (for partial representation)
      order - optional ordering specification for sorting the results
      language - the language code for localized strings (defaults to user's language)
      filter - the search filter criteria for data collection sheets
      Returns:
      a ResponseEntity containing a PageResponse with the collection of DTODataCollectionSheet
      Throws:
      DAValidateException - if validation fails
      DAException - if a data access error occurs
    • get

      @GetMapping(value="{sheetId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTODataCollectionSheet> get(@PathVariable("sheetId") Long sheetId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException
      Retrieves a specific data collection sheet by its identifier.
      Parameters:
      sheetId - the unique identifier of the data collection sheet to retrieve
      language - the language code for localized strings (defaults to user's language)
      fields - optional collection of field names to include in the response (for partial representation)
      Returns:
      a ResponseEntity containing the DTODataCollectionSheet
      Throws:
      DAValidateException - if validation fails or the data collection sheet is not found
      DAException - if a data access error occurs
    • getModel

      @GetMapping(value="{sheetId:[0-9]+}/nodes", produces="application/json") public org.springframework.http.ResponseEntity<TreeModel<DTODataCollectionNode>> getModel(@PathVariable("sheetId") Long sheetId, @RequestParam(required=false,name="_language",defaultValue="user") String language) throws DAValidateException, DAException
      Retrieves the model of the required data collection sheet.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      language - the language code for localized strings (defaults to user's language)
      Returns:
      the tree model containing the sheet nodes
      Throws:
      DAValidateException - if validation fails or the data collection sheet is not found
      DAException - if a data access error occurs
    • patchNodes

      @PatchMapping(value="{sheetId:[0-9]+}/nodes", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patchNodes(@PathVariable("sheetId") Long sheetId, @RequestBody List<DTODataCollectionNodeFillIn> fillInNodes) throws DAException, DAValidateException, com.fasterxml.jackson.core.JsonProcessingException
      Fill-in the specified nodes with given values.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      fillInNodes - list of DTODataCollectionNodeFillIn elements
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful update
      Throws:
      DAException - if a data access error occurs
      DAValidateException - if validation fails
      com.fasterxml.jackson.core.JsonProcessingException - if JSON processing fails
    • associateToResource

      @PostMapping(value="{sheetId:[0-9]+}/resources", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> associateToResource(@PathVariable("sheetId") Long sheetId, @Valid @RequestBody @Valid DTODataCollectionSheetAssociateResource resourceInput) throws DAValidateException, DAException
      Associates the data collection sheet to a scheduling resource.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      resourceInput - the DTODataCollectionSheetAssociateResource containing the scheduling user
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful association
      Throws:
      DAValidateException - if validation fails
      DAException - if a data access error occurs
    • dissociateFromResource

      @DeleteMapping(value="{sheetId:[0-9]+}/resources", produces="application/json") public org.springframework.http.ResponseEntity<Void> dissociateFromResource(@PathVariable("sheetId") Long sheetId) throws DAValidateException, DAException
      Dissociates the data collection sheet from a scheduling resource.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful dissociation
      Throws:
      DAValidateException - if validation fails
      DAException - if a data access error occurs
    • associateToOperation

      @PostMapping(value="{sheetId:[0-9]+}/operations", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> associateToOperation(@PathVariable("sheetId") Long sheetId, @Valid @RequestBody @Valid DTODataCollectionSheetAssociateOperation operationInput) throws DAValidateException, DAException
      Associates the data collection sheet to a work order operation.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      operationInput - the DTODataCollectionSheetAssociateOperation containing the work order operation
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful association
      Throws:
      DAValidateException - if validation fails
      DAException - if a data access error occurs
    • dissociateFromOperation

      @DeleteMapping(value="{sheetId:[0-9]+}/operations", produces="application/json") public org.springframework.http.ResponseEntity<Void> dissociateFromOperation(@PathVariable("sheetId") Long sheetId) throws DAValidateException, DAException
      Dissociates the data collection sheet from a work order operation.
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful dissociation
      Throws:
      DAValidateException - if validation fails
      DAException - if a data access error occurs
    • changeStatus

      @PostMapping(value="{sheetId:[0-9]+}/status", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> changeStatus(@PathVariable("sheetId") Long sheetId, @Valid @RequestBody @Valid DTODataCollectionSheetStatusChange statusChange) throws DAValidateException, DAException
      Changes the status of the data collection sheet. Can change the status to FIXED (4), CLOSED (3), or CANCELLED (2).
      Parameters:
      sheetId - the unique identifier of the data collection sheet
      statusChange - the DTODataCollectionSheetStatusChange containing the new status
      Returns:
      a ResponseEntity with no content (HTTP 204) on successful status change
      Throws:
      DAValidateException - if validation fails or the status change is not allowed
      DAException - if a data access error occurs
    • unlockRequest

      @PostMapping(value="/{sheetId:[0-9]+}/unlock-requests", produces="application/json") public org.springframework.http.ResponseEntity<Void> unlockRequest(@PathVariable("sheetId") Long sheetId) throws DAValidateException, DAException
      Requests to unlock a specific data collection sheet by its identifier.
      Parameters:
      sheetId - the unique identifier of the data collection sheet to request unlock
      Returns:
      a ResponseEntity with no content
      Throws:
      DAValidateException - if validation fails or the data collection sheet is not found
      DAException - if a data access error occurs
    • unlock

      @PostMapping(value="/{sheetId:[0-9]+}/unlocks", produces="application/json") public org.springframework.http.ResponseEntity<Void> unlock(@PathVariable("sheetId") Long sheetId) throws DAValidateException, DAException
      Unlocks a specific data collection sheet by its identifier.
      Parameters:
      sheetId - the unique identifier of the data collection sheet to unlock
      Returns:
      a ResponseEntity with no content
      Throws:
      DAValidateException - if validation fails or the data collection sheet is not found
      DAException - if a data access error occurs
    • lock

      @PostMapping(value="/{sheetId:[0-9]+}/locks", produces="application/json") public org.springframework.http.ResponseEntity<Void> lock(@PathVariable("sheetId") Long sheetId) throws DAValidateException, DAException
      Locks a specific data collection sheet by its identifier.
      Parameters:
      sheetId - the unique identifier of the data collection sheet to lock
      Returns:
      a ResponseEntity with no content
      Throws:
      DAValidateException - if validation fails or the data collection sheet is not found
      DAException - if a data access error occurs
    • associateToAsset

      @PostMapping(value="{sheetId:[0-9]+}/assets", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> associateToAsset(@PathVariable Long sheetId, @Valid @RequestBody @Valid DTODataCollectionSheetAssociateAsset assetInput) throws DAValidateException, DAException
      Associates a data collection sheet with an asset.
      Parameters:
      sheetId - the ID of the data collection sheet
      assetInput - the asset association details
      Returns:
      an empty response entity
      Throws:
      DAValidateException - if validation fails
      DAException - if an error occurs during association
    • dissociateFromAsset

      @DeleteMapping(value="{sheetId:[0-9]+}/assets", produces="application/json") public org.springframework.http.ResponseEntity<Void> dissociateFromAsset(@PathVariable Long sheetId) throws DAValidateException, DAException
      Dissociates a data collection sheet from its associated asset.
      Parameters:
      sheetId - the ID of the data collection sheet
      Returns:
      an empty response entity
      Throws:
      DAValidateException - if validation fails
      DAException - if an error occurs during dissociation
    • associateToAccount

      @PostMapping(value="{sheetId:[0-9]+}/accounts", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> associateToAccount(@PathVariable Long sheetId, @Valid @RequestBody @Valid DTODataCollectionSheetAssociateAccount accountInput) throws DAValidateException, DAException
      Associates a data collection sheet with an account.
      Parameters:
      sheetId - the ID of the data collection sheet
      accountInput - the account association details
      Returns:
      an empty response entity
      Throws:
      DAValidateException - if validation fails
      DAException - if an error occurs during association
    • dissociateFromAccount

      @DeleteMapping(value="{sheetId:[0-9]+}/accounts", produces="application/json") public org.springframework.http.ResponseEntity<Void> dissociateFromAccount(@PathVariable Long sheetId) throws DAValidateException, DAException
      Dissociates a data collection sheet from its associated account.
      Parameters:
      sheetId - the ID of the data collection sheet
      Returns:
      an empty response entity
      Throws:
      DAValidateException - if validation fails
      DAException - if an error occurs during dissociation