Package org.flowable.idm.engine.impl
Class IdmIdentityServiceImpl
java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<C>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<IdmEngineConfiguration>
org.flowable.idm.engine.impl.IdmIdentityServiceImpl
- All Implemented Interfaces:
IdmIdentityService
public class IdmIdentityServiceImpl
extends CommonEngineServiceImpl<IdmEngineConfiguration>
implements IdmIdentityService
- Author:
- Tijs Rademakers
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGroupPrivilegeMapping
(String privilegeId, String groupId) Assigns a privilege to a group.void
addUserPrivilegeMapping
(String privilegeId, String userId) Assigns a privilege to a user.boolean
checkPassword
(String userId, String password) Checks if the password is valid for the given user.Creates aGroupQuery
that allows to programmatically query the groups.void
createMembership
(String userId, String groupId) Returns a newNativeQuery
for tasks.Returns a newNativeQuery
for tokens.Returns a newNativeQuery
for tasks.createPrivilege
(String name) Creates a newPrivilege
with the provided name.Creates aPrivilegeQuery
that allows to programmatically query privileges.Creates aTokenQuery
that allows to programmatically query the tokens.Creates aUserQuery
that allows to programmatically query the users.void
deleteGroup
(String groupId) Deletes the group.void
deleteGroupPrivilegeMapping
(String privilegeId, String groupId) Delete a privilege for a group.void
deleteMembership
(String userId, String groupId) Delete the membership of the user in the group.void
Deletes the privilege with the given id.void
deleteToken
(String tokenId) void
deleteUser
(String userId) void
deleteUserInfo
(String userId, String key) Delete an entry of the generic extensibility key-value pairs associated with a uservoid
deleteUserPrivilegeMapping
(String privilegeId, String userId) Removes a privilege for a user.getGroupsWithPrivilege
(String name) Returns allGroup
instances that have a particular privilege.getPrivilegeMappingsByPrivilegeId
(String privilegeId) Get all privilege mappings for a specific privilegegetUserInfo
(String userId, String key) Generic extensibility key-value pairs associated with a usergetUserInfoKeys
(String userId) Generic extensibility keys associated with a usergetUserPicture
(String userId) Retrieves the picture for a given user.getUsersWithPrivilege
(String name) Returns allUser
instances that have a particular privilege.Creates a new group.Creates a new token.Creates a new user.void
Saves the group.void
Saves the token.void
Saves the user.void
setAuthenticatedUserId
(String authenticatedUserId) Passes the authenticated user id for this particular thread.void
setUserInfo
(String userId, String key, String value) Generic extensibility key-value pairs associated with a uservoid
setUserPicture
(String userId, Picture picture) Sets the picture for a given user.void
updateUserPassword
(User user) Update user password.Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
Constructor Details
-
IdmIdentityServiceImpl
-
-
Method Details
-
newGroup
Description copied from interface:IdmIdentityService
Creates a new group. The group is transient and must be saved usingIdmIdentityService.saveGroup(Group)
.- Specified by:
newGroup
in interfaceIdmIdentityService
- Parameters:
groupId
- id for the new group, cannot be null.
-
newUser
Description copied from interface:IdmIdentityService
Creates a new user. The user is transient and must be saved usingIdmIdentityService.saveUser(User)
.- Specified by:
newUser
in interfaceIdmIdentityService
- Parameters:
userId
- id for the new user, cannot be null.
-
saveGroup
Description copied from interface:IdmIdentityService
Saves the group. If the group already existed, the group is updated.- Specified by:
saveGroup
in interfaceIdmIdentityService
- Parameters:
group
- group to save. Cannot be null.
-
saveUser
Description copied from interface:IdmIdentityService
Saves the user. If the user already existed, the user is updated except user password. UseIdmIdentityService.updateUserPassword(User)
to update existing user password.- Specified by:
saveUser
in interfaceIdmIdentityService
- Parameters:
user
- user to save, cannot be null.- See Also:
-
updateUserPassword
Description copied from interface:IdmIdentityService
Update user password. UseIdmIdentityService.saveUser(User)
for new user.- Specified by:
updateUserPassword
in interfaceIdmIdentityService
- Parameters:
user
- user password to change, cannot be null.- See Also:
-
createUserQuery
Description copied from interface:IdmIdentityService
Creates aUserQuery
that allows to programmatically query the users.- Specified by:
createUserQuery
in interfaceIdmIdentityService
-
createNativeUserQuery
Description copied from interface:IdmIdentityService
Returns a newNativeQuery
for tasks.- Specified by:
createNativeUserQuery
in interfaceIdmIdentityService
-
createGroupQuery
Description copied from interface:IdmIdentityService
Creates aGroupQuery
that allows to programmatically query the groups.- Specified by:
createGroupQuery
in interfaceIdmIdentityService
-
createNativeGroupQuery
Description copied from interface:IdmIdentityService
Returns a newNativeQuery
for tasks.- Specified by:
createNativeGroupQuery
in interfaceIdmIdentityService
-
createMembership
- Specified by:
createMembership
in interfaceIdmIdentityService
- Parameters:
userId
- the userId, cannot be null.groupId
- the groupId, cannot be null.
-
deleteGroup
Description copied from interface:IdmIdentityService
Deletes the group. When no group exists with the given id, this operation is ignored.- Specified by:
deleteGroup
in interfaceIdmIdentityService
- Parameters:
groupId
- id of the group that should be deleted, cannot be null.
-
deleteMembership
Description copied from interface:IdmIdentityService
Delete the membership of the user in the group. When the group or user don't exist or when the user is not a member of the group, this operation is ignored.- Specified by:
deleteMembership
in interfaceIdmIdentityService
- Parameters:
userId
- the user's id, cannot be null.groupId
- the group's id, cannot be null.
-
checkPassword
Description copied from interface:IdmIdentityService
Checks if the password is valid for the given user. Arguments userId and password are nullsafe.- Specified by:
checkPassword
in interfaceIdmIdentityService
-
setAuthenticatedUserId
Description copied from interface:IdmIdentityService
Passes the authenticated user id for this particular thread. All service method (from any service) invocations done by the same thread will have access to this authenticatedUserId.- Specified by:
setAuthenticatedUserId
in interfaceIdmIdentityService
-
deleteUser
- Specified by:
deleteUser
in interfaceIdmIdentityService
- Parameters:
userId
- id of user to delete, cannot be null. When an id is passed for a non-existent user, this operation is ignored.
-
newToken
Description copied from interface:IdmIdentityService
Creates a new token. The token is transient and must be saved usingIdmIdentityService.saveToken(Token)
.- Specified by:
newToken
in interfaceIdmIdentityService
- Parameters:
tokenId
- id for the new token, cannot be null.
-
saveToken
Description copied from interface:IdmIdentityService
Saves the token. If the token already existed, the token is updated.- Specified by:
saveToken
in interfaceIdmIdentityService
- Parameters:
token
- token to save, cannot be null.
-
deleteToken
- Specified by:
deleteToken
in interfaceIdmIdentityService
- Parameters:
tokenId
- id of token to delete, cannot be null. When an id is passed for an non-existent token, this operation is ignored.
-
createTokenQuery
Description copied from interface:IdmIdentityService
Creates aTokenQuery
that allows to programmatically query the tokens.- Specified by:
createTokenQuery
in interfaceIdmIdentityService
-
createNativeTokenQuery
Description copied from interface:IdmIdentityService
Returns a newNativeQuery
for tokens.- Specified by:
createNativeTokenQuery
in interfaceIdmIdentityService
-
setUserPicture
Description copied from interface:IdmIdentityService
Sets the picture for a given user.- Specified by:
setUserPicture
in interfaceIdmIdentityService
picture
- can be null to delete the picture.
-
getUserPicture
Description copied from interface:IdmIdentityService
Retrieves the picture for a given user.- Specified by:
getUserPicture
in interfaceIdmIdentityService
- Returns:
- null if the user doesn't have a picture.
-
getUserInfo
Description copied from interface:IdmIdentityService
Generic extensibility key-value pairs associated with a user- Specified by:
getUserInfo
in interfaceIdmIdentityService
-
getUserInfoKeys
Description copied from interface:IdmIdentityService
Generic extensibility keys associated with a user- Specified by:
getUserInfoKeys
in interfaceIdmIdentityService
-
setUserInfo
Description copied from interface:IdmIdentityService
Generic extensibility key-value pairs associated with a user- Specified by:
setUserInfo
in interfaceIdmIdentityService
-
deleteUserInfo
Description copied from interface:IdmIdentityService
Delete an entry of the generic extensibility key-value pairs associated with a user- Specified by:
deleteUserInfo
in interfaceIdmIdentityService
-
createPrivilege
Description copied from interface:IdmIdentityService
Creates a newPrivilege
with the provided name.- Specified by:
createPrivilege
in interfaceIdmIdentityService
-
addUserPrivilegeMapping
Description copied from interface:IdmIdentityService
Assigns a privilege to a user.- Specified by:
addUserPrivilegeMapping
in interfaceIdmIdentityService
-
deleteUserPrivilegeMapping
Description copied from interface:IdmIdentityService
Removes a privilege for a user.- Specified by:
deleteUserPrivilegeMapping
in interfaceIdmIdentityService
-
addGroupPrivilegeMapping
Description copied from interface:IdmIdentityService
Assigns a privilege to a group.- Specified by:
addGroupPrivilegeMapping
in interfaceIdmIdentityService
-
deleteGroupPrivilegeMapping
Description copied from interface:IdmIdentityService
Delete a privilege for a group.- Specified by:
deleteGroupPrivilegeMapping
in interfaceIdmIdentityService
-
getPrivilegeMappingsByPrivilegeId
Description copied from interface:IdmIdentityService
Get all privilege mappings for a specific privilege- Specified by:
getPrivilegeMappingsByPrivilegeId
in interfaceIdmIdentityService
-
deletePrivilege
Description copied from interface:IdmIdentityService
Deletes the privilege with the given id. Note that this also removes all user/group mappings for this privilege.- Specified by:
deletePrivilege
in interfaceIdmIdentityService
-
createPrivilegeQuery
Description copied from interface:IdmIdentityService
Creates aPrivilegeQuery
that allows to programmatically query privileges.- Specified by:
createPrivilegeQuery
in interfaceIdmIdentityService
-
getGroupsWithPrivilege
Description copied from interface:IdmIdentityService
Returns allGroup
instances that have a particular privilege.- Specified by:
getGroupsWithPrivilege
in interfaceIdmIdentityService
-
getUsersWithPrivilege
Description copied from interface:IdmIdentityService
Returns allUser
instances that have a particular privilege.- Specified by:
getUsersWithPrivilege
in interfaceIdmIdentityService
-