Class CharacteristicService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.characteristics.rs1.characteristic.CharacteristicService
@RestController
@RequestMapping("configurations/characteristics/r1/characteristics")
@Resource(logging=true)
public class CharacteristicService
extends PrivateService
Service to manage characteristics.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOCharacteristic> Retrieves the requiredDTOCharacteristicby calling from theCharacteristicLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOCharacteristic>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid String language, @Valid DTOCharacteristicFilter filter) Returns the collection of all the stored characteristics by calling theCharacteristicSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long characteristicId, @Valid DTOCharacteristicUpdate dto) Updates a characteristic by calling theCharacteristicUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new characteristic by calling theCharacteristicInsertEvent.
-
Constructor Details
-
CharacteristicService
public CharacteristicService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOCharacteristic>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") @Valid @Valid String language, @Valid @Valid DTOCharacteristicFilter filter) throws DAValidateException, DAException Returns the collection of all the stored characteristics by calling theCharacteristicSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldlanguage- the user languagefilter- theDTOCharacteristicFilter- Returns:
- the collection of
DTOCharacteristic - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{characteristicId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOCharacteristic> get(@PathVariable("characteristicId") Long characteristicId, @RequestParam(required=false,name="_language",defaultValue="user") @Valid @Valid String language, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOCharacteristicby calling from theCharacteristicLoadEvent.- Parameters:
characteristicId- the characteristic idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the required characteristic
- 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 DTOCharacteristicInsert dto) throws DAValidateException, DAException Creates a new characteristic by calling theCharacteristicInsertEvent.- Parameters:
dto- theDTOCharacteristicInsert- Returns:
- the standard response containing the new characteristic id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{characteristicId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("characteristicId") Long characteristicId, @Valid @RequestBody @Valid DTOCharacteristicUpdate dto) throws DAValidateException, DAException Updates a characteristic by calling theCharacteristicUpdateEvent.- Parameters:
characteristicId- the characteristic iddto- theDTOCharacteristicUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-