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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> associateToAccount(Long sheetId, @Valid DTODataCollectionSheetAssociateAccount accountInput) Associates a data collection sheet with an account.org.springframework.http.ResponseEntity<Void> associateToAsset(Long sheetId, @Valid DTODataCollectionSheetAssociateAsset assetInput) Associates a data collection sheet with an asset.org.springframework.http.ResponseEntity<Void> associateToOperation(Long sheetId, @Valid DTODataCollectionSheetAssociateOperation operationInput) Associates the data collection sheet to a work order operation.org.springframework.http.ResponseEntity<Void> associateToResource(Long sheetId, @Valid DTODataCollectionSheetAssociateResource resourceInput) Associates the data collection sheet to a scheduling resource.org.springframework.http.ResponseEntity<Void> changeStatus(Long sheetId, @Valid DTODataCollectionSheetStatusChange statusChange) Changes the status of the data collection sheet.org.springframework.http.ResponseEntity<Void> dissociateFromAccount(Long sheetId) Dissociates a data collection sheet from its associated account.org.springframework.http.ResponseEntity<Void> dissociateFromAsset(Long sheetId) Dissociates a data collection sheet from its associated asset.org.springframework.http.ResponseEntity<Void> dissociateFromOperation(Long sheetId) Dissociates the data collection sheet from a work order operation.org.springframework.http.ResponseEntity<Void> dissociateFromResource(Long sheetId) Dissociates the data collection sheet from a scheduling resource.org.springframework.http.ResponseEntity<DTODataCollectionSheet> get(Long sheetId, String language, Collection<String> fields) Retrieves a specific data collection sheet by its identifier.org.springframework.http.ResponseEntity<PageResponse<DTODataCollectionSheet>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTODataCollectionSheetFilter filter) Retrieves a paginated collection of data collection sheets based on the provided search criteria.org.springframework.http.ResponseEntity<TreeModel<DTODataCollectionNode>> Retrieves the model of the required data collection sheet.org.springframework.http.ResponseEntity<Void> Locks a specific data collection sheet by its identifier.org.springframework.http.ResponseEntity<Void> patchNodes(Long sheetId, List<DTODataCollectionNodeFillIn> fillInNodes) Fill-in the specified nodes with given values.org.springframework.http.ResponseEntity<Void> Unlocks a specific data collection sheet by its identifier.org.springframework.http.ResponseEntity<Void> unlockRequest(Long sheetId) Requests to unlock a specific data collection sheet by its identifier.
-
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 resultslanguage- the language code for localized strings (defaults to user's language)filter- the search filter criteria for data collection sheets- Returns:
- a
ResponseEntitycontaining aPageResponsewith the collection ofDTODataCollectionSheet - Throws:
DAValidateException- if validation failsDAException- 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 retrievelanguage- 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
ResponseEntitycontaining theDTODataCollectionSheet - Throws:
DAValidateException- if validation fails or the data collection sheet is not foundDAException- 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 sheetlanguage- 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 foundDAException- 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 sheetfillInNodes- list ofDTODataCollectionNodeFillInelements- Returns:
- a
ResponseEntitywith no content (HTTP 204) on successful update - Throws:
DAException- if a data access error occursDAValidateException- if validation failscom.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 sheetresourceInput- theDTODataCollectionSheetAssociateResourcecontaining the scheduling user- Returns:
- a
ResponseEntitywith no content (HTTP 204) on successful association - Throws:
DAValidateException- if validation failsDAException- 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
ResponseEntitywith no content (HTTP 204) on successful dissociation - Throws:
DAValidateException- if validation failsDAException- 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 sheetoperationInput- theDTODataCollectionSheetAssociateOperationcontaining the work order operation- Returns:
- a
ResponseEntitywith no content (HTTP 204) on successful association - Throws:
DAValidateException- if validation failsDAException- 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
ResponseEntitywith no content (HTTP 204) on successful dissociation - Throws:
DAValidateException- if validation failsDAException- 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 sheetstatusChange- theDTODataCollectionSheetStatusChangecontaining the new status- Returns:
- a
ResponseEntitywith no content (HTTP 204) on successful status change - Throws:
DAValidateException- if validation fails or the status change is not allowedDAException- 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
ResponseEntitywith no content - Throws:
DAValidateException- if validation fails or the data collection sheet is not foundDAException- 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
ResponseEntitywith no content - Throws:
DAValidateException- if validation fails or the data collection sheet is not foundDAException- 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
ResponseEntitywith no content - Throws:
DAValidateException- if validation fails or the data collection sheet is not foundDAException- 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 sheetassetInput- the asset association details- Returns:
- an empty response entity
- Throws:
DAValidateException- if validation failsDAException- 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 failsDAException- 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 sheetaccountInput- the account association details- Returns:
- an empty response entity
- Throws:
DAValidateException- if validation failsDAException- 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 failsDAException- if an error occurs during dissociation
-