Class OrchestratorAssetMeasuringElementMeasureService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.orchestrator.assets.rs1.asset.measuringelement.measure.OrchestratorAssetMeasuringElementMeasureService
@RestController
@RequestMapping("assets/r1/assets/{assetId:[0-9]+}/measuring-elements/{measuringElementId:[0-9]+}/measures")
@Resource(logging=true)
public class OrchestratorAssetMeasuringElementMeasureService
extends PrivateService
Service for manage measure.
- Since:
- 20.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> batchPatch(Long assetId, Long measuringElementId, @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchUpdate> batchInput) Updates multiple measures for an asset's measuring element in a single batch operation.org.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> batchPost(@Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchInsert> dtos, Long assetId, Long measuringElementId) Creates multiple measures for an asset's measuring element in a single batch operation.org.springframework.http.ResponseEntity<Void> batchReject(Long assetId, Long measuringElementId, @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchStatusChange> batchInput) Rejects a batch of measures for a specific asset's measuring element.org.springframework.http.ResponseEntity<Void> batchValidate(Long assetId, Long measuringElementId, @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchStatusChange> batchInput) Validates a batch of measures for a specific asset's measuring element.org.springframework.http.ResponseEntity<DTOAssetMeasuringElementMeasure> Retrieves a specific measure for an asset's measuring element.org.springframework.http.ResponseEntity<PageResponse<DTOAssetMeasuringElementMeasure>> getCollection(Long assetId, Long measuringElementId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOAssetMeasuringElementMeasureFilter filter) Retrieves a paginated collection of measures for a specific asset's measuring element.org.springframework.http.ResponseEntity<Void> patch(Long assetId, Long measuringElementId, Long measureId, @Valid DTOAssetMeasuringElementMeasureUpdate dto) Updates an existing measure for an asset's measuring element.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long assetId, Long measuringElementId, @Valid DTOAssetMeasuringElementMeasureInsert dto) Creates a new measure for an asset's measuring element.org.springframework.http.ResponseEntity<Void> Rejects an existing measure for an asset's measuring element.org.springframework.http.ResponseEntity<Void> Validates an existing measure for an asset's measuring element.
-
Constructor Details
-
OrchestratorAssetMeasuringElementMeasureService
public OrchestratorAssetMeasuringElementMeasureService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAssetMeasuringElementMeasure>> getCollection(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @NotNull @Valid @NotNull DTOAssetMeasuringElementMeasureFilter filter) throws DAValidateException, DAException Retrieves a paginated collection of measures for a specific asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idpage- pagination parametersfields- optional collection of fields to include in the responseorder- optional ordering specificationfilter- required filter criteria for the measures- Returns:
- a
ResponseEntitycontaining a paginated list of measures - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{measureId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAssetMeasuringElementMeasure> get(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @PathVariable("measureId") Long measureId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves a specific measure for an asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idmeasureId- the measure idfields- optional collection of fields to include in the response- Returns:
- a
ResponseEntitycontaining the requested measure - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @Valid @RequestBody @Valid DTOAssetMeasuringElementMeasureInsert dto) throws DAValidateException, DAException Creates a new measure for an asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element iddto- theDTOAssetMeasuringElementMeasureInsert- Returns:
- a
ResponseEntitycontaining the identifier of the created measure - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{measureId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @PathVariable("measureId") Long measureId, @Valid @RequestBody @Valid DTOAssetMeasuringElementMeasureUpdate dto) throws DAValidateException, DAException Updates an existing measure for an asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idmeasureId- the measure iddto- theDTOAssetMeasuringElementMeasureUpdate- Returns:
- a
ResponseEntitywith no content on successful update - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validate
@PostMapping(value="/{measureId:[0-9]+}/validations", produces="application/json") public org.springframework.http.ResponseEntity<Void> validate(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @PathVariable("measureId") Long measureId) throws DAValidateException, DAException Validates an existing measure for an asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idmeasureId- the measure id- Returns:
- a
org.springframework.http.ResponseEntity<Void>with no content on successful validation - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
reject
@PostMapping(value="/{measureId:[0-9]+}/rejections", produces="application/json") public org.springframework.http.ResponseEntity<Void> reject(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @PathVariable("measureId") Long measureId) throws DAValidateException, DAException Rejects an existing measure for an asset's measuring element.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idmeasureId- the measure id- Returns:
- a
org.springframework.http.ResponseEntity<Void>with no content on successful rejection - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
batchPost
@PostMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> batchPost(@Size(min=1,max=50) @Valid @RequestBody @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchInsert> dtos, @PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId) throws DAValidateException, DAException Creates multiple measures for an asset's measuring element in a single batch operation.- Parameters:
dtos- the list ofDTOAssetMeasuringElementMeasureBatchInsertobjects containing the measure dataassetId- the asset idmeasuringElementId- the measuring element id- Returns:
- a
ResponseEntitycontaining a list ofDTOIdentifier<Long>with the IDs of the created measures - Throws:
DAValidateException- if validation failsDAException- if a data access error occurs
-
batchPatch
@PatchMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchPatch(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @Size(min=1,max=50) @RequestBody @Valid @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchUpdate> batchInput) throws DAValidateException, DAException Updates multiple measures for an asset's measuring element in a single batch operation.- Parameters:
assetId- the asset idmeasuringElementId- the measuring element idbatchInput- the list ofDTOAssetMeasuringElementMeasureBatchUpdateobjects containing the measure updates- Returns:
- a
org.springframework.http.ResponseEntity<Void>with no content on successful update - Throws:
DAValidateException- if validation failsDAException- if a data access error occurs
-
batchValidate
@PostMapping(value="/validations/batch", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchValidate(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @Size(min=1,max=50) @RequestBody @Valid @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchStatusChange> batchInput) throws DAValidateException, DAException Validates a batch of measures for a specific asset's measuring element.This endpoint performs batch validation of multiple measures belonging to the specified measuring element of an asset. Each measure in the batch will be validated individually and transitioned to the validated status if all validation criteria are met.
- Parameters:
assetId- the ID of the asset that owns the measuring elementmeasuringElementId- the ID of the measuring element that owns the measuresbatchInput- a list ofDTOAssetMeasuringElementMeasureBatchStatusChangeobjects containing the IDs of measures to validate (min: 1, max: 50)- Returns:
- a
ResponseEntitywith no content (204) indicating successful batch validation - Throws:
DAValidateException- if validation fails for any measure or if business rules are violatedDAException- if a database access error occurs during the validation process- See Also:
-
batchReject
@PostMapping(value="/rejections/batch", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchReject(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @Size(min=1,max=50) @RequestBody @Valid @Size(min=1,max=50) @Valid List<DTOAssetMeasuringElementMeasureBatchStatusChange> batchInput) throws DAValidateException, DAException Rejects a batch of measures for a specific asset's measuring element.This endpoint performs batch rejection of multiple measures belonging to the specified measuring element of an asset. Each measure in the batch will be validated individually and transitioned to the rejected status if all validation criteria are met.
- Parameters:
assetId- the ID of the asset that owns the measuring elementmeasuringElementId- the ID of the measuring element that owns the measuresbatchInput- a list ofDTOAssetMeasuringElementMeasureBatchStatusChangeobjects containing the IDs of measures to reject (min: 1, max: 50)- Returns:
- a
ResponseEntitywith no content (204) indicating successful batch rejection - Throws:
DAValidateException- if validation fails for any measure or if business rules are violatedDAException- if a database access error occurs during the rejection process- See Also:
-