org.camunda.bpm.engine.impl.identity
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
 void createMembership(String userId, String groupId)
          Creates a membership relation between a user and a group.
 Group createNewGroup(String groupId)
          Returns a new (transient) Group object.
 Tenant createNewTenant(String tenantId)
           Returns a new (transient) Tenant object.
 User createNewUser(String userId)
          Returns a new (transient) User object.
 void createTenantGroupMembership(String tenantId, String groupId)
          Creates a membership relation between a tenant and a group.
 void createTenantUserMembership(String tenantId, String userId)
          Creates a membership relation between a tenant and a user.
 void deleteGroup(String groupId)
          Allows deleting a persistent Group object.
 void deleteMembership(String userId, String groupId)
          Deletes a membership relation between a user and a group.
 void deleteTenant(String tenantId)
          Allows deleting a persistent Tenant object.
 void deleteTenantGroupMembership(String tenantId, String groupId)
          Deletes a membership relation between a tenant and a group.
 void deleteTenantUserMembership(String tenantId, String userId)
          Deletes a membership relation between a tenant and a user.
 void deleteUser(String userId)
          Allows deleting a persistent User object.
 Group saveGroup(Group group)
          Allows saving a Group object which is not yet persistent.
 Tenant saveTenant(Tenant tenant)
          Allows saving a Tenant object which is not yet persistent.
 User saveUser(User user)
          Allows saving or updates a User object
 
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.Session
close, flush
 

Method Detail

createNewUser

User createNewUser(String userId)

Returns a new (transient) User object. The Object is not yet persistent and must be saved using the saveUser(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

User saveUser(User user)
Allows saving or updates a User object

Parameters:
user - a User object.
Returns:
the User object.
Throws:
IdentityProviderException - in case an internal error occurs

deleteUser

void deleteUser(String userId)
Allows deleting a persistent User object.

Parameters:
UserId - the id of the User object to delete.
Throws:
IdentityProviderException - in case an internal error occurs

createNewGroup

Group createNewGroup(String groupId)

Returns a new (transient) Group object. The Object is not yet persistent and must be saved using the saveGroup(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

Group saveGroup(Group group)
Allows saving a Group object which is not yet persistent.

Parameters:
group - a group object.
Returns:
the persistent group object.
Throws:
IdentityProviderException - in case an internal error occurs

deleteGroup

void deleteGroup(String groupId)
Allows deleting a persistent Group object.

Parameters:
groupId - the id of the group object to delete. *
Throws:
IdentityProviderException - in case an internal error occurs

createNewTenant

Tenant createNewTenant(String tenantId)

Returns a new (transient) Tenant object. The Object is not yet persistent and must be saved using the saveTenant(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

Tenant saveTenant(Tenant tenant)
Allows saving a Tenant object which is not yet persistent.

Parameters:
tenant - the tenant object to save.
Returns:
the persistent tenant object.
Throws:
IdentityProviderException - in case an internal error occurs

deleteTenant

void deleteTenant(String tenantId)
Allows deleting a persistent Tenant object.

Parameters:
tenantId - the id of the tenant object to delete. *
Throws:
IdentityProviderException - in case an internal error occurs

createMembership

void createMembership(String userId,
                      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 user
groupId - id of the group
Throws:
IdentityProviderException

deleteMembership

void deleteMembership(String userId,
                      String groupId)
Deletes a membership relation between a user and a group.

Parameters:
userId - the id of the user
groupId - id of the group
Throws:
IdentityProviderException

createTenantUserMembership

void createTenantUserMembership(String tenantId,
                                String userId)
Creates a membership relation between a tenant and a user.

Parameters:
tenantId - the id of the tenant
userId - the id of the user

createTenantGroupMembership

void createTenantGroupMembership(String tenantId,
                                 String groupId)
Creates a membership relation between a tenant and a group.

Parameters:
tenantId - the id of the tenant
groupId - the id of the group

deleteTenantUserMembership

void deleteTenantUserMembership(String tenantId,
                                String userId)
Deletes a membership relation between a tenant and a user.

Parameters:
tenantId - the id of the tenant
userId - the id of the user

deleteTenantGroupMembership

void deleteTenantGroupMembership(String tenantId,
                                 String groupId)
Deletes a membership relation between a tenant and a group.

Parameters:
tenantId - the id of the tenant
groupId - the id of the group


Copyright © 2017 camunda services GmbH. All rights reserved.