Class UserUserService
java.lang.Object
dev.getelements.elements.service.user.AbstractUserService
dev.getelements.elements.service.user.AnonUserService
dev.getelements.elements.service.user.UserUserService
- All Implemented Interfaces:
UserService
Created by patricktwohig on 3/26/15.
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.user.UserService
CURRENT_USER_ALIAS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateUser
(UserCreateRequest user) Creates a new user.void
deleteUser
(String userId) Removes a user from the system, effectively deleting his/her account.long
Gets a user with unique user ID.getUsers
(int offset, int count) Gets a list of users the current user can see.Gets a list of users the current user can see.void
setSessionDao
(SessionDao sessionDao) void
setSessionTimeoutSeconds
(long sessionTimeoutSeconds) updateUser
(String userId, UserUpdateRequest userUpdateRequest) Updates a user, preserving the user's password.updateUserPassword
(String userId, UserUpdatePasswordRequest userUpdatePasswordRequest) Updates the User's password given theUserUpdatePasswordRequest
and the user ID.Methods inherited from class dev.getelements.elements.service.user.AnonUserService
getMapper, getPasswordGenerator, getUserDao, setMapper, setPasswordGenerator, setUserDao
Methods inherited from class dev.getelements.elements.service.user.AbstractUserService
createProfile, createProfiles, getApplicationDao, getCurrentUser, getNameService, getProfileDao, getSuperUserProfileService, setApplicationDao, setCurrentUser, setNameService, setProfileDao, setSuperUserProfileService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.getelements.elements.sdk.service.user.UserService
checkForCurrentUser, getCurrentUser, isCurrentUser, isCurrentUserAlias
-
Constructor Details
-
UserUserService
public UserUserService()
-
-
Method Details
-
getUser
Description copied from interface:UserService
Gets a user with unique user ID.- Specified by:
getUser
in interfaceUserService
- Overrides:
getUser
in classAnonUserService
- Parameters:
userId
- the UserId- Returns:
- the user ID
-
getUsers
Description copied from interface:UserService
Gets a list of users the current user can see.- Specified by:
getUsers
in interfaceUserService
- Overrides:
getUsers
in classAnonUserService
- Parameters:
offset
- the offsetcount
- the count- Returns:
- the PaginatedEntry of users
-
getUsers
Description copied from interface:UserService
Gets a list of users the current user can see.- Specified by:
getUsers
in interfaceUserService
- Overrides:
getUsers
in classAnonUserService
- Parameters:
offset
- the offsetcount
- the countsearch
- the search query- Returns:
- the PaginatedEntry of users
-
createUser
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 interfaceUserService
- Overrides:
createUser
in classAnonUserService
- Parameters:
user
- the user to create- Returns:
- the User, as it was created by the database
-
updateUser
Description copied from interface:UserService
Updates a user, preserving the user's password.- Specified by:
updateUser
in interfaceUserService
- Overrides:
updateUser
in classAnonUserService
- Parameters:
userId
- the user ID to updateuserUpdateRequest
- 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 theUserUpdatePasswordRequest
and the user ID.- Specified by:
updateUserPassword
in interfaceUserService
- Overrides:
updateUserPassword
in classAnonUserService
- Parameters:
userId
- the user ID to updateuserUpdatePasswordRequest
- theUserUpdatePasswordRequest
instance- Returns:
- a
SessionCreation
indicating new session key
-
deleteUser
Description copied from interface:UserService
Removes a user from the system, effectively deleting his/her account.- Specified by:
deleteUser
in interfaceUserService
- Overrides:
deleteUser
in classAnonUserService
- Parameters:
userId
- the userId
-
getSessionDao
-
setSessionDao
-
getSessionTimeoutSeconds
public long getSessionTimeoutSeconds() -
setSessionTimeoutSeconds
@Inject public void setSessionTimeoutSeconds(@Named("dev.getelements.elements.session.timeout.seconds") long sessionTimeoutSeconds)
-