public interface UserService
Modifier and Type | Method and Description |
---|---|
User |
createUser(UserBuilder userBuilder,
boolean notify)
Creates new user
|
String |
createUserRequest(String username,
UserRequestType type)
Creates an user request of desired type.
|
void |
deleteUser(Integer id)
Deletes the user
|
User |
loadUserById(Integer id)
Loads
User specified by ID |
User |
loadUserByUsername(String username)
Loads
User specified by username |
void |
updateDomainAssociation(Integer userId,
Integer domainId,
UserRole... roles)
Updates user-domain association
|
void |
updateUser(Integer id,
Long version,
UserBuilder userBuilder)
Updates user specified by ID and version
|
void |
updateUserGroupAssociation(Integer userId,
Integer... userGroups)
Updates user-user group association
|
User loadUserById(Integer id)
User
specified by IDid
- of userUser
instanceRuntimeException
- if user does not existUser loadUserByUsername(String username)
User
specified by usernameusername
- of userUser
instanceRuntimeException
- if user does not exist or permission is deniedUser createUser(UserBuilder userBuilder, boolean notify)
userBuilder
- used to define user propertiesnotify
- determines whether notification email should be sendUser
RuntimeException
- if user does not exist or permission is deniedvoid updateUser(Integer id, Long version, UserBuilder userBuilder)
id
- of the user to updateversion
- of the user to updateuserBuilder
- used to define user properties to be updatedRuntimeException
- if user does not exist or permission is deniedvoid deleteUser(Integer id)
id
- of the user to deleteRuntimeException
- if user does not exist or permission is deniedvoid updateDomainAssociation(Integer userId, Integer domainId, UserRole... roles)
userId
- of the userdomainId
- of the domainroles
- UserRole
to set.RuntimeException
- if user does not exist, domain does not exist or permission is deniedvoid updateUserGroupAssociation(Integer userId, Integer... userGroups)
userId
- of the useruserGroups
- id's of the groupsRuntimeException
- if user does not exist, user groups do not exist or permission is deniedString createUserRequest(String username, UserRequestType type)
username
- username of the user the request is created for.type
- Specifies the type of the request. Available types are: LOGIN_UNATTENDED, PASSWORD_SET, PASSWORD_RESET, UNLOCK_ACCOUNT, LOGINRuntimeException
- if user does not exist or permission is deniedCopyright © 2021 BellaDati Inc.. All rights reserved.