Package org.openwms.core.uaa
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
User
s. 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 Summary
Modifier and TypeFieldDescriptionprivate final RoleMapper
private final SecurityObjectMapper
private final org.ameba.i18n.Translator
private final UserMapper
private final UserService
-
Constructor Summary
ConstructorDescriptionUserController
(org.ameba.i18n.Translator translator, UserService userService, UserMapper userMapper, RoleMapper roleMapper, SecurityObjectMapper securityObjectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addSelfLink
(UserVO result) org.springframework.http.ResponseEntity
<UserVO> org.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<UserVO> findByPKey
(String pKey) org.springframework.http.ResponseEntity
<AuthenticatedUserVO> findByUsername
(String username) org.springframework.http.ResponseEntity
<List<SecurityObjectVO>> findGrantsForUser
(String pKey) findRolesForUser
(@NotEmpty String pKey) org.springframework.http.ResponseEntity
<org.openwms.core.http.Index> index()
org.springframework.http.ResponseEntity
<UserVO> org.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<UserVO> updatePassword
(String pKey, @NotNull PasswordString password) 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
-
translator
private final org.ameba.i18n.Translator translator -
userService
-
userMapper
-
roleMapper
-
securityObjectMapper
-
-
Constructor Details
-
UserController
public UserController(org.ameba.i18n.Translator translator, UserService userService, UserMapper userMapper, RoleMapper roleMapper, SecurityObjectMapper securityObjectMapper)
-
-
Method Details
-
index
@GetMapping("/users/index") @Transactional(propagation=NEVER) public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index() -
findByPKey
-
findByUsername
@GetMapping(value="/users", params="username") public org.springframework.http.ResponseEntity<AuthenticatedUserVO> findByUsername(@RequestParam("username") String username) -
findAllUsers
-
findGrantsForUser
@GetMapping("/users/{pKey}/grants") public org.springframework.http.ResponseEntity<List<SecurityObjectVO>> findGrantsForUser(@PathVariable("pKey") String pKey) -
findRolesForUser
-
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
-
updatePassword
@PostMapping("/users/{pKey}/password") public org.springframework.http.ResponseEntity<UserVO> updatePassword(@PathVariable("pKey") String pKey, @RequestBody @NotNull @NotNull PasswordString password) -
delete
-
addSelfLink
-