Class UserPreferenceResource


  • @RestController
    @RequestMapping("/api")
    public class UserPreferenceResource
    extends Object
    REST controller for managing UserPreference.
    • Constructor Detail

    • Method Detail

      • createUserPreference

        @PostMapping("/user-preferences")
        public org.springframework.http.ResponseEntity<UserPreference> createUserPreference​(@Valid @RequestBody
                                                                                            @Valid UserPreference userPreference)
                                                                                     throws URISyntaxException
        POST /user-preferences : Create a new userPreference.
        Parameters:
        userPreference - the userPreference to create.
        Returns:
        the ResponseEntity with status 201 (Created) and with body the new userPreference, or with status 400 (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 URISyntaxException
        PUT /user-preferences : Updates an existing userPreference.
        Parameters:
        userPreference - the userPreference to update.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated userPreference, or with status 400 (Bad Request) if the userPreference is not valid, or with status 500 (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 ResponseEntity with status 200 (OK) and with body the userPreference, or with status 404 (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 ResponseEntity with status 204 (NO_CONTENT).