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
-
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(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 List<User> findUserByQueryCriteria(DbUserQueryImpl query)
-
findUserByNativeQuery
public List<User> findUserByNativeQuery(Map<String,Object> parameterMap, int firstResult, int maxResults)
-
findUserCountByNativeQuery
public long findUserCountByNativeQuery(Map<String,Object> parameterMap)
-
checkPassword
public boolean checkPassword(String userId, String password)
- Specified by:
checkPassword
in interfaceReadOnlyIdentityProvider
- Returns:
- 'true' if the password matches the
-
matchPassword
protected boolean matchPassword(String password, UserEntity user)
-
findGroupById
public GroupEntity findGroupById(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 List<Group> findGroupByQueryCriteria(DbGroupQueryImpl query)
-
findTenantById
public TenantEntity findTenantById(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 List<Tenant> findTenantByQueryCriteria(DbTenantQueryImpl query)
-
existsTenantMembership
protected boolean existsTenantMembership(String tenantId, String userId, String groupId)
-
configureQuery
protected void configureQuery(AbstractQuery query, Resource resource)
- Overrides:
configureQuery
in classAbstractManager
-
checkAuthorization
protected void checkAuthorization(Permission permission, Resource resource, String resourceId)
- Overrides:
checkAuthorization
in classAbstractManager
-
-