Interface WritableIdentityProvider
-
- All Superinterfaces:
Session
- All Known Implementing Classes:
DbIdentityServiceProvider
public interface WritableIdentityProvider extends Session
SPI Interface for identity service implementations which offer read / write access to the user database.
- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentityOperationResult
createMembership(java.lang.String userId, java.lang.String groupId)
Creates a membership relation between a user and a group.Group
createNewGroup(java.lang.String groupId)
Returns a new (transient)Group
object.Tenant
createNewTenant(java.lang.String tenantId)
Returns a new (transient)Tenant
object.User
createNewUser(java.lang.String userId)
Returns a new (transient)User
object.IdentityOperationResult
createTenantGroupMembership(java.lang.String tenantId, java.lang.String groupId)
Creates a membership relation between a tenant and a group.IdentityOperationResult
createTenantUserMembership(java.lang.String tenantId, java.lang.String userId)
Creates a membership relation between a tenant and a user.IdentityOperationResult
deleteGroup(java.lang.String groupId)
Allows deleting a persistentGroup
object.IdentityOperationResult
deleteMembership(java.lang.String userId, java.lang.String groupId)
Deletes a membership relation between a user and a group.IdentityOperationResult
deleteTenant(java.lang.String tenantId)
Allows deleting a persistentTenant
object.IdentityOperationResult
deleteTenantGroupMembership(java.lang.String tenantId, java.lang.String groupId)
Deletes a membership relation between a tenant and a group.IdentityOperationResult
deleteTenantUserMembership(java.lang.String tenantId, java.lang.String userId)
Deletes a membership relation between a tenant and a user.IdentityOperationResult
deleteUser(java.lang.String userId)
Allows deleting a persistentUser
object.IdentityOperationResult
saveGroup(Group group)
Allows saving aGroup
object which is not yet persistent.IdentityOperationResult
saveTenant(Tenant tenant)
Allows saving aTenant
object which is not yet persistent.IdentityOperationResult
saveUser(User user)
Allows saving or updates aUser
objectIdentityOperationResult
unlockUser(java.lang.String userId)
Allows unlocking aUser
object.
-
-
-
Method Detail
-
createNewUser
User createNewUser(java.lang.String userId)
Returns a new (transient)
User
object. The Object is not yet persistent and must be saved using thesaveUser(User)
method.NOTE: the implementation does not validate the uniqueness of the userId parameter at this time.
- Parameters:
userId
-- Returns:
- an non-persistent user object.
-
saveUser
IdentityOperationResult saveUser(User user)
Allows saving or updates aUser
object- Parameters:
user
- a User object.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
deleteUser
IdentityOperationResult deleteUser(java.lang.String userId)
Allows deleting a persistentUser
object.- Parameters:
UserId
- the id of the User object to delete.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
unlockUser
IdentityOperationResult unlockUser(java.lang.String userId)
Allows unlocking aUser
object.- Parameters:
userId
- the id of the User object to delete.- Returns:
- the operation result object.
- Throws:
AuthorizationException
- if the user is not CAMUNDA_ADMIN
-
createNewGroup
Group createNewGroup(java.lang.String groupId)
Returns a new (transient)
Group
object. The Object is not yet persistent and must be saved using thesaveGroup(Group)
method.NOTE: the implementation does not validate the uniqueness of the groupId parameter at this time.
- Parameters:
groupId
-- Returns:
- an non-persistent group object.
-
saveGroup
IdentityOperationResult saveGroup(Group group)
Allows saving aGroup
object which is not yet persistent.- Parameters:
group
- a group object.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
deleteGroup
IdentityOperationResult deleteGroup(java.lang.String groupId)
Allows deleting a persistentGroup
object.- Parameters:
groupId
- the id of the group object to delete.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
createNewTenant
Tenant createNewTenant(java.lang.String tenantId)
Returns a new (transient)
Tenant
object. The Object is not yet persistent and must be saved using thesaveTenant(Tenant)
method.NOTE: the implementation does not validate the uniqueness of the tenantId parameter at this time.
- Parameters:
tenantId
- the id of the new tenant- Returns:
- an non-persistent tenant object.
-
saveTenant
IdentityOperationResult saveTenant(Tenant tenant)
Allows saving aTenant
object which is not yet persistent.- Parameters:
tenant
- the tenant object to save.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
deleteTenant
IdentityOperationResult deleteTenant(java.lang.String tenantId)
Allows deleting a persistentTenant
object.- Parameters:
tenantId
- the id of the tenant object to delete.- Returns:
- the operation result object.
- Throws:
IdentityProviderException
- in case an internal error occurs
-
createMembership
IdentityOperationResult createMembership(java.lang.String userId, java.lang.String groupId)
Creates a membership relation between a user and a group. If the user is already part of that group, IdentityProviderException is thrown.- Parameters:
userId
- the id of the usergroupId
- id of the group- Returns:
- the operation result object.
- Throws:
IdentityProviderException
-
deleteMembership
IdentityOperationResult deleteMembership(java.lang.String userId, java.lang.String groupId)
Deletes a membership relation between a user and a group.- Parameters:
userId
- the id of the usergroupId
- id of the group- Returns:
- the operation result object.
- Throws:
IdentityProviderException
-
createTenantUserMembership
IdentityOperationResult createTenantUserMembership(java.lang.String tenantId, java.lang.String userId)
Creates a membership relation between a tenant and a user.- Parameters:
tenantId
- the id of the tenantuserId
- the id of the user- Returns:
- the operation result object.
-
createTenantGroupMembership
IdentityOperationResult createTenantGroupMembership(java.lang.String tenantId, java.lang.String groupId)
Creates a membership relation between a tenant and a group.- Parameters:
tenantId
- the id of the tenantgroupId
- the id of the group- Returns:
- the operation result object.
-
deleteTenantUserMembership
IdentityOperationResult deleteTenantUserMembership(java.lang.String tenantId, java.lang.String userId)
Deletes a membership relation between a tenant and a user.- Parameters:
tenantId
- the id of the tenantuserId
- the id of the user- Returns:
- the operation result object
-
deleteTenantGroupMembership
IdentityOperationResult deleteTenantGroupMembership(java.lang.String tenantId, java.lang.String groupId)
Deletes a membership relation between a tenant and a group.- Parameters:
tenantId
- the id of the tenantgroupId
- the id of the group- Returns:
- the operation result object.
-
-