Class PreferenceResource


  • @RestController
    @RequestMapping("/api")
    public class PreferenceResource
    extends Object
    REST controller for reading Certificate using the convenient CertificateView object. Just read-only access to this resource.
    • Constructor Detail

    • Method Detail

      • getPreference

        @GetMapping("/preference/{userId}")
        public org.springframework.http.ResponseEntity<Preferences> getPreference​(@PathVariable
                                                                                  Long userId)
        GET /preference/:id : get the "id" certificate.
        Parameters:
        userId - the id of the preference to retrieve.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the certificate, or with status 404 (Not Found).
      • updatePreference

        @PutMapping("/preference/{userId}")
        public org.springframework.http.ResponseEntity<Preferences> updatePreference​(@Valid @RequestBody
                                                                                     @Valid Preferences preferences,
                                                                                     @PathVariable
                                                                                     Long userId)
        PUT /preference : Update the preference.
        Parameters:
        preferences - the preference
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated preference, or with status 400 (Bad Request) if the preference is not valid, or with status 500 (Internal Server Error) if the preference couldn't be updated.