Class ResourceLatestPositionService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.gpstracking.rs1.resource.position.latest.ResourceLatestPositionService
@RestController
@RequestMapping("tracking/gps-tracking/r1/resource-positions/latest")
@Resource(logging=true)
public class ResourceLatestPositionService
extends PrivateService
Service to manage resource latest position.
- Since:
- 22.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOResourceLatestPosition> get(Long resourceLatestPositionId, Collection<String> fields) Retrieves the requiredDTOResourceLatestPositionby calling theResourceLastGPSPositionLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOResourceLatestPosition>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOResourceLatestPositionFilter filter) Returns the collection of all the stored resource latest positions by calling theResourceLastGPSPositionSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long resourceLatestPositionId, @Valid DTOResourceLatestPositionUpdate dto) Updates the required resource latest position by calling theResourceLastGPSPositionUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>>
-
Constructor Details
-
ResourceLatestPositionService
public ResourceLatestPositionService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOResourceLatestPosition>> getCollection(@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 DTOResourceLatestPositionFilter filter) throws DAValidateException, DAException Returns the collection of all the stored resource latest positions by calling theResourceLastGPSPositionSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOResourceLatestPositionFilter- Returns:
- the collection of
DTOResourceLatestPosition - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{resourceLatestPositionId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOResourceLatestPosition> get(@PathVariable("resourceLatestPositionId") Long resourceLatestPositionId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOResourceLatestPositionby calling theResourceLastGPSPositionLoadEvent.- Parameters:
resourceLatestPositionId- the resource latest position idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded resource latest position
- 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(@Valid @RequestBody @Valid DTOResourceLatestPositionInsert dto) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
patch
@PatchMapping(value="{resourceLatestPositionId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("resourceLatestPositionId") Long resourceLatestPositionId, @Valid @RequestBody @Valid DTOResourceLatestPositionUpdate dto) throws DAValidateException, DAException Updates the required resource latest position by calling theResourceLastGPSPositionUpdateEvent.- Parameters:
resourceLatestPositionId- the resource latest position iddto- theDTOResourceLatestPositionUpdate- Returns:
- the response containing the updated resource latest position
- Throws:
DAValidateExceptionDAException
-