public class DbIdentityServiceProvider extends DbReadOnlyIdentityServiceProvider implements WritableIdentityProvider
WritableIdentityProvider
implementation backed by a
database. This implementation is used for the built-in user management.
Constructor and Description |
---|
DbIdentityServiceProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
createDefaultAuthorizations(Group group) |
protected void |
createDefaultAuthorizations(Tenant tenant) |
protected void |
createDefaultAuthorizations(UserEntity userEntity) |
protected void |
createDefaultMembershipAuthorizations(String userId,
String groupId) |
protected void |
createDefaultTenantMembershipAuthorizations(Tenant tenant,
Group group) |
protected void |
createDefaultTenantMembershipAuthorizations(Tenant tenant,
User user) |
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. |
Tenant |
createNewTenant(String tenantId)
Returns a new (transient)
Tenant object. |
UserEntity |
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.
|
protected void |
deleteMembershipsByGroupId(String groupId) |
protected void |
deleteMembershipsByUserId(String userId) |
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.
|
protected void |
deleteTenantMembershipsOfGroup(String groupId) |
protected void |
deleteTenantMembershipsOfTenant(String tenant) |
protected void |
deleteTenantMembershipsOfUser(String userId) |
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. |
GroupEntity |
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 |
checkAuthorization, checkPassword, configureQuery, createGroupQuery, createGroupQuery, createTenantQuery, createTenantQuery, createUserQuery, createUserQuery, findGroupById, findGroupByQueryCriteria, findGroupCountByQueryCriteria, findTenantById, findTenantByQueryCriteria, findTenantCountByQueryCriteria, findUserById, findUserByQueryCriteria, findUserCountByQueryCriteria, matchPassword
close, delete, deleteAuthorizations, deleteAuthorizationsForGroup, deleteAuthorizationsForUser, deleteDefaultAuthorizations, flush, getAttachmentManager, getAuthorizationManager, getBatchManager, getByteArrayManager, getCaseDefinitionManager, getCaseExecutionManager, getCaseInstanceManager, getCommandContext, getCurrentAuthentication, getDbEntityManager, getDbSqlSession, getDecisionDefinitionManager, getDeploymentManager, getEventSubscriptionManager, getHistoricActivityInstanceManager, getHistoricBatchManager, getHistoricCaseActivityInstanceManager, getHistoricCaseInstanceManager, getHistoricDecisionInstanceManager, getHistoricDetailManager, getHistoricIdentityLinkManager, getHistoricIncidentManager, getHistoricJobLogManager, getHistoricProcessInstanceManager, getHistoricReportManager, getHistoricTaskInstanceManager, getHistoricVariableInstanceManager, getIdentityInfoManager, getIdentityLinkManager, getJobDefinitionManager, getJobManager, getProcessDefinitionManager, getProcessInstanceManager, getResourceAuthorizationProvider, getResourceManager, getSession, getTaskManager, getTaskReportManager, getTenantManager, getUserOperationLogManager, getVariableInstanceManager, insert, isAuthorizationEnabled, saveDefaultAuthorizations
public UserEntity createNewUser(String userId)
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.
createNewUser
in interface WritableIdentityProvider
public User saveUser(User user)
WritableIdentityProvider
User
objectsaveUser
in interface WritableIdentityProvider
user
- a User object.public void deleteUser(String userId)
WritableIdentityProvider
User
object.deleteUser
in interface WritableIdentityProvider
public GroupEntity createNewGroup(String groupId)
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.
createNewGroup
in interface WritableIdentityProvider
public GroupEntity saveGroup(Group group)
WritableIdentityProvider
Group
object which is not yet persistent.saveGroup
in interface WritableIdentityProvider
group
- a group object.public void deleteGroup(String groupId)
WritableIdentityProvider
Group
object.deleteGroup
in interface WritableIdentityProvider
groupId
- the id of the group object to delete. *public Tenant createNewTenant(String tenantId)
WritableIdentityProvider
Returns a new (transient) Tenant
object. The Object is not yet
persistent and must be saved using the WritableIdentityProvider.saveTenant(Tenant)
method.
NOTE: the implementation does not validate the uniqueness of the tenantId parameter at this time.
createNewTenant
in interface WritableIdentityProvider
tenantId
- the id of the new tenantpublic Tenant saveTenant(Tenant tenant)
WritableIdentityProvider
Tenant
object which is not yet persistent.saveTenant
in interface WritableIdentityProvider
tenant
- the tenant object to save.public void deleteTenant(String tenantId)
WritableIdentityProvider
Tenant
object.deleteTenant
in interface WritableIdentityProvider
tenantId
- the id of the tenant object to delete. *public void createMembership(String userId, String groupId)
WritableIdentityProvider
createMembership
in interface WritableIdentityProvider
userId
- the id of the usergroupId
- id of the grouppublic void deleteMembership(String userId, String groupId)
WritableIdentityProvider
deleteMembership
in interface WritableIdentityProvider
userId
- the id of the usergroupId
- id of the groupprotected void deleteMembershipsByUserId(String userId)
protected void deleteMembershipsByGroupId(String groupId)
public void createTenantUserMembership(String tenantId, String userId)
WritableIdentityProvider
createTenantUserMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantuserId
- the id of the userpublic void createTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProvider
createTenantGroupMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantgroupId
- the id of the grouppublic void deleteTenantUserMembership(String tenantId, String userId)
WritableIdentityProvider
deleteTenantUserMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantuserId
- the id of the userpublic void deleteTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProvider
deleteTenantGroupMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantgroupId
- the id of the groupprotected void deleteTenantMembershipsOfUser(String userId)
protected void deleteTenantMembershipsOfGroup(String groupId)
protected void deleteTenantMembershipsOfTenant(String tenant)
protected void createDefaultAuthorizations(UserEntity userEntity)
protected void createDefaultAuthorizations(Group group)
protected void createDefaultAuthorizations(Tenant tenant)
protected void createDefaultMembershipAuthorizations(String userId, String groupId)
protected void createDefaultTenantMembershipAuthorizations(Tenant tenant, User user)
Copyright © 2018. All rights reserved.