Class UserPreferencesController

java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.core.preferences.UserPreferencesController

@Validated @MeasuredRestController public class UserPreferencesController extends org.openwms.core.http.AbstractWebController
A UserPreferencesController.
Author:
Heiko Scherrer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.ameba.mapping.BeanMapper
     
    private final PreferencesService
     
    private final org.ameba.i18n.Translator
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UserPreferencesController(PreferencesService preferencesService, org.ameba.i18n.Translator translator, org.ameba.mapping.BeanMapper mapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<List<UserPreferenceVO>>
    findByUser(@NotBlank String user)
     
    org.springframework.http.ResponseEntity<UserPreferenceVO>
    findByUserAndKey(@NotBlank String user, @NotBlank String key)
     

    Methods inherited from class org.openwms.core.http.AbstractWebController

    buildNOKResponse, buildNOKResponseWithKey, buildOKResponse, buildResponse, buildResponse, getLocationForCreatedResource, getLocationURIForCreatedResource, handleBehaviorAwareException, handleBusinessRuntimeException, handleConstraintViolationException, handleException, handleHttpBusinessException, handleRemovalNotAllowedException, handleTechnicalRuntimeException, handleValidationException, illegalArgumentException, translate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • preferencesService

      private final PreferencesService preferencesService
    • translator

      private final org.ameba.i18n.Translator translator
    • mapper

      private final org.ameba.mapping.BeanMapper mapper
  • Constructor Details

    • UserPreferencesController

      public UserPreferencesController(PreferencesService preferencesService, org.ameba.i18n.Translator translator, org.ameba.mapping.BeanMapper mapper)
  • Method Details

    • findByUser

      @GetMapping(value="/v1/preferences", params="user") public org.springframework.http.ResponseEntity<List<UserPreferenceVO>> findByUser(@RequestParam("user") @NotBlank @NotBlank String user)
    • findByUserAndKey

      @GetMapping(value="/v1/preferences", params={"user","key"}) public org.springframework.http.ResponseEntity<UserPreferenceVO> findByUserAndKey(@RequestParam("user") @NotBlank @NotBlank String user, @RequestParam("key") @NotBlank @NotBlank String key)