org.camunda.bpm.engine.impl.identity.db
Class DbIdentityServiceProvider

java.lang.Object
  extended by org.camunda.bpm.engine.impl.persistence.AbstractManager
      extended by org.camunda.bpm.engine.impl.identity.db.DbReadOnlyIdentityServiceProvider
          extended by org.camunda.bpm.engine.impl.identity.db.DbIdentityServiceProvider
All Implemented Interfaces:
ReadOnlyIdentityProvider, WritableIdentityProvider, Session

public class DbIdentityServiceProvider
extends DbReadOnlyIdentityServiceProvider
implements WritableIdentityProvider

WritableIdentityProvider implementation backed by a database. This implementation is used for the built-in user management.

Author:
Daniel Meyer

Constructor Summary
DbIdentityServiceProvider()
           
 
Method Summary
protected  void createDefaultAuthorizations(Group group)
           
protected  void createDefaultAuthorizations(UserEntity userEntity)
           
protected  void createDefaultMembershipAuthorizations(String userId, String groupId)
           
 void createMembership(String userId, String groupId)
          Creates a membership relation between a user and a group.
 GroupEntity createNewGroup(String groupId)
          Returns a new (transient) Group object.
 UserEntity createNewUser(String userId)
          Returns a new (transient) User object.
protected  void deleteAuthorizations(Resource resource, String resourceId)
           
 void deleteGroup(String groupId)
          Allows deleting a persistent Group object.
 void deleteMembership(String userId, String groupId)
          Creates a membership relation between a user and a group.
protected  void deleteMembershipsByGroupId(String groupId)
           
protected  void deleteMembershipsByUserId(String userId)
           
 void deleteUser(String userId)
          Allows deleting a persistent User object.
protected  ResourceAuthorizationProvider getResourceAuthorizationProvider()
           
protected  void saveDefaultAuthorizations(AuthorizationEntity[] authorizations)
           
 GroupEntity saveGroup(Group group)
          Allows saving a Group object which is not yet persistent.
 User saveUser(User user)
          Allows saving or updates a User object
 
Methods inherited from class org.camunda.bpm.engine.impl.identity.db.DbReadOnlyIdentityServiceProvider
checkAuthorization, checkPassword, configureQuery, createGroupQuery, createGroupQuery, createUserQuery, createUserQuery, findGroupById, findGroupByQueryCriteria, findGroupCountByQueryCriteria, findUserById, findUserByQueryCriteria, findUserCountByQueryCriteria, matchPassword
 
Methods inherited from class org.camunda.bpm.engine.impl.persistence.AbstractManager
close, delete, flush, getAttachmentManager, getByteArrayManager, getCaseDefinitionManager, getCaseExecutionManager, getCaseInstanceManager, getDbSqlSession, getDeploymentManager, getHistoricActivityInstanceManager, getHistoricDetailManager, getHistoricProcessInstanceManager, getHistoricTaskInstanceManager, getIdentityInfoManager, getIdentityLinkManager, getProcessDefinitionManager, getProcessInstanceManager, getResourceManager, getSession, getTaskManager, getVariableInstanceManager, insert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.Session
close, flush
 

Constructor Detail

DbIdentityServiceProvider

public DbIdentityServiceProvider()
Method Detail

createNewUser

public UserEntity createNewUser(String userId)
Description copied from interface: WritableIdentityProvider

Returns a new (transient) User object. The Object is not yet persistent and must be saved using the WritableIdentityProvider.saveUser(User) method.

NOTE: the implementation does not validate the uniqueness of the userId parameter at this time.

Specified by:
createNewUser in interface WritableIdentityProvider
Returns:
an non-persistent user object.

saveUser

public User saveUser(User user)
Description copied from interface: WritableIdentityProvider
Allows saving or updates a User object

Specified by:
saveUser in interface WritableIdentityProvider
Parameters:
user - a User object.
Returns:
the User object.

deleteUser

public void deleteUser(String userId)
Description copied from interface: WritableIdentityProvider
Allows deleting a persistent User object.

Specified by:
deleteUser in interface WritableIdentityProvider

createNewGroup

public GroupEntity createNewGroup(String groupId)
Description copied from interface: WritableIdentityProvider

Returns a new (transient) Group object. The Object is not yet persistent and must be saved using the WritableIdentityProvider.saveGroup(Group) method.

NOTE: the implementation does not validate the uniqueness of the groupId parameter at this time.

Specified by:
createNewGroup in interface WritableIdentityProvider
Returns:
an non-persistent group object.

saveGroup

public GroupEntity saveGroup(Group group)
Description copied from interface: WritableIdentityProvider
Allows saving a Group object which is not yet persistent.

Specified by:
saveGroup in interface WritableIdentityProvider
Parameters:
group - a group object.
Returns:
the persistent group object.

deleteGroup

public void deleteGroup(String groupId)
Description copied from interface: WritableIdentityProvider
Allows deleting a persistent Group object.

Specified by:
deleteGroup in interface WritableIdentityProvider
Parameters:
groupId - the id of the group object to delete. *

createMembership

public void createMembership(String userId,
                             String groupId)
Description copied from interface: WritableIdentityProvider
Creates a membership relation between a user and a group. If the user is already part of that group, IdentityProviderException is thrown.

Specified by:
createMembership in interface WritableIdentityProvider
Parameters:
userId - the id of the user
groupId - id of the group

deleteMembership

public void deleteMembership(String userId,
                             String groupId)
Description copied from interface: WritableIdentityProvider
Creates a membership relation between a user and a group. If the user is not part of that group, IdentityProviderException is thrown.

Specified by:
deleteMembership in interface WritableIdentityProvider
Parameters:
userId - the id of the user
groupId - id of the group

deleteMembershipsByUserId

protected void deleteMembershipsByUserId(String userId)

deleteMembershipsByGroupId

protected void deleteMembershipsByGroupId(String groupId)

createDefaultAuthorizations

protected void createDefaultAuthorizations(UserEntity userEntity)

createDefaultAuthorizations

protected void createDefaultAuthorizations(Group group)

createDefaultMembershipAuthorizations

protected void createDefaultMembershipAuthorizations(String userId,
                                                     String groupId)

getResourceAuthorizationProvider

protected ResourceAuthorizationProvider getResourceAuthorizationProvider()

deleteAuthorizations

protected void deleteAuthorizations(Resource resource,
                                    String resourceId)

saveDefaultAuthorizations

protected void saveDefaultAuthorizations(AuthorizationEntity[] authorizations)


Copyright © 2014 camunda services GmbH. All Rights Reserved.