Package org.openwms.core.preferences
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
Modifier and TypeFieldDescriptionprivate final org.ameba.mapping.BeanMapper
private final PreferencesService
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionUserPreferencesController
(PreferencesService preferencesService, org.ameba.i18n.Translator translator, org.ameba.mapping.BeanMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionorg.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
-
Field Details
-
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)
-