Class AnonUserService

java.lang.Object
dev.getelements.elements.service.user.AbstractUserService
dev.getelements.elements.service.user.AnonUserService
All Implemented Interfaces:
UserService
Direct Known Subclasses:
UserUserService

public class AnonUserService extends AbstractUserService implements UserService
  • Constructor Details

    • AnonUserService

      public AnonUserService()
  • Method Details

    • getUser

      public User getUser(String userId)
      Description copied from interface: UserService
      Gets a user with unique user ID.
      Specified by:
      getUser in interface UserService
      Parameters:
      userId - the UserId
      Returns:
      the user ID
    • getUsers

      public Pagination<User> getUsers(int offset, int count)
      Description copied from interface: UserService
      Gets a list of users the current user can see.
      Specified by:
      getUsers in interface UserService
      Parameters:
      offset - the offset
      count - the count
      Returns:
      the PaginatedEntry of users
    • getUsers

      public Pagination<User> getUsers(int offset, int count, String search)
      Description copied from interface: UserService
      Gets a list of users the current user can see.
      Specified by:
      getUsers in interface UserService
      Parameters:
      offset - the offset
      count - the count
      search - the search query
      Returns:
      the PaginatedEntry of users
    • createUser

      public UserCreateResponse createUser(UserCreateRequest userCreateRequest)
      Description copied from interface: UserService
      Creates a new user. The service may override or reject the request based on the current user access level.
      Specified by:
      createUser in interface UserService
      Parameters:
      userCreateRequest - the user to create
      Returns:
      the User, as it was created by the database
    • getMapper

      public MapperRegistry getMapper()
    • setMapper

      @Inject public void setMapper(MapperRegistry mapperRegistry)
    • updateUser

      public User updateUser(String userId, UserUpdateRequest userUpdateRequest)
      Description copied from interface: UserService
      Updates a user, preserving the user's password.
      Specified by:
      updateUser in interface UserService
      Parameters:
      userId - the user ID to update
      userUpdateRequest - the user to update
      Returns:
      the User, as it was updated
    • updateUserPassword

      public SessionCreation updateUserPassword(String userId, UserUpdatePasswordRequest userUpdatePasswordRequest)
      Description copied from interface: UserService
      Updates the User's password given the UserUpdatePasswordRequest and the user ID.
      Specified by:
      updateUserPassword in interface UserService
      Parameters:
      userId - the user ID to update
      userUpdatePasswordRequest - the UserUpdatePasswordRequest instance
      Returns:
      a SessionCreation indicating new session key
    • deleteUser

      public void deleteUser(String userId)
      Description copied from interface: UserService
      Removes a user from the system, effectively deleting his/her account.
      Specified by:
      deleteUser in interface UserService
      Parameters:
      userId - the userId
    • getUserDao

      public UserDao getUserDao()
    • setUserDao

      @Inject public void setUserDao(UserDao userDao)
    • getPasswordGenerator

      public PasswordGenerator getPasswordGenerator()
    • setPasswordGenerator

      @Inject public void setPasswordGenerator(PasswordGenerator passwordGenerator)