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 void
addGroupPrivilegeMapping(String privilegeId, String groupId)
void
addUserPrivilegeMapping(String privilegeId, String userId)
TokenAuthenticationBuilder
createAuthenticationTokenBuilder()
Create a token authentication builder with which authentication tokens can be created.GroupQuery
createGroupQuery()
NativeTokenQuery
createNativeTokenQuery()
PlatformIdentityInfoBuilder
createPlatformIdentityInfoBuilder()
Create a builder for updating or creating a platform identity info.PlatformIdentityInfoQuery
createPlatformIdentityInfoQuery()
Create a query for querying platform identity infos.Privilege
createPrivilege(String name)
PrivilegeQuery
createPrivilegeQuery()
IdmProperty
createProperty(String name, String value)
TokenQuery
createTokenQuery()
UserQuery
createUserQuery()
void
deleteGroupPrivilegeMapping(String privilegeId, String groupId)
void
deletePlatformIdentityInfoById(String id)
Delete the platform identity info entry for the given idvoid
deletePlatformIdentityInfoByUserId(String userId)
Delete all platform identity info entries of the uservoid
deletePlatformIdentityInfoByUserIdAndTenantId(String userId, String tenantId)
Delete all platform identity info entries of the user in the given tenantvoid
deletePrivilege(String id)
void
deleteProperty(String name)
void
deleteToken(String tokenId)
void
deleteUserInfo(String userId, String key)
void
deleteUserPrivilegeMapping(String privilegeId, String userId)
PlatformIdentityInfo
findIdentityInfoByUserIdAndName(String userId, String name)
IdmProperty
findPropertyByName(String name)
<T> Optional<T>
getPlatformUserInfo(String userId, String name, Class<T> infoClass)
List<PrivilegeMapping>
getPrivilegeMappingsByPrivilegeId(String privilegeId)
String
getUserInfo(String userId, String key)
List<String>
getUserInfoKeys(String userId)
Picture
getUserPicture(String userId)
Token
newToken(String tokenId)
void
saveToken(Token token)
void
setAuthenticatedUserId(String authenticatedUserId)
void
setPlatformUserInfo(String userId, String name, Object value)
void
setUserDefinitionById(String userId, String userDefinitionId)
Update the user definition of the provided user.void
setUserDefinitionByKey(String userId, String userDefinitionKey, String tenantId)
Update the user definition of the provided user.void
setUserInfo(String userId, String key, String value)
void
setUserPicture(String userId, Picture picture)
void
setUserStateAndSubState(String userId, String state, String subState)
Update the state and/or subState of the provided user.void
setUserStateAndSubState(String userId, String state, String subState, String tenantId)
Update the state and/or subState of the provided user.void
updateProperty(IdmProperty idmProperty)
void
updateUserPresence(String userId, String presence)
Updates the presence status of the uservoid
updateUserPresence(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:PlatformIdentityService
Update the state and/or subState of the provided user. If the value for the state isnull
then the state of the user won't be changed. If the value for the subState isnull
then the subState of the user won't be changed. At least one of state and / or subState must be set- Specified by:
setUserStateAndSubState
in interfacePlatformIdentityService
- Parameters:
userId
- the id of the user that needs to have its state updatedstate
- the optional new state to set, ifnull
it won't be changedsubState
- the optional new subState to set, ifnull
it 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:PlatformIdentityService
Update the state and/or subState of the provided user. If the value for the state isnull
then the state of the user won't be changed. If the value for the subState isnull
then the subState of the user won't be changed. At least one of state and / or subState must be set- Specified by:
setUserStateAndSubState
in interfacePlatformIdentityService
- Parameters:
userId
- the id of the user that needs to have its state updatedstate
- the optional new state to set, ifnull
it won't be changedsubState
- the optional new subState to set, ifnull
it 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:PlatformIdentityService
Update the user definition of the provided user.- Specified by:
setUserDefinitionById
in 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:PlatformIdentityService
Update the user definition of the provided user.- Specified by:
setUserDefinitionByKey
in 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:PlatformIdentityService
Updates the presence status of the user- Specified by:
updateUserPresence
in 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:PlatformIdentityService
Updates the presence status of the user in the given tenant- Specified by:
updateUserPresence
in 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:
createUserQuery
in interfaceIdmIdentityService
-
getPlatformUserInfo
public <T> Optional<T> getPlatformUserInfo(String userId, String name, Class<T> infoClass)
- Specified by:
getPlatformUserInfo
in interfacePlatformIdentityService
-
setPlatformUserInfo
public void setPlatformUserInfo(String userId, String name, Object value)
- Specified by:
setPlatformUserInfo
in interfacePlatformIdentityService
-
createPlatformIdentityInfoBuilder
public PlatformIdentityInfoBuilder createPlatformIdentityInfoBuilder()
Description copied from interface:PlatformIdentityService
Create a builder for updating or creating a platform identity info.- Specified by:
createPlatformIdentityInfoBuilder
in interfacePlatformIdentityService
-
createPlatformIdentityInfoQuery
public PlatformIdentityInfoQuery createPlatformIdentityInfoQuery()
Description copied from interface:PlatformIdentityService
Create a query for querying platform identity infos.- Specified by:
createPlatformIdentityInfoQuery
in interfacePlatformIdentityService
-
createGroupQuery
public GroupQuery createGroupQuery()
- Specified by:
createGroupQuery
in interfaceIdmIdentityService
-
setAuthenticatedUserId
public void setAuthenticatedUserId(String authenticatedUserId)
- Specified by:
setAuthenticatedUserId
in interfaceIdmIdentityService
-
newToken
public Token newToken(String tokenId)
- Specified by:
newToken
in interfaceIdmIdentityService
-
saveToken
public void saveToken(Token token)
- Specified by:
saveToken
in interfaceIdmIdentityService
-
deleteToken
public void deleteToken(String tokenId)
- Specified by:
deleteToken
in interfaceIdmIdentityService
-
createTokenQuery
public TokenQuery createTokenQuery()
- Specified by:
createTokenQuery
in interfaceIdmIdentityService
-
createNativeTokenQuery
public NativeTokenQuery createNativeTokenQuery()
- Specified by:
createNativeTokenQuery
in interfaceIdmIdentityService
-
setUserPicture
public void setUserPicture(String userId, Picture picture)
- Specified by:
setUserPicture
in interfaceIdmIdentityService
-
getUserPicture
public Picture getUserPicture(String userId)
- Specified by:
getUserPicture
in interfaceIdmIdentityService
-
getUserInfo
public String getUserInfo(String userId, String key)
- Specified by:
getUserInfo
in interfaceIdmIdentityService
-
getUserInfoKeys
public List<String> getUserInfoKeys(String userId)
- Specified by:
getUserInfoKeys
in interfaceIdmIdentityService
-
setUserInfo
public void setUserInfo(String userId, String key, String value)
- Specified by:
setUserInfo
in interfaceIdmIdentityService
-
deleteUserInfo
public void deleteUserInfo(String userId, String key)
- Specified by:
deleteUserInfo
in interfaceIdmIdentityService
-
createPrivilege
public Privilege createPrivilege(String name)
- Specified by:
createPrivilege
in interfaceIdmIdentityService
-
addUserPrivilegeMapping
public void addUserPrivilegeMapping(String privilegeId, String userId)
- Specified by:
addUserPrivilegeMapping
in interfaceIdmIdentityService
-
deleteUserPrivilegeMapping
public void deleteUserPrivilegeMapping(String privilegeId, String userId)
- Specified by:
deleteUserPrivilegeMapping
in interfaceIdmIdentityService
-
addGroupPrivilegeMapping
public void addGroupPrivilegeMapping(String privilegeId, String groupId)
- Specified by:
addGroupPrivilegeMapping
in interfaceIdmIdentityService
-
deleteGroupPrivilegeMapping
public void deleteGroupPrivilegeMapping(String privilegeId, String groupId)
- Specified by:
deleteGroupPrivilegeMapping
in interfaceIdmIdentityService
-
getPrivilegeMappingsByPrivilegeId
public List<PrivilegeMapping> getPrivilegeMappingsByPrivilegeId(String privilegeId)
- Specified by:
getPrivilegeMappingsByPrivilegeId
in interfaceIdmIdentityService
-
deletePrivilege
public void deletePrivilege(String id)
- Specified by:
deletePrivilege
in interfaceIdmIdentityService
-
createPrivilegeQuery
public PrivilegeQuery createPrivilegeQuery()
- Specified by:
createPrivilegeQuery
in interfaceIdmIdentityService
-
findIdentityInfoByUserIdAndName
public PlatformIdentityInfo findIdentityInfoByUserIdAndName(String userId, String name)
- Specified by:
findIdentityInfoByUserIdAndName
in interfacePlatformIdentityService
-
deletePlatformIdentityInfoById
public void deletePlatformIdentityInfoById(String id)
Description copied from interface:PlatformIdentityService
Delete the platform identity info entry for the given id- Specified by:
deletePlatformIdentityInfoById
in interfacePlatformIdentityService
- Parameters:
id
- the id of the identity info entry
-
deletePlatformIdentityInfoByUserId
public void deletePlatformIdentityInfoByUserId(String userId)
Description copied from interface:PlatformIdentityService
Delete all platform identity info entries of the user- Specified by:
deletePlatformIdentityInfoByUserId
in interfacePlatformIdentityService
- Parameters:
userId
- the id of the user
-
deletePlatformIdentityInfoByUserIdAndTenantId
public void deletePlatformIdentityInfoByUserIdAndTenantId(String userId, String tenantId)
Description copied from interface:PlatformIdentityService
Delete all platform identity info entries of the user in the given tenant- Specified by:
deletePlatformIdentityInfoByUserIdAndTenantId
in interfacePlatformIdentityService
- Parameters:
userId
- the id of the usertenantId
- the id of the tenant
-
createAuthenticationTokenBuilder
public TokenAuthenticationBuilder createAuthenticationTokenBuilder()
Description copied from interface:PlatformIdentityService
Create a token authentication builder with which authentication tokens can be created.- Specified by:
createAuthenticationTokenBuilder
in interfacePlatformIdentityService
- Returns:
- the token authentication builder
-
findPropertyByName
public IdmProperty findPropertyByName(String name)
- Specified by:
findPropertyByName
in interfacePlatformIdentityService
-
updateProperty
public void updateProperty(IdmProperty idmProperty)
- Specified by:
updateProperty
in interfacePlatformIdentityService
-
createProperty
public IdmProperty createProperty(String name, String value)
- Specified by:
createProperty
in interfacePlatformIdentityService
-
deleteProperty
public void deleteProperty(String name)
- Specified by:
deleteProperty
in interfacePlatformIdentityService
-
-