public interface UserManagementService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
void |
changeGroupParent(java.util.UUID groupId,
java.util.UUID newParentId)
Sets new parent group in separate transaction.
|
java.util.Map<java.util.UUID,java.lang.String> |
changePasswordsAtLogon(java.util.List<java.util.UUID> userIds,
boolean generatePassword)
Make specified users to change passwords at next logon.
|
java.lang.Integer |
changePasswordsAtLogonAndSendEmails(java.util.List<java.util.UUID> userIds)
Update passwords for specified users, send them emails with new generated passwords and make them change
passwords at next logon.
|
void |
changeUserPassword(java.util.UUID userId,
java.lang.String newPasswordHash)
Change password for user
|
boolean |
checkPassword(java.util.UUID userId,
java.lang.String passwordHash) |
Group |
copyAccessGroup(java.util.UUID accessGroupId)
Copy access group with all its properties and subgroups.
|
Role |
copyRole(java.lang.String predefinedRoleName)
Copy predefined user role with all its permissions.
|
Role |
copyRole(java.util.UUID roleId)
Copy user role with all its permissions.
|
java.lang.String |
generateRememberMeToken(java.util.UUID userId)
Generate and store to DB
RememberMeToken |
java.util.List<java.lang.String> |
getSessionAttributeNames(java.util.UUID groupId)
Get names of session attributes defined for the given group and all its parent groups.
|
java.util.List<UserSubstitution> |
getSubstitutedUsers(java.util.UUID userId)
Get list of substituted users by user id.
|
boolean |
isAnonymousUser(java.lang.String userLogin)
Checks if user is anonymous user.
|
boolean |
isRememberMeTokenValid(java.lang.String login,
java.lang.String rememberMeToken)
Checks that the given
rememberMeToken exists and is not expired. |
boolean |
isUsersRemovingAllowed(java.util.Collection<java.lang.String> userLogins)
Checks whether removing of users with the given logins is allowed
|
java.lang.String |
loadOwnLocale()
Load current user's language.
|
UserTimeZone |
loadOwnTimeZone()
Load current user's time zone settings.
|
java.lang.Integer |
moveUsersToGroup(java.util.List<java.util.UUID> userIds,
java.lang.String targetAccessGroupName)
Move specified users to a new predefined access group.
|
java.lang.Integer |
moveUsersToGroup(java.util.List<java.util.UUID> userIds,
java.util.UUID targetAccessGroupId)
Move specified users to a new database access group.
|
void |
removeRememberMeTokens(java.util.List<java.lang.String> rememberMeTokens)
Removes the given
rememberMeTokens . |
void |
resetRememberMeTokens()
Remove remember me tokens for all users.
|
void |
resetRememberMeTokens(java.util.List<java.util.UUID> userIds)
Remove remember me tokens for users.
|
void |
saveOwnLocale(java.lang.String locale)
Save current user's language settings.
|
void |
saveOwnTimeZone(UserTimeZone timeZone)
Save current user's time zone settings.
|
static final java.lang.String NAME
Group copyAccessGroup(java.util.UUID accessGroupId)
accessGroupId
- Source access group IdRole copyRole(java.util.UUID roleId)
roleId
- Source access role IdRole copyRole(java.lang.String predefinedRoleName)
predefinedRoleName
- Source access role namejava.lang.Integer moveUsersToGroup(java.util.List<java.util.UUID> userIds, @Nullable java.util.UUID targetAccessGroupId)
userIds
- Ids for moved userstargetAccessGroupId
- Id of target access group, may be nulljava.lang.Integer moveUsersToGroup(java.util.List<java.util.UUID> userIds, @Nullable java.lang.String targetAccessGroupName)
userIds
- Ids for moved userstargetAccessGroupName
- target access group namejava.lang.Integer changePasswordsAtLogonAndSendEmails(java.util.List<java.util.UUID> userIds)
userIds
- User idsjava.util.Map<java.util.UUID,java.lang.String> changePasswordsAtLogon(java.util.List<java.util.UUID> userIds, boolean generatePassword)
userIds
- User idsgeneratePassword
- Generate new passwordsboolean checkPassword(java.util.UUID userId, java.lang.String passwordHash)
userId
- User idpasswordHash
- Plain hash of new passwordvoid resetRememberMeTokens(java.util.List<java.util.UUID> userIds)
userIds
- User idsvoid resetRememberMeTokens()
void removeRememberMeTokens(java.util.List<java.lang.String> rememberMeTokens)
rememberMeTokens
.rememberMeTokens
- remember be tokens to removeboolean isRememberMeTokenValid(java.lang.String login, java.lang.String rememberMeToken)
rememberMeToken
exists and is not expired.java.lang.String generateRememberMeToken(java.util.UUID userId)
RememberMeToken
java.util.List<java.lang.String> getSessionAttributeNames(java.util.UUID groupId)
groupId
- Group identifierUserTimeZone loadOwnTimeZone()
void saveOwnTimeZone(UserTimeZone timeZone)
java.lang.String loadOwnLocale()
void saveOwnLocale(java.lang.String locale)
void changeUserPassword(java.util.UUID userId, java.lang.String newPasswordHash)
userId
- user idnewPasswordHash
- password hashboolean isUsersRemovingAllowed(java.util.Collection<java.lang.String> userLogins)
userLogins
- user loginsvoid changeGroupParent(java.util.UUID groupId, java.util.UUID newParentId)
groupId
- id of groupnewParentId
- id of new parent groupboolean isAnonymousUser(java.lang.String userLogin)
userLogin
- user loginjava.util.List<UserSubstitution> getSubstitutedUsers(java.util.UUID userId)
userId
- user id