Class SuperuserUserService

java.lang.Object
dev.getelements.elements.service.user.AbstractUserService
dev.getelements.elements.service.user.SuperuserUserService
All Implemented Interfaces:
UserService

public class SuperuserUserService extends AbstractUserService implements UserService
Created by patricktwohig on 3/26/15.
  • Constructor Details

    • SuperuserUserService

      public SuperuserUserService()
  • 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
    • 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
    • getMapper

      public MapperRegistry getMapper()
    • setMapper

      @Inject public void setMapper(MapperRegistry mapperRegistry)
    • getUserDao

      public UserDao getUserDao()
    • setUserDao

      @Inject public void setUserDao(UserDao userDao)
    • getSessionDao

      public SessionDao getSessionDao()
    • setSessionDao

      @Inject public void setSessionDao(SessionDao sessionDao)
    • getNameService

      public NameService getNameService()
      Overrides:
      getNameService in class AbstractUserService
    • setNameService

      @Inject public void setNameService(@Named("dev.getelements.elements.service.unscoped") NameService nameService)
      Overrides:
      setNameService in class AbstractUserService
    • getPasswordGenerator

      public PasswordGenerator getPasswordGenerator()
    • setPasswordGenerator

      @Inject public void setPasswordGenerator(PasswordGenerator passwordGenerator)
    • getSessionTimeoutSeconds

      public long getSessionTimeoutSeconds()
    • setSessionTimeoutSeconds

      @Inject public void setSessionTimeoutSeconds(@Named("dev.getelements.elements.session.timeout.seconds") long sessionTimeoutSeconds)