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_MAPPERAn AttributesMapper that would be used only for the count query.protected static org.flowable.common.engine.api.query.QueryPropertyEMAILprotected java.util.Map<java.lang.String,org.springframework.ldap.filter.Filter>filtersMapprotected static org.flowable.common.engine.api.query.QueryPropertyFIRST_NAMEprotected PlatformIdentityServiceidentityServiceprotected booleanincludeIdentityInfoprotected static org.flowable.common.engine.api.query.QueryPropertyLAST_NAMEprotected LdapConfigurationApildapConfigurationprotected org.slf4j.Loggerloggerprotected java.lang.StringmemberOfGroupprotected java.lang.StringmemberOfGroupKeyprotected java.util.Collection<java.lang.String>memberOfGroupKeysprotected java.util.Collection<java.lang.String>memberOfGroupsprotected java.lang.StringtenantIdprotected static org.flowable.common.engine.api.query.QueryPropertyUSER_IDprotected java.lang.StringuserDefinitionKey -
Constructor Summary
Constructors Constructor Description LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService) -
Method Summary
Modifier and Type Method Description PlatformUserQueryaccessibleByUser(java.lang.String userId)Query all users that are accessible by the user with the provideduserId.PlatformUserQueryaccessibleByUserWithUserDefinitionKey(java.lang.String userId, java.lang.String userDefinitionKey)Query all users that are accessible by the user with the provideduserIdanduserDefinitionKey.PlatformUserQueryactive()PlatformUserQuerycreateAfter(java.util.Date createdAfter)PlatformUserQuerycreatedBefore(java.util.Date createdBefore)protected org.springframework.ldap.filter.OrFiltercreateFilter(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)longexecuteCount(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)java.util.List<PlatformUser>executeList(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected DistinguishedNameProvidergetDistinguishedNameProvider()protected org.springframework.ldap.core.LdapOperationsgetLdapOperations()protected org.springframework.ldap.core.AttributesMapper<PlatformUser>getUserAttributesMapper()protected LdapUserProperties.MappingsgetUserMappings()protected LdapUserPropertiesgetUserProperties()PlatformUserQueryincludeIdentityInfo()Query the user including the extra identity info.PlatformUserQueryinfoEquals(java.lang.String name, java.lang.Object value)Checks for a user with the given info name and value.PlatformUserQueryinfoEqualsIgnoreCase(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.PlatformUserQueryinfoValueLike(java.lang.String name, java.lang.String valueLike)Checks for a user with the given info name and value like.PlatformUserQueryinfoValueLikeIgnoreCase(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 PlatformUsermapWithDbInfos(javax.naming.directory.Attributes attributes)protected org.springframework.ldap.filter.FiltermemberOfFilter(java.util.Collection<java.lang.String> groupDns)PlatformUserQuerymemberOfGroup(java.lang.String groupId)PlatformUserQuerymemberOfGroupKey(java.lang.String groupKey)Only selectPlatformUsers that belong to the group with the given key.PlatformUserQuerymemberOfGroupKeys(java.util.Collection<java.lang.String> groupKeys)Only selectPlatformUsers that belong to the groups with the given keys.PlatformUserQuerymemberOfGroups(java.util.List<java.lang.String> groupIds)PlatformUserQueryorderByUserEmail()PlatformUserQueryorderByUserFirstName()PlatformUserQueryorderByUserId()PlatformUserQueryorderByUserLastName()protected org.springframework.ldap.filter.FilterprepareQueryFilter()PlatformUserQuerypresence(java.lang.String presence)Query for users with the given presence status.PlatformUserQuerystate(java.lang.String state)PlatformUserQuerysubState(java.lang.String subState)PlatformUserQuerysubType(java.lang.String subType)PlatformUserQuerytenantId(java.lang.String tenantId)PlatformUserQuerytype(java.lang.String type)Query for users of the given typePlatformUserQueryuserDefinitionKey(java.lang.String userDefinitionKey)PlatformUserQueryuserDisplayName(java.lang.String displayName)PlatformUserQueryuserDisplayNameLike(java.lang.String displayNameLike)PlatformUserQueryuserDisplayNameLikeIgnoreCase(java.lang.String displayNameLikeIgnoreCase)PlatformUserQueryuserEmail(java.lang.String email)PlatformUserQueryuserEmailLike(java.lang.String emailLike)PlatformUserQueryuserFirstName(java.lang.String firstName)PlatformUserQueryuserFirstNameLike(java.lang.String firstNameLike)PlatformUserQueryuserFirstNameLikeIgnoreCase(java.lang.String firstNameLikeIgnoreCase)PlatformUserQueryuserFullNameLike(java.lang.String fullNameLike)protected PlatformUserQueryuserFullNameLike(java.lang.String filterKey, java.lang.String fullNameLike)PlatformUserQueryuserFullNameLikeIgnoreCase(java.lang.String fullNameLikeIgnoreCase)PlatformUserQueryuserId(java.lang.String id)PlatformUserQueryuserIdIgnoreCase(java.lang.String id)PlatformUserQueryuserIds(java.util.List<java.lang.String> ids)PlatformUserQueryuserIdsNotIn(java.util.List<java.lang.String> ids)PlatformUserQueryuserLastName(java.lang.String lastName)PlatformUserQueryuserLastNameLike(java.lang.String lastNameLike)PlatformUserQueryuserLastNameLikeIgnoreCase(java.lang.String lastNameLikeIgnoreCase)protected PlatformUserQuerywith(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 PlatformUserQuerywithFilter(java.lang.String filterKey, org.springframework.ldap.filter.Filter query)protected PlatformUserQuerywithInfo(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)PlatformUserQuerywithoutTenantId()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, singleResultMethods 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:
executeListin 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:
executeCountin 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:PlatformUserQueryQuery the user including the extra identity info. Implementations are allowed to include the identity info even without explicitly invoking this.- Specified by:
includeIdentityInfoin interfacePlatformUserQuery
-
userDisplayName
- Specified by:
userDisplayNamein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLike
- Specified by:
userDisplayNameLikein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLikeIgnoreCase
- Specified by:
userDisplayNameLikeIgnoreCasein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
accessibleByUser
Description copied from interface:PlatformUserQueryQuery all users that are accessible by the user with the provideduserId.- Specified by:
accessibleByUserin 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:PlatformUserQueryQuery all users that are accessible by the user with the provideduserIdanduserDefinitionKey.- Specified by:
accessibleByUserWithUserDefinitionKeyin 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:
activein interfacePlatformUserQuery
-
state
- Specified by:
statein interfacePlatformUserQuery
-
subState
- Specified by:
subStatein interfacePlatformUserQuery
-
userIdsNotIn
- Specified by:
userIdsNotInin interfacePlatformUserQuery
-
userDefinitionKey
- Specified by:
userDefinitionKeyin interfacePlatformUserQuery
-
type
Description copied from interface:PlatformUserQueryQuery for users of the given type- Specified by:
typein interfacePlatformUserQuery- See Also:
for known user types
-
subType
- Specified by:
subTypein interfacePlatformUserQuery
-
presence
Description copied from interface:PlatformUserQueryQuery for users with the given presence status.- Specified by:
presencein interfacePlatformUserQuery- See Also:
for known presence states
-
infoEquals
Description copied from interface:PlatformUserQueryChecks for a user with the given info name and value.- Specified by:
infoEqualsin interfacePlatformUserQuery- Parameters:
name- the name of the infovalue- the value that the info should have
-
infoEqualsIgnoreCase
Description copied from interface:PlatformUserQueryChecks for a user with the given info name and value ignoring the case of the value.- Specified by:
infoEqualsIgnoreCasein interfacePlatformUserQuery- Parameters:
name- the name of the infovalue- the value that the info should have
-
infoValueLike
Description copied from interface:PlatformUserQueryChecks for a user with the given info name and value like.- Specified by:
infoValueLikein 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:PlatformUserQueryChecks for a user with the given info name and value like ignoring the case of the value.- Specified by:
infoValueLikeIgnoreCasein 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:
createdBeforein interfacePlatformUserQuery
-
createAfter
- Specified by:
createAfterin interfacePlatformUserQuery
-
tenantId
- Specified by:
tenantIdin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
withoutTenantId
Description copied from interface:PlatformUserQueryQuery only users belonging to no tenant.- Specified by:
withoutTenantIdin interfacePlatformUserQuery
-
memberOfGroupKey
Description copied from interface:PlatformUserQueryOnly selectPlatformUsers that belong to the group with the given key.- Specified by:
memberOfGroupKeyin interfacePlatformUserQuery
-
memberOfGroupKeys
Description copied from interface:PlatformUserQueryOnly selectPlatformUsers that belong to the groups with the given keys.- Specified by:
memberOfGroupKeysin interfacePlatformUserQuery
-
userId
- Specified by:
userIdin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIds
- Specified by:
userIdsin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdIgnoreCase
- Specified by:
userIdIgnoreCasein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstName
- Specified by:
userFirstNamein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLike
- Specified by:
userFirstNameLikein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLikeIgnoreCase
- Specified by:
userFirstNameLikeIgnoreCasein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastName
- Specified by:
userLastNamein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLike
- Specified by:
userLastNameLikein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLikeIgnoreCase
- Specified by:
userLastNameLikeIgnoreCasein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
- Specified by:
userFullNameLikein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLikeIgnoreCase
- Specified by:
userFullNameLikeIgnoreCasein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
protected PlatformUserQuery userFullNameLike(java.lang.String filterKey, java.lang.String fullNameLike) -
userEmail
- Specified by:
userEmailin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
userEmailLike
- Specified by:
userEmailLikein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroup
- Specified by:
memberOfGroupin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroups
- Specified by:
memberOfGroupsin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserId
- Specified by:
orderByUserIdin interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserFirstName
- Specified by:
orderByUserFirstNamein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserLastName
- Specified by:
orderByUserLastNamein interfaceorg.flowable.idm.api.UserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserEmail
- Specified by:
orderByUserEmailin 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
-