Class UserController

java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.core.uaa.UserController

@Validated @Transactional @MeasuredRestController public class UserController extends org.openwms.core.http.AbstractWebController
An UserController represents a RESTful access to Users. It is transactional by the means it is the outer application service facade that returns validated and completed User objects to its clients.
Author:
Heiko Scherrer
  • Field Details

    • translator

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

      private final UserService userService
    • userMapper

      private final UserMapper userMapper
    • roleMapper

      private final RoleMapper roleMapper
    • securityObjectMapper

      private final SecurityObjectMapper securityObjectMapper
  • Constructor Details

  • Method Details

    • index

      @GetMapping("/users/index") @Transactional(propagation=NEVER) public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
    • findByPKey

      @GetMapping("/users/{pKey}") public org.springframework.http.ResponseEntity<UserVO> findByPKey(@PathVariable("pKey") String pKey)
    • findByUsername

      @GetMapping(value="/users", params="username") public org.springframework.http.ResponseEntity<AuthenticatedUserVO> findByUsername(@RequestParam("username") String username)
    • findAllUsers

      @GetMapping("/users") public org.springframework.http.ResponseEntity<List<UserVO>> findAllUsers()
    • findGrantsForUser

      @GetMapping("/users/{pKey}/grants") public org.springframework.http.ResponseEntity<List<SecurityObjectVO>> findGrantsForUser(@PathVariable("pKey") String pKey)
    • findRolesForUser

      @GetMapping("/users/{pKey}/roles") public org.springframework.http.ResponseEntity<List<RoleVO>> findRolesForUser(@PathVariable("pKey") @NotEmpty @NotEmpty String pKey)
    • create

      @PostMapping("/users") @Validated(Create.class) public org.springframework.http.ResponseEntity<UserVO> create(@RequestBody @Valid @NotNull @Valid @NotNull UserVO vo, jakarta.servlet.http.HttpServletRequest req)
    • save

      @PutMapping("/users") @Validated(Modify.class) public org.springframework.http.ResponseEntity<UserVO> save(@RequestBody @Valid @NotNull @Valid @NotNull UserVO vo)
    • saveImage

      @PostMapping("/users/{pKey}/details/image") public org.springframework.http.ResponseEntity<Void> saveImage(@RequestBody @NotNull @NotNull String image, @PathVariable("pKey") String pKey)
    • updatePassword

      @PostMapping("/users/{pKey}/password") public org.springframework.http.ResponseEntity<UserVO> updatePassword(@PathVariable("pKey") String pKey, @RequestBody @NotNull @NotNull PasswordString password)
    • delete

      @DeleteMapping("/users/{pKey}") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("pKey") String pKey)
    • addSelfLink

      private void addSelfLink(UserVO result)