Package org.openwms.core.preferences
Class PreferencesController
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.core.preferences.PreferencesController
@MeasuredRestController
public class PreferencesController
extends org.openwms.core.http.AbstractWebController
A PreferencesController.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final org.ameba.mapping.BeanMapper
private final PreferencesService
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionPreferencesController
(PreferencesService preferencesService, org.ameba.i18n.Translator translator, org.ameba.mapping.BeanMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionprivate PropertyScope
org.springframework.http.ResponseEntity
<PreferenceVO> create
(PreferenceVO preference, Boolean strict) (package private) org.springframework.http.ResponseEntity
<Void> private void
ensurePreferenceNotExists
(PreferenceVO preference) org.springframework.http.ResponseEntity
<List<PreferenceVO>> findAll()
org.springframework.http.ResponseEntity
<List<PreferenceVO>> findAllOfScope
(String scope) org.springframework.http.ResponseEntity
<PreferenceVO> findByPKey
(String pKey) org.springframework.http.ResponseEntity
<PreferenceVO> findForOwnerAndScopeAndKey
(String owner, @NotBlank String scope, @NotBlank String key) org.springframework.http.ResponseEntity
<List<PreferenceVO>> findPreferencesForGroupName
(String owner, @NotBlank String scope, String groupName) org.springframework.http.ResponseEntity
<org.openwms.core.http.Index> index()
org.springframework.http.ResponseEntity
<PreferenceVO> update
(String pKey, PreferenceVO preference) 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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
preferencesService
-
translator
private final org.ameba.i18n.Translator translator -
mapper
private final org.ameba.mapping.BeanMapper mapper
-
-
Constructor Details
-
PreferencesController
public PreferencesController(PreferencesService preferencesService, org.ameba.i18n.Translator translator, org.ameba.mapping.BeanMapper mapper)
-
-
Method Details
-
index
@GetMapping("/v1/preferences/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index() -
findAll
@GetMapping(value="/v1/preferences", produces="application/vnd.openwms.core.preference-v1+json") public org.springframework.http.ResponseEntity<List<PreferenceVO>> findAll() -
findByPKey
@GetMapping("/v1/preferences/{pKey}") public org.springframework.http.ResponseEntity<PreferenceVO> findByPKey(@PathVariable("pKey") String pKey) -
findForOwnerAndScopeAndKey
@GetMapping(value="/v1/preferences", params={"scope","key"}) public org.springframework.http.ResponseEntity<PreferenceVO> findForOwnerAndScopeAndKey(@RequestParam(value="owner",required=false) String owner, @RequestParam("scope") @NotBlank @NotBlank String scope, @RequestParam("key") @NotBlank @NotBlank String key) -
findAllOfScope
@GetMapping(value="/v1/preferences", params="scope") public org.springframework.http.ResponseEntity<List<PreferenceVO>> findAllOfScope(@RequestParam("scope") String scope) -
findPreferencesForGroupName
@GetMapping(value="/preferences/groups", params={"scope","name"}, produces="application/json") public org.springframework.http.ResponseEntity<List<PreferenceVO>> findPreferencesForGroupName(@RequestParam(value="owner",required=false) String owner, @RequestParam("scope") @NotBlank @NotBlank String scope, @RequestParam("name") String groupName) -
convert
-
create
@Transactional @PostMapping("/v1/preferences") public org.springframework.http.ResponseEntity<PreferenceVO> create(@RequestBody PreferenceVO preference, @RequestParam(value="strict",required=false) Boolean strict) -
ensurePreferenceNotExists
-
update
@PutMapping("/v1/preferences/{pKey}") public org.springframework.http.ResponseEntity<PreferenceVO> update(@PathVariable("pKey") String pKey, @RequestBody PreferenceVO preference) -
delete
-