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,org.flowable.idm.api.IdmIdentityService
- Direct Known Subclasses:
IdmIdentityServiceImpl,ReadOnlyIdmIdentityService
public abstract class BaseIdmIdentityServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<CoreIdmEngineConfiguration> implements PlatformIdentityService
- Author:
- Tijs Rademakers, Filip Hrisafov
-
-
Constructor Summary
Constructors Constructor Description BaseIdmIdentityServiceImpl(CoreIdmEngineConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGroupPrivilegeMapping(java.lang.String privilegeId, java.lang.String groupId)voidaddUserPrivilegeMapping(java.lang.String privilegeId, java.lang.String userId)TokenAuthenticationBuildercreateAuthenticationTokenBuilder()Create a token authentication builder with which authentication tokens can be created.org.flowable.idm.api.GroupQuerycreateGroupQuery()org.flowable.idm.api.NativeTokenQuerycreateNativeTokenQuery()PlatformIdentityInfoBuildercreatePlatformIdentityInfoBuilder()Create a builder for updating or creating a platform identity info.PlatformIdentityInfoQuerycreatePlatformIdentityInfoQuery()Create a query for querying platform identity infos.org.flowable.idm.api.PrivilegecreatePrivilege(java.lang.String name)org.flowable.idm.api.PrivilegeQuerycreatePrivilegeQuery()IdmPropertycreateProperty(java.lang.String name, java.lang.String value)org.flowable.idm.api.TokenQuerycreateTokenQuery()org.flowable.idm.api.UserQuerycreateUserQuery()voiddeleteGroupPrivilegeMapping(java.lang.String privilegeId, java.lang.String groupId)voiddeletePlatformIdentityInfoById(java.lang.String id)Delete the platform identity info entry for the given idvoiddeletePlatformIdentityInfoByUserId(java.lang.String userId)Delete all platform identity info entries of the uservoiddeletePlatformIdentityInfoByUserIdAndTenantId(java.lang.String userId, java.lang.String tenantId)Delete all platform identity info entries of the user in the given tenantvoiddeletePrivilege(java.lang.String id)voiddeleteProperty(java.lang.String name)voiddeleteToken(java.lang.String tokenId)voiddeleteUserInfo(java.lang.String userId, java.lang.String key)voiddeleteUserPrivilegeMapping(java.lang.String privilegeId, java.lang.String userId)PlatformIdentityInfofindIdentityInfoByUserIdAndName(java.lang.String userId, java.lang.String name)IdmPropertyfindPropertyByName(java.lang.String name)<T> java.util.Optional<T>getPlatformUserInfo(java.lang.String userId, java.lang.String name, java.lang.Class<T> infoClass)java.util.List<org.flowable.idm.api.PrivilegeMapping>getPrivilegeMappingsByPrivilegeId(java.lang.String privilegeId)java.lang.StringgetUserInfo(java.lang.String userId, java.lang.String key)java.util.List<java.lang.String>getUserInfoKeys(java.lang.String userId)org.flowable.idm.api.PicturegetUserPicture(java.lang.String userId)org.flowable.idm.api.TokennewToken(java.lang.String tokenId)voidsaveToken(org.flowable.idm.api.Token token)voidsetAuthenticatedUserId(java.lang.String authenticatedUserId)voidsetPlatformUserInfo(java.lang.String userId, java.lang.String name, java.lang.Object value)voidsetUserDefinitionById(java.lang.String userId, java.lang.String userDefinitionId)Update the user definition of the provided user.voidsetUserDefinitionByKey(java.lang.String userId, java.lang.String userDefinitionKey, java.lang.String tenantId)Update the user definition of the provided user.voidsetUserInfo(java.lang.String userId, java.lang.String key, java.lang.String value)voidsetUserPicture(java.lang.String userId, org.flowable.idm.api.Picture picture)voidsetUserStateAndSubState(java.lang.String userId, java.lang.String state, java.lang.String subState)Update the state and/or subState of the provided user.voidsetUserStateAndSubState(java.lang.String userId, java.lang.String state, java.lang.String subState, java.lang.String tenantId)Update the state and/or subState of the provided user.voidupdateProperty(IdmProperty idmProperty)voidupdateUserPresence(java.lang.String userId, java.lang.String presence)Updates the presence status of the uservoidupdateUserPresence(java.lang.String userId, java.lang.String tenantId, java.lang.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(java.lang.String userId, java.lang.String state, java.lang.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(java.lang.String userId, java.lang.String state, java.lang.String subState, java.lang.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(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.String userDefinitionKey, java.lang.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(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.String tenantId, java.lang.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 org.flowable.idm.api.UserQuery createUserQuery()
- Specified by:
createUserQueryin interfaceorg.flowable.idm.api.IdmIdentityService
-
getPlatformUserInfo
public <T> java.util.Optional<T> getPlatformUserInfo(java.lang.String userId, java.lang.String name, java.lang.Class<T> infoClass)- Specified by:
getPlatformUserInfoin interfacePlatformIdentityService
-
setPlatformUserInfo
public void setPlatformUserInfo(java.lang.String userId, java.lang.String name, java.lang.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 org.flowable.idm.api.GroupQuery createGroupQuery()
- Specified by:
createGroupQueryin interfaceorg.flowable.idm.api.IdmIdentityService
-
setAuthenticatedUserId
public void setAuthenticatedUserId(java.lang.String authenticatedUserId)
- Specified by:
setAuthenticatedUserIdin interfaceorg.flowable.idm.api.IdmIdentityService
-
newToken
public org.flowable.idm.api.Token newToken(java.lang.String tokenId)
- Specified by:
newTokenin interfaceorg.flowable.idm.api.IdmIdentityService
-
saveToken
public void saveToken(org.flowable.idm.api.Token token)
- Specified by:
saveTokenin interfaceorg.flowable.idm.api.IdmIdentityService
-
deleteToken
public void deleteToken(java.lang.String tokenId)
- Specified by:
deleteTokenin interfaceorg.flowable.idm.api.IdmIdentityService
-
createTokenQuery
public org.flowable.idm.api.TokenQuery createTokenQuery()
- Specified by:
createTokenQueryin interfaceorg.flowable.idm.api.IdmIdentityService
-
createNativeTokenQuery
public org.flowable.idm.api.NativeTokenQuery createNativeTokenQuery()
- Specified by:
createNativeTokenQueryin interfaceorg.flowable.idm.api.IdmIdentityService
-
setUserPicture
public void setUserPicture(java.lang.String userId, org.flowable.idm.api.Picture picture)- Specified by:
setUserPicturein interfaceorg.flowable.idm.api.IdmIdentityService
-
getUserPicture
public org.flowable.idm.api.Picture getUserPicture(java.lang.String userId)
- Specified by:
getUserPicturein interfaceorg.flowable.idm.api.IdmIdentityService
-
getUserInfo
public java.lang.String getUserInfo(java.lang.String userId, java.lang.String key)- Specified by:
getUserInfoin interfaceorg.flowable.idm.api.IdmIdentityService
-
getUserInfoKeys
public java.util.List<java.lang.String> getUserInfoKeys(java.lang.String userId)
- Specified by:
getUserInfoKeysin interfaceorg.flowable.idm.api.IdmIdentityService
-
setUserInfo
public void setUserInfo(java.lang.String userId, java.lang.String key, java.lang.String value)- Specified by:
setUserInfoin interfaceorg.flowable.idm.api.IdmIdentityService
-
deleteUserInfo
public void deleteUserInfo(java.lang.String userId, java.lang.String key)- Specified by:
deleteUserInfoin interfaceorg.flowable.idm.api.IdmIdentityService
-
createPrivilege
public org.flowable.idm.api.Privilege createPrivilege(java.lang.String name)
- Specified by:
createPrivilegein interfaceorg.flowable.idm.api.IdmIdentityService
-
addUserPrivilegeMapping
public void addUserPrivilegeMapping(java.lang.String privilegeId, java.lang.String userId)- Specified by:
addUserPrivilegeMappingin interfaceorg.flowable.idm.api.IdmIdentityService
-
deleteUserPrivilegeMapping
public void deleteUserPrivilegeMapping(java.lang.String privilegeId, java.lang.String userId)- Specified by:
deleteUserPrivilegeMappingin interfaceorg.flowable.idm.api.IdmIdentityService
-
addGroupPrivilegeMapping
public void addGroupPrivilegeMapping(java.lang.String privilegeId, java.lang.String groupId)- Specified by:
addGroupPrivilegeMappingin interfaceorg.flowable.idm.api.IdmIdentityService
-
deleteGroupPrivilegeMapping
public void deleteGroupPrivilegeMapping(java.lang.String privilegeId, java.lang.String groupId)- Specified by:
deleteGroupPrivilegeMappingin interfaceorg.flowable.idm.api.IdmIdentityService
-
getPrivilegeMappingsByPrivilegeId
public java.util.List<org.flowable.idm.api.PrivilegeMapping> getPrivilegeMappingsByPrivilegeId(java.lang.String privilegeId)
- Specified by:
getPrivilegeMappingsByPrivilegeIdin interfaceorg.flowable.idm.api.IdmIdentityService
-
deletePrivilege
public void deletePrivilege(java.lang.String id)
- Specified by:
deletePrivilegein interfaceorg.flowable.idm.api.IdmIdentityService
-
createPrivilegeQuery
public org.flowable.idm.api.PrivilegeQuery createPrivilegeQuery()
- Specified by:
createPrivilegeQueryin interfaceorg.flowable.idm.api.IdmIdentityService
-
findIdentityInfoByUserIdAndName
public PlatformIdentityInfo findIdentityInfoByUserIdAndName(java.lang.String userId, java.lang.String name)
- Specified by:
findIdentityInfoByUserIdAndNamein interfacePlatformIdentityService
-
deletePlatformIdentityInfoById
public void deletePlatformIdentityInfoById(java.lang.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(java.lang.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(java.lang.String userId, java.lang.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(java.lang.String name)
- Specified by:
findPropertyByNamein interfacePlatformIdentityService
-
updateProperty
public void updateProperty(IdmProperty idmProperty)
- Specified by:
updatePropertyin interfacePlatformIdentityService
-
createProperty
public IdmProperty createProperty(java.lang.String name, java.lang.String value)
- Specified by:
createPropertyin interfacePlatformIdentityService
-
deleteProperty
public void deleteProperty(java.lang.String name)
- Specified by:
deletePropertyin interfacePlatformIdentityService
-
-