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