Class OrchestratorAssetMeasuringElementService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.orchestrator.assets.rs1.asset.measuringelement.OrchestratorAssetMeasuringElementService
@RestController
@RequestMapping("assets/r1/assets/{assetId:[0-9]+}/measuring-elements")
@Resource(logging=true)
public class OrchestratorAssetMeasuringElementService
extends PrivateService
Service to manage asset measuring elements.
- Since:
- 20.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOAssetMeasuringElement> get(Long assetId, Long measuringElementId, Collection<String> fields) Retrieves the requiredDTOAssetMeasuringElementby calling theMeasuringElementLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOAssetMeasuringElement>> getCollection(Long assetId, @Valid Page page, Collection<String> fields, String order, @Valid DTOAssetMeasuringElementFilter filter) Returns the collection of all the stored measuring elements related to the asset by calling theMeasuringElementSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long assetId, Long measuringElementId, @Valid DTOAssetMeasuringElementUpdate dto) Modifies the requiredDTOAssetMeasuringElementby calling theMeasuringElementUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long assetId, @Valid DTOAssetMeasuringElementInsert dto) Creates a newDTOAssetMeasuringElementby calling theMeasuringElementInsertEvent.
-
Constructor Details
-
OrchestratorAssetMeasuringElementService
public OrchestratorAssetMeasuringElementService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAssetMeasuringElement>> getCollection(@PathVariable("assetId") Long assetId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOAssetMeasuringElementFilter filter) throws DAValidateException, DAException Returns the collection of all the stored measuring elements related to the asset by calling theMeasuringElementSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOAssetMeasuringElementFilter- Returns:
- the collection of
DTOAssetMeasuringElement - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{measuringElementId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAssetMeasuringElement> get(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOAssetMeasuringElementby calling theMeasuringElementLoadEvent.- Parameters:
measuringElementId- the measuring element idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded measuring element
- 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, @Valid @RequestBody @Valid DTOAssetMeasuringElementInsert dto) throws DAValidateException, DAException Creates a newDTOAssetMeasuringElementby calling theMeasuringElementInsertEvent.- Parameters:
dto- theDTOAssetMeasuringElementInsert- Returns:
- the standard response containing the new measuring element id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{measuringElementId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("assetId") Long assetId, @PathVariable("measuringElementId") Long measuringElementId, @Valid @RequestBody @Valid DTOAssetMeasuringElementUpdate dto) throws DAValidateException, DAException Modifies the requiredDTOAssetMeasuringElementby calling theMeasuringElementUpdateEvent.- Parameters:
measuringElementId- the measuring element iddto- theDTOAssetMeasuringElementUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-