public interface UserService
Modifier and Type | Method and Description |
---|---|
void |
changePassword(String oldPassword,
String newPassword)
Change the current user password
|
User |
createUser(String userId,
String displayName,
String emailAddress,
String password)
Create a new user in the system.
|
User |
createUserByCreateUserInfo(CreateUserInfo userInfo)
Create a new user in the system.
|
void |
deleteUser(String userId)
Delete a user who has performed no actions in the system.
|
String |
encryptPassword(String password)
Gets an encrypted version of the password.
|
Set<UserDescriptor> |
getAllUserDescriptors()
Get the full client representation of all users defined in the system as UserDescriptors.
|
Set<User> |
getAllUsers()
Get the full client representation of all users defined in the system.
|
List<AuthenticationProviderInfo> |
getAuthenticationProviderInfos()
Gets a list of authentication providers that can be specified as part of the user account in the system
|
Set<LicenseType> |
getLicenseTypes()
Retrieve the license types currently configured in the system.
|
User |
getUserByUserDescriptor(UserDescriptor userDescriptor)
Get the full client representation of a user from their userDescriptor.
|
User |
getUserByUserId(String userId)
Get the full client representation of a user given their userId.
|
UserDescriptor |
getUserDescriptorByUserId(String userId)
Get the light-weight representation of the user with the specified userId.
|
Set<UserDescriptor> |
getUserDescriptorsByUserIds(Set<String> userIds)
Get the light-weight client representation for each provided userId who can be found in the system.
|
Set<User> |
getUsersByUserDescriptors(Set<UserDescriptor> userDescriptors)
Get the full client representations for each provided userDescriptor who can be found in the system.
|
Set<User> |
getUsersByUserIds(Set<String> userIds)
Get the full client representations for every userId who can be found in the system.
|
void |
lockUser(String userId)
Locks the user with the specified userId.
|
void |
resetPassword(String userId,
String newPassword)
Reset the password of a user.
|
User |
setDefaultAuthenticatorByUserId(String userId,
String newPassword)
Sets the default authenticator for the specified user which will use the password defined in the current system.
|
User |
setExternalAuthenticatorByUserId(String userId,
String authenticator,
String authenticatorUsername)
Sets the external authenticator for the specified user.
|
void |
unlockUser(String userId)
Unlocks the user with the specified userId.
|
User |
updateUser(User user)
Update a user in the system
|
boolean |
userExists(String userId)
Test to see if a user with the specified userId exists in the system.
|
User createUserByCreateUserInfo(CreateUserInfo userInfo) throws UserExistsException, UserPasswordException
userInfo
- CreateUserInfo structure with values to use in the creation of a new user instance.UserExistsException
- Thrown when a user with the specified userId already exists in the system.UserPasswordException
- Thrown when the initial password specified is not valid for the system.User createUser(String userId, String displayName, String emailAddress, String password) throws UserExistsException, UserPasswordException
userId
- The userId of the user to create.displayName
- The displayName to be shown for the user.emailAddress
- The new user's email address.password
- The initial password value for this user.UserExistsException
- Thrown when a user with the specified userId already exists in the system.UserPasswordException
- Thrown when the initial password specified is not valid for the system.User updateUser(User user) throws UserNotFoundException
user
- The user to be updated.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.void deleteUser(String userId) throws UserNotFoundException, UserDeleteException
userId
- The userId of the user to delete from the system.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.UserDeleteException
- Thrown when a user can not be deleted because they have previously logged into the
system.void changePassword(String oldPassword, String newPassword) throws UserPasswordException, AuthenticationException
oldPassword
- The old password for the current user.newPassword
- The new password for the current user.UserPasswordException
- Thrown if a password specified is not valid for the system.AuthenticationException
- Thrown if the oldPassword is incorrect, or the account being used is
locked, expired or inactive.void resetPassword(String userId, String newPassword) throws UserNotFoundException, UserPasswordException
userId
- The userId of the user to be assigned a new password.newPassword
- The new password to assign to the user.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.UserPasswordException
- Thrown when the new password specified is not valid for the system.boolean userExists(String userId)
userId
- The userId to check.true
if a user already exists with this userId in the system.User getUserByUserDescriptor(UserDescriptor userDescriptor) throws UserNotFoundException
userDescriptor
- The userDescriptor of the user to fetch.UserNotFoundException
- Thrown when the user specified can not be found in the system.User getUserByUserId(String userId) throws UserNotFoundException
userId
- The userId of the user to fetch.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.Set<User> getUsersByUserIds(Set<String> userIds)
userIds
- The list of userIds of the users desired.Set<User> getUsersByUserDescriptors(Set<UserDescriptor> userDescriptors)
userDescriptors
- The list of userDescriptors for the users desired.UserDescriptor getUserDescriptorByUserId(String userId) throws UserNotFoundException
userId
- The userId of the desired user.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.Set<UserDescriptor> getUserDescriptorsByUserIds(Set<String> userIds)
userIds
- The list of desired userIds.void lockUser(String userId) throws UserNotFoundException
userId
- The userId of the desired user.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.void unlockUser(String userId) throws UserNotFoundException
userId
- The userId of the desired user.UserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.Set<User> getAllUsers()
Set<UserDescriptor> getAllUserDescriptors()
String encryptPassword(String password)
SessionFactory.newSession(URL, String, String)
. It should not be used to log in to the
system interactively.password
- The clear text passwordList<AuthenticationProviderInfo> getAuthenticationProviderInfos()
User setExternalAuthenticatorByUserId(String userId, String authenticator, String authenticatorUsername) throws UserNotFoundException
setDefaultAuthenticatorByUserId(String, String)
which will require a new password.userId
- the userid of the user in which to set an external authenticatorauthenticator
- The id of the authentication providerauthenticatorUsername
- The user name in which to log in to the external authenticatorUserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.User setDefaultAuthenticatorByUserId(String userId, String newPassword) throws UserNotFoundException
userId
- the userid of the user in which to set the default authenticatornewPassword
- The new password which is required when switching from an external authenticatorUserNotFoundException
- Thrown when a user with the specified userId can not be found in the system.Set<LicenseType> getLicenseTypes()
AccountInfo
using LicenseType.getName()
.Copyright (c) 2017, SAS Institute Inc., Cary, NC, USA