Package com.flowable.idm.engine.impl
Class BaseIdmIdentityServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<CoreIdmEngineConfiguration>
-
- com.flowable.idm.engine.impl.BaseIdmIdentityServiceImpl
-
- All Implemented Interfaces:
PlatformIdentityService,IdmIdentityService
- Direct Known Subclasses:
IdmIdentityServiceImpl,ReadOnlyIdmIdentityService
public abstract class BaseIdmIdentityServiceImpl extends CommonEngineServiceImpl<CoreIdmEngineConfiguration> implements PlatformIdentityService
- Author:
- Tijs Rademakers, Filip Hrisafov
-
-
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 BaseIdmIdentityServiceImpl(CoreIdmEngineConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGroupPrivilegeMapping(String privilegeId, String groupId)voidaddUserPrivilegeMapping(String privilegeId, String userId)TokenAuthenticationBuildercreateAuthenticationTokenBuilder()Create a token authentication builder with which authentication tokens can be created.GroupQuerycreateGroupQuery()NativeTokenQuerycreateNativeTokenQuery()PlatformIdentityInfoBuildercreatePlatformIdentityInfoBuilder()Create a builder for updating or creating a platform identity info.PlatformIdentityInfoQuerycreatePlatformIdentityInfoQuery()Create a query for querying platform identity infos.PrivilegecreatePrivilege(String name)PrivilegeQuerycreatePrivilegeQuery()IdmPropertycreateProperty(String name, String value)TokenQuerycreateTokenQuery()UserQuerycreateUserQuery()voiddeleteGroupPrivilegeMapping(String privilegeId, String groupId)voiddeletePlatformIdentityInfoById(String id)Delete the platform identity info entry for the given idvoiddeletePlatformIdentityInfoByUserId(String userId)Delete all platform identity info entries of the uservoiddeletePlatformIdentityInfoByUserIdAndTenantId(String userId, String tenantId)Delete all platform identity info entries of the user in the given tenantvoiddeletePrivilege(String id)voiddeleteProperty(String name)voiddeleteToken(String tokenId)voiddeleteUserInfo(String userId, String key)voiddeleteUserPrivilegeMapping(String privilegeId, String userId)PlatformIdentityInfofindIdentityInfoByUserIdAndName(String userId, String name)IdmPropertyfindPropertyByName(String name)<T> Optional<T>getPlatformUserInfo(String userId, String name, Class<T> infoClass)List<PrivilegeMapping>getPrivilegeMappingsByPrivilegeId(String privilegeId)StringgetUserInfo(String userId, String key)List<String>getUserInfoKeys(String userId)PicturegetUserPicture(String userId)TokennewToken(String tokenId)voidsaveToken(Token token)voidsetAuthenticatedUserId(String authenticatedUserId)voidsetPlatformUserInfo(String userId, String name, Object value)voidsetUserDefinitionById(String userId, String userDefinitionId)Update the user definition of the provided user.voidsetUserDefinitionByKey(String userId, String userDefinitionKey, String tenantId)Update the user definition of the provided user.voidsetUserInfo(String userId, String key, String value)voidsetUserPicture(String userId, Picture picture)voidsetUserStateAndSubState(String userId, String state, String subState)Update the state and/or subState of the provided user.voidsetUserStateAndSubState(String userId, String state, String subState, String tenantId)Update the state and/or subState of the provided user.voidupdateProperty(IdmProperty idmProperty)voidupdateUserPresence(String userId, String presence)Updates the presence status of the uservoidupdateUserPresence(String userId, String tenantId, String presence)Updates the presence status of the user in the given tenant-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.flowable.idm.api.IdmIdentityService
checkPassword, createMembership, createNativeGroupQuery, createNativeUserQuery, deleteGroup, deleteMembership, deleteUser, getGroupsWithPrivilege, getUsersWithPrivilege, newGroup, newUser, saveGroup, saveUser, updateUserPassword
-
Methods inherited from interface com.flowable.core.idm.api.PlatformIdentityService
createNewGroupBuilder, createNewUserBuilder, createPlatformGroupQuery, createPlatformUserQuery, createUpdateGroupBuilder, createUpdateUserBuilder, deactivateUser, findPlatformGroupById, findPlatformGroupsForUser, findPlatformUserById, findUniqueTenantIds, reactivateUser, setUserState, setUserSubState
-
-
-
-
Constructor Detail
-
BaseIdmIdentityServiceImpl
public BaseIdmIdentityServiceImpl(CoreIdmEngineConfiguration configuration)
-
-
Method Detail
-
setUserStateAndSubState
public void setUserStateAndSubState(String userId, String state, String subState)
Description copied from interface:PlatformIdentityServiceUpdate the state and/or subState of the provided user. If the value for the state isnullthen the state of the user won't be changed. If the value for the subState isnullthen the subState of the user won't be changed. At least one of state and / or subState must be set- Specified by:
setUserStateAndSubStatein interfacePlatformIdentityService- Parameters:
userId- the id of the user that needs to have its state updatedstate- the optional new state to set, ifnullit won't be changedsubState- the optional new subState to set, ifnullit won't be changed- See Also:
for a list of commonly used states, although you can create your own ones,for a list of commonly used sub states, although you can create your own ones
-
setUserStateAndSubState
public void setUserStateAndSubState(String userId, String state, String subState, String tenantId)
Description copied from interface:PlatformIdentityServiceUpdate the state and/or subState of the provided user. If the value for the state isnullthen the state of the user won't be changed. If the value for the subState isnullthen the subState of the user won't be changed. At least one of state and / or subState must be set- Specified by:
setUserStateAndSubStatein interfacePlatformIdentityService- Parameters:
userId- the id of the user that needs to have its state updatedstate- the optional new state to set, ifnullit won't be changedsubState- the optional new subState to set, ifnullit won't be changedtenantId- the tenant id in which the change should be done- See Also:
for a list of commonly used states, although you can create your own ones,for a list of commonly used sub states, although you can create your own ones
-
setUserDefinitionById
public void setUserDefinitionById(String userId, String userDefinitionId)
Description copied from interface:PlatformIdentityServiceUpdate the user definition of the provided user.- Specified by:
setUserDefinitionByIdin interfacePlatformIdentityService- Parameters:
userId- the id of the user that needs to have its user definition updateduserDefinitionId- the user definition id of the new user definition
-
setUserDefinitionByKey
public void setUserDefinitionByKey(String userId, String userDefinitionKey, String tenantId)
Description copied from interface:PlatformIdentityServiceUpdate the user definition of the provided user.- Specified by:
setUserDefinitionByKeyin interfacePlatformIdentityService- Parameters:
userId- the id of the user that needs to have its user definition updateduserDefinitionKey- the key of the new user definitiontenantId- the tenant id of the new user definition
-
updateUserPresence
public void updateUserPresence(String userId, String presence)
Description copied from interface:PlatformIdentityServiceUpdates the presence status of the user- Specified by:
updateUserPresencein interfacePlatformIdentityService- Parameters:
userId- the id of the user for which the presence status needs to be updatedpresence- the id of the user for which the presence status needs to be updated- See Also:
for known states
-
updateUserPresence
public void updateUserPresence(String userId, String tenantId, String presence)
Description copied from interface:PlatformIdentityServiceUpdates the presence status of the user in the given tenant- Specified by:
updateUserPresencein interfacePlatformIdentityService- Parameters:
userId- the id of the user for which the presence status needs to be updatedtenantId- the id of tenant in which the presence status needs to be updatedpresence- the id of the user for which the presence status needs to be updated- See Also:
for known states
-
createUserQuery
public UserQuery createUserQuery()
- Specified by:
createUserQueryin interfaceIdmIdentityService
-
getPlatformUserInfo
public <T> Optional<T> getPlatformUserInfo(String userId, String name, Class<T> infoClass)
- Specified by:
getPlatformUserInfoin interfacePlatformIdentityService
-
setPlatformUserInfo
public void setPlatformUserInfo(String userId, String name, Object value)
- Specified by:
setPlatformUserInfoin interfacePlatformIdentityService
-
createPlatformIdentityInfoBuilder
public PlatformIdentityInfoBuilder createPlatformIdentityInfoBuilder()
Description copied from interface:PlatformIdentityServiceCreate a builder for updating or creating a platform identity info.- Specified by:
createPlatformIdentityInfoBuilderin interfacePlatformIdentityService
-
createPlatformIdentityInfoQuery
public PlatformIdentityInfoQuery createPlatformIdentityInfoQuery()
Description copied from interface:PlatformIdentityServiceCreate a query for querying platform identity infos.- Specified by:
createPlatformIdentityInfoQueryin interfacePlatformIdentityService
-
createGroupQuery
public GroupQuery createGroupQuery()
- Specified by:
createGroupQueryin interfaceIdmIdentityService
-
setAuthenticatedUserId
public void setAuthenticatedUserId(String authenticatedUserId)
- Specified by:
setAuthenticatedUserIdin interfaceIdmIdentityService
-
newToken
public Token newToken(String tokenId)
- Specified by:
newTokenin interfaceIdmIdentityService
-
saveToken
public void saveToken(Token token)
- Specified by:
saveTokenin interfaceIdmIdentityService
-
deleteToken
public void deleteToken(String tokenId)
- Specified by:
deleteTokenin interfaceIdmIdentityService
-
createTokenQuery
public TokenQuery createTokenQuery()
- Specified by:
createTokenQueryin interfaceIdmIdentityService
-
createNativeTokenQuery
public NativeTokenQuery createNativeTokenQuery()
- Specified by:
createNativeTokenQueryin interfaceIdmIdentityService
-
setUserPicture
public void setUserPicture(String userId, Picture picture)
- Specified by:
setUserPicturein interfaceIdmIdentityService
-
getUserPicture
public Picture getUserPicture(String userId)
- Specified by:
getUserPicturein interfaceIdmIdentityService
-
getUserInfo
public String getUserInfo(String userId, String key)
- Specified by:
getUserInfoin interfaceIdmIdentityService
-
getUserInfoKeys
public List<String> getUserInfoKeys(String userId)
- Specified by:
getUserInfoKeysin interfaceIdmIdentityService
-
setUserInfo
public void setUserInfo(String userId, String key, String value)
- Specified by:
setUserInfoin interfaceIdmIdentityService
-
deleteUserInfo
public void deleteUserInfo(String userId, String key)
- Specified by:
deleteUserInfoin interfaceIdmIdentityService
-
createPrivilege
public Privilege createPrivilege(String name)
- Specified by:
createPrivilegein interfaceIdmIdentityService
-
addUserPrivilegeMapping
public void addUserPrivilegeMapping(String privilegeId, String userId)
- Specified by:
addUserPrivilegeMappingin interfaceIdmIdentityService
-
deleteUserPrivilegeMapping
public void deleteUserPrivilegeMapping(String privilegeId, String userId)
- Specified by:
deleteUserPrivilegeMappingin interfaceIdmIdentityService
-
addGroupPrivilegeMapping
public void addGroupPrivilegeMapping(String privilegeId, String groupId)
- Specified by:
addGroupPrivilegeMappingin interfaceIdmIdentityService
-
deleteGroupPrivilegeMapping
public void deleteGroupPrivilegeMapping(String privilegeId, String groupId)
- Specified by:
deleteGroupPrivilegeMappingin interfaceIdmIdentityService
-
getPrivilegeMappingsByPrivilegeId
public List<PrivilegeMapping> getPrivilegeMappingsByPrivilegeId(String privilegeId)
- Specified by:
getPrivilegeMappingsByPrivilegeIdin interfaceIdmIdentityService
-
deletePrivilege
public void deletePrivilege(String id)
- Specified by:
deletePrivilegein interfaceIdmIdentityService
-
createPrivilegeQuery
public PrivilegeQuery createPrivilegeQuery()
- Specified by:
createPrivilegeQueryin interfaceIdmIdentityService
-
findIdentityInfoByUserIdAndName
public PlatformIdentityInfo findIdentityInfoByUserIdAndName(String userId, String name)
- Specified by:
findIdentityInfoByUserIdAndNamein interfacePlatformIdentityService
-
deletePlatformIdentityInfoById
public void deletePlatformIdentityInfoById(String id)
Description copied from interface:PlatformIdentityServiceDelete the platform identity info entry for the given id- Specified by:
deletePlatformIdentityInfoByIdin interfacePlatformIdentityService- Parameters:
id- the id of the identity info entry
-
deletePlatformIdentityInfoByUserId
public void deletePlatformIdentityInfoByUserId(String userId)
Description copied from interface:PlatformIdentityServiceDelete all platform identity info entries of the user- Specified by:
deletePlatformIdentityInfoByUserIdin interfacePlatformIdentityService- Parameters:
userId- the id of the user
-
deletePlatformIdentityInfoByUserIdAndTenantId
public void deletePlatformIdentityInfoByUserIdAndTenantId(String userId, String tenantId)
Description copied from interface:PlatformIdentityServiceDelete all platform identity info entries of the user in the given tenant- Specified by:
deletePlatformIdentityInfoByUserIdAndTenantIdin interfacePlatformIdentityService- Parameters:
userId- the id of the usertenantId- the id of the tenant
-
createAuthenticationTokenBuilder
public TokenAuthenticationBuilder createAuthenticationTokenBuilder()
Description copied from interface:PlatformIdentityServiceCreate a token authentication builder with which authentication tokens can be created.- Specified by:
createAuthenticationTokenBuilderin interfacePlatformIdentityService- Returns:
- the token authentication builder
-
findPropertyByName
public IdmProperty findPropertyByName(String name)
- Specified by:
findPropertyByNamein interfacePlatformIdentityService
-
updateProperty
public void updateProperty(IdmProperty idmProperty)
- Specified by:
updatePropertyin interfacePlatformIdentityService
-
createProperty
public IdmProperty createProperty(String name, String value)
- Specified by:
createPropertyin interfacePlatformIdentityService
-
deleteProperty
public void deleteProperty(String name)
- Specified by:
deletePropertyin interfacePlatformIdentityService
-
-