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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • preferencesService

      private final PreferencesService 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

      private PropertyScope convert(String scope)
    • create

      @Transactional @PostMapping("/v1/preferences") public org.springframework.http.ResponseEntity<PreferenceVO> create(@RequestBody PreferenceVO preference, @RequestParam(value="strict",required=false) Boolean strict)
    • ensurePreferenceNotExists

      private void ensurePreferenceNotExists(PreferenceVO preference)
    • update

      @PutMapping("/v1/preferences/{pKey}") public org.springframework.http.ResponseEntity<PreferenceVO> update(@PathVariable("pKey") String pKey, @RequestBody PreferenceVO preference)
    • delete

      @DeleteMapping("/v1/preferences/{pKey}") org.springframework.http.ResponseEntity<Void> delete(@PathVariable("pKey") String pKey)