Class LinearAssetLocationService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.assets.rs1.linearassetlocation.LinearAssetLocationService
@RestController
@RequestMapping("assets/r1/assets/{assetId:[0-9]+}/linear-asset-locations")
@Resource(logging=true)
public class LinearAssetLocationService
extends PrivateService
Service to manage linear asset locations.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOLinearAssetLocation> get(Long assetId, Collection<String> fields) Retrieves the requiredDTOLinearAssetLocationby calling theLinearAssetLocationLoadEvent.org.springframework.http.ResponseEntity<Void> patch(Long assetId, @Valid DTOLinearAssetLocationUpdate dto) Updates the required linear asset location by calling theLinearAssetLocationUpdateEvent.
-
Constructor Details
-
LinearAssetLocationService
public LinearAssetLocationService()
-
-
Method Details
-
get
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<DTOLinearAssetLocation> get(@PathVariable("assetId") Long assetId, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOLinearAssetLocationby calling theLinearAssetLocationLoadEvent.- Parameters:
assetId- the asset idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded asset
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("assetId") Long assetId, @Valid @RequestBody @Valid DTOLinearAssetLocationUpdate dto) throws DAValidateException, DAException Updates the required linear asset location by calling theLinearAssetLocationUpdateEvent.- Parameters:
assetId- the asset iddto- theDTOLinearAssetLocationUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-