Package com.flowable.idm.engine.ldap
Class LdapUserQuery
java.lang.Object
org.flowable.common.engine.impl.db.ListQueryParameterObject
org.flowable.common.engine.impl.query.AbstractQuery<PlatformUserQuery,PlatformUser>
com.flowable.idm.engine.ldap.LdapUserQuery
- All Implemented Interfaces:
PlatformUserQuery
,java.io.Serializable
,org.flowable.common.engine.api.query.Query<PlatformUserQuery,PlatformUser>
,org.flowable.common.engine.impl.interceptor.Command<java.lang.Object>
,org.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
public class LdapUserQuery extends org.flowable.common.engine.impl.query.AbstractQuery<PlatformUserQuery,PlatformUser> implements PlatformUserQuery
- See Also:
- Serialized Form
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description protected static org.springframework.ldap.core.AttributesMapper<PlatformUser>
COUNTING_ATTRIBUTES_MAPPER
An AttributesMapper that would be used only for the count query.protected static org.flowable.common.engine.api.query.QueryProperty
EMAIL
protected java.util.Map<java.lang.String,org.springframework.ldap.filter.Filter>
filtersMap
protected static org.flowable.common.engine.api.query.QueryProperty
FIRST_NAME
protected PlatformIdentityService
identityService
protected boolean
includeIdentityInfo
protected static org.flowable.common.engine.api.query.QueryProperty
LAST_NAME
protected LdapConfigurationApi
ldapConfiguration
protected org.slf4j.Logger
logger
protected java.lang.String
memberOfGroup
protected java.lang.String
memberOfGroupKey
protected java.util.Collection<java.lang.String>
memberOfGroupKeys
protected java.util.Collection<java.lang.String>
memberOfGroups
protected java.lang.String
tenantId
protected static org.flowable.common.engine.api.query.QueryProperty
USER_ID
protected java.lang.String
userDefinitionKey
-
Constructor Summary
Constructors Constructor Description LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService)
-
Method Summary
Modifier and Type Method Description PlatformUserQuery
accessibleByUser(java.lang.String userId)
Query all users that are accessible by the user with the provideduserId
.PlatformUserQuery
accessibleByUserWithUserDefinitionKey(java.lang.String userId, java.lang.String userDefinitionKey)
Query all users that are accessible by the user with the provideduserId
anduserDefinitionKey
.PlatformUserQuery
active()
PlatformUserQuery
createAfter(java.util.Date createdAfter)
PlatformUserQuery
createdBefore(java.util.Date createdBefore)
protected org.springframework.ldap.filter.OrFilter
createFilter(java.util.Collection<java.lang.String> attributeNames, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator)
long
executeCount(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
java.util.List<PlatformUser>
executeList(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected DistinguishedNameProvider
getDistinguishedNameProvider()
protected org.springframework.ldap.core.LdapOperations
getLdapOperations()
protected org.springframework.ldap.core.AttributesMapper<PlatformUser>
getUserAttributesMapper()
protected LdapUserProperties.Mappings
getUserMappings()
protected LdapUserProperties
getUserProperties()
PlatformUserQuery
includeIdentityInfo()
Query the user including the extra identity info.PlatformUserQuery
infoEquals(java.lang.String name, java.lang.Object value)
Checks for a user with the given info name and value.PlatformUserQuery
infoEqualsIgnoreCase(java.lang.String name, java.lang.String value)
Checks for a user with the given info name and value ignoring the case of the value.PlatformUserQuery
infoValueLike(java.lang.String name, java.lang.String valueLike)
Checks for a user with the given info name and value like.PlatformUserQuery
infoValueLikeIgnoreCase(java.lang.String name, java.lang.String valueLike)
Checks for a user with the given info name and value like ignoring the case of the value.protected PlatformUser
mapWithDbInfos(javax.naming.directory.Attributes attributes)
protected org.springframework.ldap.filter.Filter
memberOfFilter(java.util.Collection<java.lang.String> groupDns)
PlatformUserQuery
memberOfGroup(java.lang.String groupId)
PlatformUserQuery
memberOfGroupKey(java.lang.String groupKey)
Only selectPlatformUser
s that belong to the group with the given key.PlatformUserQuery
memberOfGroupKeys(java.util.Collection<java.lang.String> groupKeys)
Only selectPlatformUser
s that belong to the groups with the given keys.PlatformUserQuery
memberOfGroups(java.util.List<java.lang.String> groupIds)
PlatformUserQuery
orderByUserEmail()
PlatformUserQuery
orderByUserFirstName()
PlatformUserQuery
orderByUserId()
PlatformUserQuery
orderByUserLastName()
protected org.springframework.ldap.filter.Filter
prepareQueryFilter()
PlatformUserQuery
presence(java.lang.String presence)
Query for users with the given presence status.PlatformUserQuery
state(java.lang.String state)
PlatformUserQuery
subState(java.lang.String subState)
PlatformUserQuery
subType(java.lang.String subType)
PlatformUserQuery
tenantId(java.lang.String tenantId)
PlatformUserQuery
type(java.lang.String type)
Query for users of the given typePlatformUserQuery
userDefinitionKey(java.lang.String userDefinitionKey)
PlatformUserQuery
userDisplayName(java.lang.String displayName)
PlatformUserQuery
userDisplayNameLike(java.lang.String displayNameLike)
PlatformUserQuery
userDisplayNameLikeIgnoreCase(java.lang.String displayNameLikeIgnoreCase)
PlatformUserQuery
userEmail(java.lang.String email)
PlatformUserQuery
userEmailLike(java.lang.String emailLike)
PlatformUserQuery
userFirstName(java.lang.String firstName)
PlatformUserQuery
userFirstNameLike(java.lang.String firstNameLike)
PlatformUserQuery
userFirstNameLikeIgnoreCase(java.lang.String firstNameLikeIgnoreCase)
PlatformUserQuery
userFullNameLike(java.lang.String fullNameLike)
protected PlatformUserQuery
userFullNameLike(java.lang.String filterKey, java.lang.String fullNameLike)
PlatformUserQuery
userFullNameLikeIgnoreCase(java.lang.String fullNameLikeIgnoreCase)
PlatformUserQuery
userId(java.lang.String id)
PlatformUserQuery
userIdIgnoreCase(java.lang.String id)
PlatformUserQuery
userIds(java.util.List<java.lang.String> ids)
PlatformUserQuery
userIdsNotIn(java.util.List<java.lang.String> ids)
PlatformUserQuery
userLastName(java.lang.String lastName)
PlatformUserQuery
userLastNameLike(java.lang.String lastNameLike)
PlatformUserQuery
userLastNameLikeIgnoreCase(java.lang.String lastNameLikeIgnoreCase)
protected PlatformUserQuery
with(java.lang.String filterKey, java.util.Collection<java.lang.String> attributeNames, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator)
protected PlatformUserQuery
withFilter(java.lang.String filterKey, org.springframework.ldap.filter.Filter query)
protected PlatformUserQuery
withInfo(java.lang.String filterKey, java.lang.String infoName, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator)
PlatformUserQuery
withoutTenantId()
Query only users belonging to no tenant.Methods inherited from class org.flowable.common.engine.impl.query.AbstractQuery
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, list, listPage, orderBy, orderBy, setCommandExecutor, singleResult
Methods inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
addOrder, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByColumnMap, getOrderByColumns, getParameter, setDatabaseType, setFirstResult, setMaxResults, setNullHandlingColumn, setOrderByColumns, setParameter
-
Field Details
-
USER_ID
protected static final org.flowable.common.engine.api.query.QueryProperty USER_ID -
FIRST_NAME
protected static final org.flowable.common.engine.api.query.QueryProperty FIRST_NAME -
LAST_NAME
protected static final org.flowable.common.engine.api.query.QueryProperty LAST_NAME -
EMAIL
protected static final org.flowable.common.engine.api.query.QueryProperty EMAIL -
COUNTING_ATTRIBUTES_MAPPER
protected static final org.springframework.ldap.core.AttributesMapper<PlatformUser> COUNTING_ATTRIBUTES_MAPPERAn AttributesMapper that would be used only for the count query. Since for this query only the number of results is needed. -
logger
protected final org.slf4j.Logger logger -
ldapConfiguration
-
identityService
-
filtersMap
protected java.util.Map<java.lang.String,org.springframework.ldap.filter.Filter> filtersMap -
includeIdentityInfo
protected boolean includeIdentityInfo -
memberOfGroup
protected java.lang.String memberOfGroup -
memberOfGroups
protected java.util.Collection<java.lang.String> memberOfGroups -
memberOfGroupKey
protected java.lang.String memberOfGroupKey -
memberOfGroupKeys
protected java.util.Collection<java.lang.String> memberOfGroupKeys -
userDefinitionKey
protected java.lang.String userDefinitionKey -
tenantId
protected java.lang.String tenantId
-
-
Constructor Details
-
LdapUserQuery
public LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService)
-
-
Method Details
-
executeList
public java.util.List<PlatformUser> executeList(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)- Specified by:
executeList
in classorg.flowable.common.engine.impl.query.AbstractQuery<PlatformUserQuery,PlatformUser>
-
mapWithDbInfos
protected PlatformUser mapWithDbInfos(javax.naming.directory.Attributes attributes) throws javax.naming.NamingException- Throws:
javax.naming.NamingException
-
executeCount
public long executeCount(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)- Specified by:
executeCount
in classorg.flowable.common.engine.impl.query.AbstractQuery<PlatformUserQuery,PlatformUser>
-
prepareQueryFilter
protected org.springframework.ldap.filter.Filter prepareQueryFilter() -
memberOfFilter
protected org.springframework.ldap.filter.Filter memberOfFilter(java.util.Collection<java.lang.String> groupDns) -
includeIdentityInfo
Description copied from interface:PlatformUserQuery
Query the user including the extra identity info. Implementations are allowed to include the identity info even without explicitly invoking this.- Specified by:
includeIdentityInfo
in interfacePlatformUserQuery
-
userDisplayName
- Specified by:
userDisplayName
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLike
- Specified by:
userDisplayNameLike
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLikeIgnoreCase
- Specified by:
userDisplayNameLikeIgnoreCase
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
accessibleByUser
Description copied from interface:PlatformUserQuery
Query all users that are accessible by the user with the provideduserId
.- Specified by:
accessibleByUser
in interfacePlatformUserQuery
- Parameters:
userId
- the if of the user for which users should be queried
-
accessibleByUserWithUserDefinitionKey
public PlatformUserQuery accessibleByUserWithUserDefinitionKey(java.lang.String userId, java.lang.String userDefinitionKey)Description copied from interface:PlatformUserQuery
Query all users that are accessible by the user with the provideduserId
anduserDefinitionKey
.- Specified by:
accessibleByUserWithUserDefinitionKey
in interfacePlatformUserQuery
- Parameters:
userId
- the id of the user for which users should be querieduserDefinitionKey
- the user definition key for the user for which users should be queried
-
active
- Specified by:
active
in interfacePlatformUserQuery
-
state
- Specified by:
state
in interfacePlatformUserQuery
-
subState
- Specified by:
subState
in interfacePlatformUserQuery
-
userIdsNotIn
- Specified by:
userIdsNotIn
in interfacePlatformUserQuery
-
userDefinitionKey
- Specified by:
userDefinitionKey
in interfacePlatformUserQuery
-
type
Description copied from interface:PlatformUserQuery
Query for users of the given type- Specified by:
type
in interfacePlatformUserQuery
- See Also:
for known user types
-
subType
- Specified by:
subType
in interfacePlatformUserQuery
-
presence
Description copied from interface:PlatformUserQuery
Query for users with the given presence status.- Specified by:
presence
in interfacePlatformUserQuery
- See Also:
for known presence states
-
infoEquals
Description copied from interface:PlatformUserQuery
Checks for a user with the given info name and value.- Specified by:
infoEquals
in interfacePlatformUserQuery
- Parameters:
name
- the name of the infovalue
- the value that the info should have
-
infoEqualsIgnoreCase
Description copied from interface:PlatformUserQuery
Checks for a user with the given info name and value ignoring the case of the value.- Specified by:
infoEqualsIgnoreCase
in interfacePlatformUserQuery
- Parameters:
name
- the name of the infovalue
- the value that the info should have
-
infoValueLike
Description copied from interface:PlatformUserQuery
Checks for a user with the given info name and value like.- Specified by:
infoValueLike
in interfacePlatformUserQuery
- Parameters:
name
- the name of the infovalueLike
- the value like the info should have ('%' has to be added by the caller itself)
-
infoValueLikeIgnoreCase
public PlatformUserQuery infoValueLikeIgnoreCase(java.lang.String name, java.lang.String valueLike)Description copied from interface:PlatformUserQuery
Checks for a user with the given info name and value like ignoring the case of the value.- Specified by:
infoValueLikeIgnoreCase
in interfacePlatformUserQuery
- Parameters:
name
- the name of the infovalueLike
- the value like the info should have ('%' has to be added by the caller itself)
-
createdBefore
- Specified by:
createdBefore
in interfacePlatformUserQuery
-
createAfter
- Specified by:
createAfter
in interfacePlatformUserQuery
-
tenantId
- Specified by:
tenantId
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
withoutTenantId
Description copied from interface:PlatformUserQuery
Query only users belonging to no tenant.- Specified by:
withoutTenantId
in interfacePlatformUserQuery
-
memberOfGroupKey
Description copied from interface:PlatformUserQuery
Only selectPlatformUser
s that belong to the group with the given key.- Specified by:
memberOfGroupKey
in interfacePlatformUserQuery
-
memberOfGroupKeys
Description copied from interface:PlatformUserQuery
Only selectPlatformUser
s that belong to the groups with the given keys.- Specified by:
memberOfGroupKeys
in interfacePlatformUserQuery
-
userId
- Specified by:
userId
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIds
- Specified by:
userIds
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdIgnoreCase
- Specified by:
userIdIgnoreCase
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstName
- Specified by:
userFirstName
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLike
- Specified by:
userFirstNameLike
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLikeIgnoreCase
- Specified by:
userFirstNameLikeIgnoreCase
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastName
- Specified by:
userLastName
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLike
- Specified by:
userLastNameLike
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLikeIgnoreCase
- Specified by:
userLastNameLikeIgnoreCase
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
- Specified by:
userFullNameLike
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLikeIgnoreCase
- Specified by:
userFullNameLikeIgnoreCase
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
protected PlatformUserQuery userFullNameLike(java.lang.String filterKey, java.lang.String fullNameLike) -
userEmail
- Specified by:
userEmail
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userEmailLike
- Specified by:
userEmailLike
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroup
- Specified by:
memberOfGroup
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroups
- Specified by:
memberOfGroups
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserId
- Specified by:
orderByUserId
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserFirstName
- Specified by:
orderByUserFirstName
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserLastName
- Specified by:
orderByUserLastName
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserEmail
- Specified by:
orderByUserEmail
in interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
withInfo
protected PlatformUserQuery withInfo(java.lang.String filterKey, java.lang.String infoName, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator) -
with
protected PlatformUserQuery with(java.lang.String filterKey, java.util.Collection<java.lang.String> attributeNames, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator) -
createFilter
protected org.springframework.ldap.filter.OrFilter createFilter(java.util.Collection<java.lang.String> attributeNames, java.lang.String value, java.util.function.BiFunction<java.lang.String,java.lang.String,org.springframework.ldap.filter.Filter> filterCreator) -
withFilter
protected PlatformUserQuery withFilter(java.lang.String filterKey, org.springframework.ldap.filter.Filter query) -
getLdapOperations
protected org.springframework.ldap.core.LdapOperations getLdapOperations() -
getUserMappings
-
getUserProperties
-
getDistinguishedNameProvider
-
getUserAttributesMapper
-