Class RoleController

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

@Validated @MeasuredRestController public class RoleController extends org.openwms.core.http.AbstractWebController
A RoleController.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • roleService

      private final RoleService roleService
  • Constructor Details

    • RoleController

      public RoleController(RoleService roleService)
  • Method Details

    • index

      @GetMapping("/roles/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
    • findByPKey

      @GetMapping("/roles/{pKey}") public org.springframework.http.ResponseEntity<RoleVO> findByPKey(@PathVariable("pKey") String pKey)
    • findAllRoles

      @GetMapping("/roles") public org.springframework.http.ResponseEntity<List<RoleVO>> findAllRoles()
    • findUsersOfRole

      @GetMapping("/roles/{pKey}/users") public org.springframework.http.ResponseEntity<List<UserVO>> findUsersOfRole(@PathVariable("pKey") String pKey)
    • findGrantsOfRole

      @GetMapping("/roles/{pKey}/grants") public org.springframework.http.ResponseEntity<List<SecurityObjectVO>> findGrantsOfRole(@PathVariable("pKey") String pKey)
    • create

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

      @PutMapping("/roles/{pKey}") @Validated(Modify.class) public org.springframework.http.ResponseEntity<RoleVO> save(@PathVariable("pKey") String pKey, @RequestBody @Valid @NotNull @Valid @NotNull RoleVO role)
    • delete

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

      @PostMapping("/roles/{pKey}/users/{userPKey}") public org.springframework.http.ResponseEntity<RoleVO> assignUserToRole(@PathVariable("pKey") String pKey, @PathVariable("userPKey") String userPKey)
    • unassignUser

      @DeleteMapping("/roles/{pKey}/users/{userPKey}") public org.springframework.http.ResponseEntity<RoleVO> unassignUser(@PathVariable("pKey") String pKey, @PathVariable("userPKey") String userPKey)
    • replaceUsers

      private void replaceUsers(RoleVO role)
    • addSelfLink

      private void addSelfLink(RoleVO result)