Class UsersController

java.lang.Object
sk.gursky.films.rest.UsersController

@CrossOrigin
@RestController
public class UsersController
extends java.lang.Object
  • Constructor Details

  • Method Details

    • getSimpleUsers

      @RequestMapping("/users") public java.util.List<SimpleUser> getSimpleUsers()
    • getToken

      @RequestMapping(value="/login", method=POST) public java.lang.String getToken​(@RequestBody NameAndPassword nameAndPassword)
    • getToken

      @RequestMapping("/logout/{token}") public void getToken​(@PathVariable java.lang.String token)
    • checkToken

      @RequestMapping("/check-token/{token}") public void checkToken​(@PathVariable java.lang.String token)
    • getPermissions

      @RequestMapping("/permissions/{token}") public java.util.Set<java.lang.String> getPermissions​(@PathVariable java.lang.String token)
      Returns set of permissions of the logged user identified by token.
      Parameters:
      token -
      Returns:
      permissions
    • testConflict

      @RequestMapping(value="/user-conflicts", method=POST) public java.util.List<java.lang.String> testConflict​(@RequestBody User user)
      Returns list of conflict fields. Possible values are 'name' and 'email'.
      Parameters:
      user -
      Returns:
    • getUsers

      @RequestMapping("/users/{token}") public java.util.List<User> getUsers​(@PathVariable java.lang.String token)
    • getMyUserById

      @RequestMapping("/bg-user/{id}/{token}") public MyUser getMyUserById​(@PathVariable java.lang.Long id, @PathVariable java.lang.String token)
    • getUserById

      @RequestMapping("/user/{id}/{token}") public User getUserById​(@PathVariable java.lang.Long id, @PathVariable java.lang.String token)
    • saveUser

      @ResponseStatus(CREATED) @RequestMapping(value="/users/{token}", method=POST) public User saveUser​(@PathVariable java.lang.String token, @RequestBody User user)
    • register

      @RequestMapping(value="/register", method=POST) public User register​(@RequestBody User user)
    • removeUserById

      @RequestMapping(value="/user/{id}/{token}", method=DELETE) public void removeUserById​(@PathVariable java.lang.Long id, @PathVariable java.lang.String token)
    • getAllGroups

      @RequestMapping("/groups") public java.util.List<Group> getAllGroups()
    • getGroupById

      @RequestMapping("/group/{id}") public Group getGroupById​(@PathVariable java.lang.Long id)
    • saveGroup

      @ResponseStatus(CREATED) @RequestMapping(value="/groups/{token}", method=POST) public Group saveGroup​(@RequestBody Group group, @PathVariable java.lang.String token)
    • removeGroupById

      @RequestMapping(value="/group/{id}/{token}", method=DELETE) public void removeGroupById​(@PathVariable java.lang.Long id, @PathVariable java.lang.String token)