Package de.trustable.ca3s.core.web.rest
Class UserPreferenceResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.UserPreferenceResource
-
@RestController @RequestMapping("/api") public class UserPreferenceResource extends ObjectREST controller for managingUserPreference.
-
-
Constructor Summary
Constructors Constructor Description UserPreferenceResource(UserPreferenceService userPreferenceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<UserPreference>createUserPreference(@Valid UserPreference userPreference)POST /user-preferences: Create a new userPreference.org.springframework.http.ResponseEntity<Void>deleteUserPreference(Long id)DELETE /user-preferences/:id: delete the "id" userPreference.org.springframework.http.ResponseEntity<UserPreference>getUserPreference(Long id)GET /user-preferences/:id: get the "id" userPreference.org.springframework.http.ResponseEntity<UserPreference>updateUserPreference(@Valid UserPreference userPreference)PUT /user-preferences: Updates an existing userPreference.
-
-
-
Constructor Detail
-
UserPreferenceResource
public UserPreferenceResource(UserPreferenceService userPreferenceService)
-
-
Method Detail
-
createUserPreference
@PostMapping("/user-preferences") public org.springframework.http.ResponseEntity<UserPreference> createUserPreference(@Valid @RequestBody @Valid UserPreference userPreference) throws URISyntaxExceptionPOST /user-preferences: Create a new userPreference.- Parameters:
userPreference- the userPreference to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new userPreference, or with status400 (Bad Request)if the userPreference has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateUserPreference
@PutMapping("/user-preferences") public org.springframework.http.ResponseEntity<UserPreference> updateUserPreference(@Valid @RequestBody @Valid UserPreference userPreference) throws URISyntaxExceptionPUT /user-preferences: Updates an existing userPreference.- Parameters:
userPreference- the userPreference to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated userPreference, or with status400 (Bad Request)if the userPreference is not valid, or with status500 (Internal Server Error)if the userPreference couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getUserPreference
@GetMapping("/user-preferences/{id}") public org.springframework.http.ResponseEntity<UserPreference> getUserPreference(@PathVariable Long id)GET /user-preferences/:id: get the "id" userPreference.- Parameters:
id- the id of the userPreference to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the userPreference, or with status404 (Not Found).
-
deleteUserPreference
@DeleteMapping("/user-preferences/{id}") public org.springframework.http.ResponseEntity<Void> deleteUserPreference(@PathVariable Long id)DELETE /user-preferences/:id: delete the "id" userPreference.- Parameters:
id- the id of the userPreference to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-