Class AssetOperationCenterService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.assets.rs1.operationcenter.AssetOperationCenterService
@RestController
@RequestMapping("assets/r1/assets/{assetId:[0-9]+}/asset-operation-centers")
@Resource(logging=true)
public class AssetOperationCenterService
extends PrivateService
Service for manage asset operation center
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Remove an operation center relation for a given asset by calling theAssetOperationCenterDeleteEvent.org.springframework.http.ResponseEntity<DTOAssetOperationCenter> get(Long assetId, Long assetOperationCenterId, Collection<String> fields) Retrieves the required asset operation center by calling theAssetOperationCenterLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOAssetOperationCenter>> getCollection(Long assetId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOAssetOperationCenterFilter filter) Returns the collection of all the storedDTOAssetOperationCenterby calling theAssetOperationCenterSearchEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long assetId, @Valid DTOAssetOperationCenterInsert dto) Creates a new asset operation center relation by calling theAssetOperationCenterInsertEvent.
-
Constructor Details
-
AssetOperationCenterService
public AssetOperationCenterService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAssetOperationCenter>> 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 @NotNull @Valid @NotNull DTOAssetOperationCenterFilter filter) throws DAValidateException, DAException Returns the collection of all the storedDTOAssetOperationCenterby calling theAssetOperationCenterSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOAssetOperationCenterFilter- Returns:
- the collection of
DTOAssetOperationCenter - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{assetOperationCenterId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAssetOperationCenter> get(@PathVariable("assetId") Long assetId, @PathVariable("assetOperationCenterId") Long assetOperationCenterId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required asset operation center by calling theAssetOperationCenterLoadEvent.- Parameters:
assetId- the ID of the assetassetOperationCenterId- the ID of the asset operation center relation to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded asset operation center relations
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("assetId") Long assetId, @Valid @RequestBody @Valid DTOAssetOperationCenterInsert dto) throws DAValidateException, DAException Creates a new asset operation center relation by calling theAssetOperationCenterInsertEvent.- Parameters:
assetId- the ID of the assetdto- theDTOAssetOperationCenterInsert- Returns:
- the response containing the ID of the newly created asset operation center relation
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
delete
@DeleteMapping(value="{assetOperationCenterId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("assetId") Long assetId, @PathVariable("assetOperationCenterId") Long assetOperationCenterId) throws DAValidateException, DAException Remove an operation center relation for a given asset by calling theAssetOperationCenterDeleteEvent.- Parameters:
assetId- the asset idassetOperationCenterId- the asset operation center relation id- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-