Class AssetTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.assets.rs1.type.AssetTypeService
@RestController
@RequestMapping("assets/r1/types")
@Resource(logging=true)
public class AssetTypeService
extends PrivateService
Services to manage asset types.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOAssetType> get(Long id, String language, Collection<String> fields) Retrieves the required asset type.org.springframework.http.ResponseEntity<PageResponse<DTOAssetType>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOAssetTypeSearchFilter filter) Retrieve the all stored asset types.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOAssetTypeUpdate input) Modifies the required asset type.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOAssetTypeInsert input) Create a new asset type.
-
Constructor Details
-
AssetTypeService
public AssetTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAssetType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOAssetTypeSearchFilter filter) throws DAValidateException, DAException Retrieve the all stored asset types.AssetTypeSearchEvent- Parameters:
page- the required result pagelanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOAssetTypeSearchFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{typeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAssetType> get(@PathVariable("typeId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required asset type.AssetTypeLoadEvent- Parameters:
id- technical object type idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the required asset type
- 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 DTOAssetTypeInsert input) throws DAValidateException, DAException Create a new asset type.AssetTypeInsertEvent- Parameters:
input- theDTOAssetTypeInsert- Returns:
- a standard response containing the new asset type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{typeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("typeId") Long id, @Valid @RequestBody @Valid DTOAssetTypeUpdate input) throws DAValidateException, DAException Modifies the required asset type.AssetTypeUpdateEvent- Parameters:
id- the technical object type idinput- the technical object type updateDTOAssetType- Returns:
- a standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-