|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserService
Represents the set of operations on a user.
| Method Summary | |
|---|---|
User |
addSdsUserToUser(Long id)
Creates and adds a SdsUser to existing User |
SdsUser |
createSdsUser(MutableUserDetails userDetails)
Instantiates a SdsUser object and populates its firstname and lastname using the provided MutableUserDetails
and returns it |
User |
createUser(MutableUserDetails userDetails)
Given a MutableUserDetails object with a unique name, creates a remote SDS user and also inserts the object into the local db. |
List<String> |
retrieveAllUsernames()
Returns all usernames from persistent data store. |
List<User> |
retrieveAllUsers()
Gets all users from persistent data store. |
List<User> |
retrieveByField(String field,
String type,
Object term,
String classVar)
Retrieves Users by a given field (eg username, gender), search type (eg =, like) search term (user provided) and classVar (eg teacher or studentUserDetails) |
List<User> |
retrieveByFields(String[] fields,
String[] values,
String classVar)
Given an array of fields and an array of values and classVar, retrieves a list of Users |
User |
retrieveById(Long userId)
Retrieves User domain object using unique userId |
User |
retrieveByResetPasswordKey(String resetPasswordKey)
Get the User object given the reset password key |
User |
retrieveUser(org.springframework.security.userdetails.UserDetails userDetails)
Retrieve user with the given user details. |
List<User> |
retrieveUserByEmailAddress(String emailAddress)
Retrieve users with the given emailAddress |
User |
retrieveUserByUsername(String username)
Retrieve user with the give username |
List<User> |
retrieveUsersByUsername(String username)
Retrieve users with a similar username as the one provided Does a LIKE comparison |
void |
updateUser(User user)
Updates the existing MutableUserDetails object |
User |
updateUserPassword(User user,
String newPassword)
Encodes a new password and updates a user in the persistent data store. |
| Method Detail |
|---|
User createUser(MutableUserDetails userDetails)
throws DuplicateUsernameException,
HttpStatusCodeException
userDetails - A user object.
User object
DuplicateUsernameException - If username is not unique.
HttpStatusCodeException - If any unexpected status code is returned from the SDS while
creating the user.User retrieveUser(org.springframework.security.userdetails.UserDetails userDetails)
userDetails - that has valid authentication credentials
User associated with the given user detailsUser retrieveUserByUsername(String username)
username -
User associated with the given usernameList<User> retrieveUsersByUsername(String username)
username -
User associated with the given usernameList<User> retrieveUserByEmailAddress(String emailAddress)
emailAddress -
Users associated with the given emailaddress
User updateUserPassword(User user,
String newPassword)
user - The user that you want to updatenewPassword - The UN-ENCODED new password that you want to put in place for
this user
List<User> retrieveAllUsers()
List<String> retrieveAllUsernames()
User retrieveById(Long userId)
throws ObjectNotFoundException
userId - Long userId to use for lookup
User
the User object with the given userId
ObjectNotFoundException - when userId
cannot be used to find the existing userSdsUser createSdsUser(MutableUserDetails userDetails)
MutableUserDetails
and returns it
userDetails - used to retrieve firstnamd and lastname
SdsUser object with firstname and lastname setvoid updateUser(User user)
MutableUserDetails object
userDetails - User addSdsUserToUser(Long id)
SdsUser to existing User
User - user
List<User> retrieveByField(String field,
String type,
Object term,
String classVar)
List<User> retrieveByFields(String[] fields,
String[] values,
String classVar)
fields - an array of field namesvalues - an array of values, the index of a value must line up with
the index in the field array
e.g.
fields[0] = "firstname"
fields[1] = "lastname"
values[0] = "Spongebob"
values[1] = "Squarepants"classVar - 'studentUserDetails' or 'teacherUserDetails'
User retrieveByResetPasswordKey(String resetPasswordKey)
resetPasswordKey - an alphanumeric string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||