Package org.flowable.engine.impl
Class IdentityServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ProcessEngineConfigurationImpl>
-
- org.flowable.engine.impl.IdentityServiceImpl
-
- All Implemented Interfaces:
IdentityService
public class IdentityServiceImpl extends CommonEngineServiceImpl<ProcessEngineConfigurationImpl> implements IdentityService
- Author:
- Tom Baeyens
-
-
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 Constructor Description IdentityServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckPassword(String userId, String password)Checks if the password is valid for the given user.GroupQuerycreateGroupQuery()Creates aGroupQuerythat allows to programmatically query the groups.voidcreateMembership(String userId, String groupId)NativeGroupQuerycreateNativeGroupQuery()Returns a newNativeQueryfor tasks.NativeUserQuerycreateNativeUserQuery()Returns a newNativeQueryfor tasks.UserQuerycreateUserQuery()Creates aUserQuerythat allows to programmatically query the users.voiddeleteGroup(String groupId)Deletes the group.voiddeleteMembership(String userId, String groupId)Delete the membership of the user in the group.voiddeleteUser(String userId)voiddeleteUserInfo(String userId, String key)Delete an entry of the generic extensibility key-value pairs associated with a userprotected IdmIdentityServicegetIdmIdentityService()List<Group>getPotentialStarterGroups(String processDefinitionId)Returns the potential starter groups for a given process definition.List<User>getPotentialStarterUsers(String processDefinitionId)Returns the potential starter users for a given process definition.StringgetUserInfo(String userId, String key)Generic extensibility key-value pairs associated with a userList<String>getUserInfoKeys(String userId)Generic extensibility keys associated with a userPicturegetUserPicture(String userId)Retrieves the picture for a given user.GroupnewGroup(String groupId)Creates a new group.UsernewUser(String userId)Creates a new user.voidsaveGroup(Group group)Saves the group.voidsaveUser(User user)Saves the user.voidsetAuthenticatedUserId(String authenticatedUserId)Passes the authenticated user id for this particular thread.voidsetUserInfo(String userId, String key, String value)Generic extensibility key-value pairs associated with a uservoidsetUserPicture(String userId, Picture picture)Sets the picture for a given user.voidupdateUserPassword(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 Detail
-
IdentityServiceImpl
public IdentityServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
Method Detail
-
newGroup
public Group newGroup(String groupId)
Description copied from interface:IdentityServiceCreates a new group. The group is transient and must be saved usingIdentityService.saveGroup(Group).- Specified by:
newGroupin interfaceIdentityService- Parameters:
groupId- id for the new group, cannot be null.
-
newUser
public User newUser(String userId)
Description copied from interface:IdentityServiceCreates a new user. The user is transient and must be saved usingIdentityService.saveUser(User).- Specified by:
newUserin interfaceIdentityService- Parameters:
userId- id for the new user, cannot be null.
-
saveGroup
public void saveGroup(Group group)
Description copied from interface:IdentityServiceSaves the group. If the group already existed, the group is updated.- Specified by:
saveGroupin interfaceIdentityService- Parameters:
group- group to save. Cannot be null.
-
saveUser
public void saveUser(User user)
Description copied from interface:IdentityServiceSaves the user. If the user already existed, the user is updated except user password. UseIdentityService.updateUserPassword(User)to update existing user password.- Specified by:
saveUserin interfaceIdentityService- Parameters:
user- user to save, cannot be null.- See Also:
IdentityService.updateUserPassword(User)
-
updateUserPassword
public void updateUserPassword(User user)
Description copied from interface:IdentityServiceUpdate user password. UseIdentityService.saveUser(User)for new user.- Specified by:
updateUserPasswordin interfaceIdentityService- Parameters:
user- user password to change, cannot be null.- See Also:
IdentityService.saveUser(User)
-
createUserQuery
public UserQuery createUserQuery()
Description copied from interface:IdentityServiceCreates aUserQuerythat allows to programmatically query the users.- Specified by:
createUserQueryin interfaceIdentityService
-
createNativeUserQuery
public NativeUserQuery createNativeUserQuery()
Description copied from interface:IdentityServiceReturns a newNativeQueryfor tasks.- Specified by:
createNativeUserQueryin interfaceIdentityService
-
createGroupQuery
public GroupQuery createGroupQuery()
Description copied from interface:IdentityServiceCreates aGroupQuerythat allows to programmatically query the groups.- Specified by:
createGroupQueryin interfaceIdentityService
-
createNativeGroupQuery
public NativeGroupQuery createNativeGroupQuery()
Description copied from interface:IdentityServiceReturns a newNativeQueryfor tasks.- Specified by:
createNativeGroupQueryin interfaceIdentityService
-
getPotentialStarterGroups
public List<Group> getPotentialStarterGroups(String processDefinitionId)
Description copied from interface:IdentityServiceReturns the potential starter groups for a given process definition.- Specified by:
getPotentialStarterGroupsin interfaceIdentityService- Parameters:
processDefinitionId- process definition identifier- Returns:
- list of potential starter groups
-
getPotentialStarterUsers
public List<User> getPotentialStarterUsers(String processDefinitionId)
Description copied from interface:IdentityServiceReturns the potential starter users for a given process definition.- Specified by:
getPotentialStarterUsersin interfaceIdentityService- Parameters:
processDefinitionId- process definition identifier- Returns:
- list of potential starter users
-
createMembership
public void createMembership(String userId, String groupId)
- Specified by:
createMembershipin interfaceIdentityService- Parameters:
userId- the userId, cannot be null.groupId- the groupId, cannot be null.
-
deleteGroup
public void deleteGroup(String groupId)
Description copied from interface:IdentityServiceDeletes the group. When no group exists with the given id, this operation is ignored.- Specified by:
deleteGroupin interfaceIdentityService- Parameters:
groupId- id of the group that should be deleted, cannot be null.
-
deleteMembership
public void deleteMembership(String userId, String groupId)
Description copied from interface:IdentityServiceDelete 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:
deleteMembershipin interfaceIdentityService- Parameters:
userId- the user's id, cannot be null.groupId- the group's id, cannot be null.
-
checkPassword
public boolean checkPassword(String userId, String password)
Description copied from interface:IdentityServiceChecks if the password is valid for the given user. Arguments userId and password are nullsafe.- Specified by:
checkPasswordin interfaceIdentityService
-
deleteUser
public void deleteUser(String userId)
- Specified by:
deleteUserin interfaceIdentityService- Parameters:
userId- id of user to delete, cannot be null. When an id is passed for a non-existent user, this operation is ignored.
-
setUserPicture
public void setUserPicture(String userId, Picture picture)
Description copied from interface:IdentityServiceSets the picture for a given user.- Specified by:
setUserPicturein interfaceIdentityServicepicture- can be null to delete the picture.
-
getUserPicture
public Picture getUserPicture(String userId)
Description copied from interface:IdentityServiceRetrieves the picture for a given user.- Specified by:
getUserPicturein interfaceIdentityService- Returns:
- null if the user doesn't have a picture.
-
setAuthenticatedUserId
public void setAuthenticatedUserId(String authenticatedUserId)
Description copied from interface:IdentityServicePasses 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:
setAuthenticatedUserIdin interfaceIdentityService
-
getUserInfo
public String getUserInfo(String userId, String key)
Description copied from interface:IdentityServiceGeneric extensibility key-value pairs associated with a user- Specified by:
getUserInfoin interfaceIdentityService
-
getUserInfoKeys
public List<String> getUserInfoKeys(String userId)
Description copied from interface:IdentityServiceGeneric extensibility keys associated with a user- Specified by:
getUserInfoKeysin interfaceIdentityService
-
setUserInfo
public void setUserInfo(String userId, String key, String value)
Description copied from interface:IdentityServiceGeneric extensibility key-value pairs associated with a user- Specified by:
setUserInfoin interfaceIdentityService
-
deleteUserInfo
public void deleteUserInfo(String userId, String key)
Description copied from interface:IdentityServiceDelete an entry of the generic extensibility key-value pairs associated with a user- Specified by:
deleteUserInfoin interfaceIdentityService
-
getIdmIdentityService
protected IdmIdentityService getIdmIdentityService()
-
-