Class DbReadOnlyIdentityServiceProvider
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.AbstractManager
-
- org.camunda.bpm.engine.impl.identity.db.DbReadOnlyIdentityServiceProvider
-
- All Implemented Interfaces:
ReadOnlyIdentityProvider
,Session
- Direct Known Subclasses:
DbIdentityServiceProvider
public class DbReadOnlyIdentityServiceProvider extends AbstractManager implements ReadOnlyIdentityProvider
Read only implementation of DB-backed identity service
- Author:
- Daniel Meyer, nico.rehwaldt
-
-
Constructor Summary
Constructors Constructor Description DbReadOnlyIdentityServiceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAuthorization(Permission permission, Resource resource, java.lang.String resourceId)
boolean
checkPassword(java.lang.String userId, java.lang.String password)
protected void
configureQuery(AbstractQuery query, Resource resource)
GroupQuery
createGroupQuery()
GroupQuery
createGroupQuery(CommandContext commandContext)
NativeUserQuery
createNativeUserQuery()
Creates aNativeUserQuery
that allows to select users with native queries.TenantQuery
createTenantQuery()
TenantQuery
createTenantQuery(CommandContext commandContext)
UserQuery
createUserQuery()
UserQueryImpl
createUserQuery(CommandContext commandContext)
protected boolean
existsMembership(java.lang.String userId, java.lang.String groupId)
protected boolean
existsTenantMembership(java.lang.String tenantId, java.lang.String userId, java.lang.String groupId)
GroupEntity
findGroupById(java.lang.String groupId)
java.util.List<Group>
findGroupByQueryCriteria(DbGroupQueryImpl query)
long
findGroupCountByQueryCriteria(DbGroupQueryImpl query)
TenantEntity
findTenantById(java.lang.String tenantId)
java.util.List<Tenant>
findTenantByQueryCriteria(DbTenantQueryImpl query)
long
findTenantCountByQueryCriteria(DbTenantQueryImpl query)
UserEntity
findUserById(java.lang.String userId)
java.util.List<User>
findUserByNativeQuery(java.util.Map<java.lang.String,java.lang.Object> parameterMap, int firstResult, int maxResults)
java.util.List<User>
findUserByQueryCriteria(DbUserQueryImpl query)
long
findUserCountByNativeQuery(java.util.Map<java.lang.String,java.lang.Object> parameterMap)
long
findUserCountByQueryCriteria(DbUserQueryImpl query)
protected boolean
matchPassword(java.lang.String password, UserEntity user)
-
Methods inherited from class org.camunda.bpm.engine.impl.persistence.AbstractManager
close, delete, deleteAuthorizations, deleteAuthorizationsForGroup, deleteAuthorizationsForUser, deleteDefaultAuthorizations, flush, getAttachmentManager, getAuthorizationManager, getBatchManager, getByteArrayManager, getCamundaFormDefinitionManager, getCaseDefinitionManager, getCaseExecutionManager, getCaseInstanceManager, getCommandContext, getCurrentAuthentication, getDbEntityManager, getDbSqlSession, getDecisionDefinitionManager, getDecisionRequirementsDefinitionManager, getDeploymentManager, getEventSubscriptionManager, getHistoricActivityInstanceManager, getHistoricBatchManager, getHistoricCaseActivityInstanceManager, getHistoricCaseInstanceManager, getHistoricDecisionInstanceManager, getHistoricDetailManager, getHistoricExternalTaskLogManager, getHistoricIdentityLinkManager, getHistoricIncidentManager, getHistoricJobLogManager, getHistoricProcessInstanceManager, getHistoricReportManager, getHistoricTaskInstanceManager, getHistoricVariableInstanceManager, getIdentityInfoManager, getIdentityLinkManager, getJobDefinitionManager, getJobManager, getProcessDefinitionManager, getProcessInstanceManager, getResourceAuthorizationProvider, getResourceManager, getSession, getTaskManager, getTaskReportManager, getTenantManager, getUserOperationLogManager, getVariableInstanceManager, insert, isAuthorizationEnabled, saveDefaultAuthorizations
-
-
-
-
Method Detail
-
findUserById
public UserEntity findUserById(java.lang.String userId)
- Specified by:
findUserById
in interfaceReadOnlyIdentityProvider
- Returns:
- a
User
object for the given user id or null if no such user exists.
-
createUserQuery
public UserQuery createUserQuery()
- Specified by:
createUserQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
UserQuery
object which can be used for querying for users.
-
createUserQuery
public UserQueryImpl createUserQuery(CommandContext commandContext)
- Specified by:
createUserQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
UserQuery
object which can be used in the current command context
-
createNativeUserQuery
public NativeUserQuery createNativeUserQuery()
Description copied from interface:ReadOnlyIdentityProvider
Creates aNativeUserQuery
that allows to select users with native queries.- Specified by:
createNativeUserQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- NativeUserQuery
-
findUserCountByQueryCriteria
public long findUserCountByQueryCriteria(DbUserQueryImpl query)
-
findUserByQueryCriteria
public java.util.List<User> findUserByQueryCriteria(DbUserQueryImpl query)
-
findUserByNativeQuery
public java.util.List<User> findUserByNativeQuery(java.util.Map<java.lang.String,java.lang.Object> parameterMap, int firstResult, int maxResults)
-
findUserCountByNativeQuery
public long findUserCountByNativeQuery(java.util.Map<java.lang.String,java.lang.Object> parameterMap)
-
checkPassword
public boolean checkPassword(java.lang.String userId, java.lang.String password)
- Specified by:
checkPassword
in interfaceReadOnlyIdentityProvider
- Returns:
- 'true' if the password matches the
-
matchPassword
protected boolean matchPassword(java.lang.String password, UserEntity user)
-
findGroupById
public GroupEntity findGroupById(java.lang.String groupId)
- Specified by:
findGroupById
in interfaceReadOnlyIdentityProvider
- Returns:
- a
Group
object for the given group id or null if no such group exists.
-
createGroupQuery
public GroupQuery createGroupQuery()
- Specified by:
createGroupQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
GroupQuery
object which can be used for querying for groups.
-
createGroupQuery
public GroupQuery createGroupQuery(CommandContext commandContext)
- Specified by:
createGroupQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
GroupQuery
object which can be used for querying for groups and can be reused in the current command context.
-
findGroupCountByQueryCriteria
public long findGroupCountByQueryCriteria(DbGroupQueryImpl query)
-
findGroupByQueryCriteria
public java.util.List<Group> findGroupByQueryCriteria(DbGroupQueryImpl query)
-
findTenantById
public TenantEntity findTenantById(java.lang.String tenantId)
- Specified by:
findTenantById
in interfaceReadOnlyIdentityProvider
- Returns:
- a
Tenant
object for the given id or null if no such tenant exists.
-
createTenantQuery
public TenantQuery createTenantQuery()
- Specified by:
createTenantQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
TenantQuery
object which can be used for querying for tenants.
-
createTenantQuery
public TenantQuery createTenantQuery(CommandContext commandContext)
- Specified by:
createTenantQuery
in interfaceReadOnlyIdentityProvider
- Returns:
- a
TenantQuery
object which can be used for querying for tenants and can be reused in the current command context.
-
findTenantCountByQueryCriteria
public long findTenantCountByQueryCriteria(DbTenantQueryImpl query)
-
findTenantByQueryCriteria
public java.util.List<Tenant> findTenantByQueryCriteria(DbTenantQueryImpl query)
-
existsMembership
protected boolean existsMembership(java.lang.String userId, java.lang.String groupId)
-
existsTenantMembership
protected boolean existsTenantMembership(java.lang.String tenantId, java.lang.String userId, java.lang.String groupId)
-
configureQuery
protected void configureQuery(AbstractQuery query, Resource resource)
- Overrides:
configureQuery
in classAbstractManager
-
checkAuthorization
protected void checkAuthorization(Permission permission, Resource resource, java.lang.String resourceId)
- Overrides:
checkAuthorization
in classAbstractManager
-
-