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
,Serializable
,Query<PlatformUserQuery,PlatformUser>
,Command<Object>
,UserBaseQuery<PlatformUserQuery,PlatformUser>
public class LdapUserQuery extends AbstractQuery<PlatformUserQuery,PlatformUser> implements PlatformUserQuery
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
ListQueryParameterObject.OrderBy, ListQueryParameterObject.ResultType
-
Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query
Query.NullHandlingOnOrder
-
-
Field Summary
Fields Modifier and Type Field Description protected static AttributesMapper<PlatformUser>
COUNTING_ATTRIBUTES_MAPPER
An AttributesMapper that would be used only for the count query.protected static QueryProperty
EMAIL
protected Map<String,Filter>
filtersMap
protected static QueryProperty
FIRST_NAME
protected PlatformIdentityService
identityService
protected boolean
includeIdentityInfo
protected static QueryProperty
LAST_NAME
protected LdapConfigurationApi
ldapConfiguration
protected org.slf4j.Logger
logger
protected String
memberOfGroup
protected String
memberOfGroupKey
protected Collection<String>
memberOfGroupKeys
protected Collection<String>
memberOfGroupKeysForOr
protected Collection<String>
memberOfGroups
protected String
tenantId
protected static QueryProperty
USER_ID
protected String
userDefinitionKey
protected Collection<String>
userIdsForOr
-
Fields inherited from class org.flowable.common.engine.impl.query.AbstractQuery
commandContext, commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, defaultOrderBy, firstResult, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC
-
-
Constructor Summary
Constructors Constructor Description LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService)
-
Method Summary
-
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, buildOrderBy, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByCollectionSafe, getOrderByForWindow, getOuterJoinOrderBy, getParameter, hasOrderBy, hasOrderByForColumn, isNeedsPaging, mapOrderByToSql, setDatabaseType, setFirstResult, setMaxResults, setNullHandlingColumn, setParameter
-
-
-
-
Field Detail
-
USER_ID
protected static final QueryProperty USER_ID
-
FIRST_NAME
protected static final QueryProperty FIRST_NAME
-
LAST_NAME
protected static final QueryProperty LAST_NAME
-
EMAIL
protected static final QueryProperty EMAIL
-
COUNTING_ATTRIBUTES_MAPPER
protected static final AttributesMapper<PlatformUser> COUNTING_ATTRIBUTES_MAPPER
An 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
protected final LdapConfigurationApi ldapConfiguration
-
identityService
protected final PlatformIdentityService identityService
-
includeIdentityInfo
protected boolean includeIdentityInfo
-
memberOfGroup
protected String memberOfGroup
-
memberOfGroups
protected Collection<String> memberOfGroups
-
memberOfGroupKey
protected String memberOfGroupKey
-
memberOfGroupKeys
protected Collection<String> memberOfGroupKeys
-
userIdsForOr
protected Collection<String> userIdsForOr
-
memberOfGroupKeysForOr
protected Collection<String> memberOfGroupKeysForOr
-
userDefinitionKey
protected String userDefinitionKey
-
tenantId
protected String tenantId
-
-
Constructor Detail
-
LdapUserQuery
public LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService)
-
-
Method Detail
-
executeList
public List<PlatformUser> executeList(CommandContext commandContext)
- Specified by:
executeList
in classAbstractQuery<PlatformUserQuery,PlatformUser>
-
mapWithDbInfos
protected PlatformUser mapWithDbInfos(Attributes attributes) throws NamingException
- Throws:
NamingException
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCount
in classAbstractQuery<PlatformUserQuery,PlatformUser>
-
prepareQueryFilter
protected Filter prepareQueryFilter()
-
memberOfFilter
protected Filter memberOfFilter(Collection<String> groupDns)
-
userIdsFilter
protected Filter userIdsFilter(Collection<String> userIds)
-
includeIdentityInfo
public PlatformUserQuery 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
public PlatformUserQuery userDisplayName(String displayName)
- Specified by:
userDisplayName
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLike
public PlatformUserQuery userDisplayNameLike(String displayNameLike)
- Specified by:
userDisplayNameLike
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLikeIgnoreCase
public PlatformUserQuery userDisplayNameLikeIgnoreCase(String displayNameLikeIgnoreCase)
- Specified by:
userDisplayNameLikeIgnoreCase
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
accessibleByUser
public PlatformUserQuery accessibleByUser(String userId)
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(String userId, 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
public PlatformUserQuery active()
- Specified by:
active
in interfacePlatformUserQuery
-
state
public PlatformUserQuery state(String state)
- Specified by:
state
in interfacePlatformUserQuery
-
subState
public PlatformUserQuery subState(String subState)
- Specified by:
subState
in interfacePlatformUserQuery
-
userIdsNotIn
public PlatformUserQuery userIdsNotIn(List<String> ids)
- Specified by:
userIdsNotIn
in interfacePlatformUserQuery
-
userDefinitionKey
public PlatformUserQuery userDefinitionKey(String userDefinitionKey)
- Specified by:
userDefinitionKey
in interfacePlatformUserQuery
-
type
public PlatformUserQuery type(String 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
public PlatformUserQuery subType(String subType)
- Specified by:
subType
in interfacePlatformUserQuery
-
presence
public PlatformUserQuery presence(String 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
public PlatformUserQuery infoEquals(String name, Object value)
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
public PlatformUserQuery infoEqualsIgnoreCase(String name, String value)
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
public PlatformUserQuery infoValueLike(String name, String valueLike)
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(String name, 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
public PlatformUserQuery createdBefore(Date createdBefore)
- Specified by:
createdBefore
in interfacePlatformUserQuery
-
createAfter
public PlatformUserQuery createAfter(Date createdAfter)
- Specified by:
createAfter
in interfacePlatformUserQuery
-
tenantId
public PlatformUserQuery tenantId(String tenantId)
- Specified by:
tenantId
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
withoutTenantId
public PlatformUserQuery withoutTenantId()
Description copied from interface:PlatformUserQuery
Query only users belonging to no tenant.- Specified by:
withoutTenantId
in interfacePlatformUserQuery
-
memberOfGroupKey
public PlatformUserQuery memberOfGroupKey(String groupKey)
Description copied from interface:PlatformUserQuery
Only selectPlatformUser
s that belong to the group with the given key.- Specified by:
memberOfGroupKey
in interfacePlatformUserQuery
-
memberOfGroupKeys
public PlatformUserQuery memberOfGroupKeys(Collection<String> groupKeys)
Description copied from interface:PlatformUserQuery
Only selectPlatformUser
s that belong to the groups with the given keys.- Specified by:
memberOfGroupKeys
in interfacePlatformUserQuery
-
userId
public PlatformUserQuery userId(String id)
- Specified by:
userId
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIds
public PlatformUserQuery userIds(List<String> ids)
- Specified by:
userIds
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdIgnoreCase
public PlatformUserQuery userIdIgnoreCase(String id)
- Specified by:
userIdIgnoreCase
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstName
public PlatformUserQuery userFirstName(String firstName)
- Specified by:
userFirstName
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLike
public PlatformUserQuery userFirstNameLike(String firstNameLike)
- Specified by:
userFirstNameLike
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLikeIgnoreCase
public PlatformUserQuery userFirstNameLikeIgnoreCase(String firstNameLikeIgnoreCase)
- Specified by:
userFirstNameLikeIgnoreCase
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastName
public PlatformUserQuery userLastName(String lastName)
- Specified by:
userLastName
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLike
public PlatformUserQuery userLastNameLike(String lastNameLike)
- Specified by:
userLastNameLike
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLikeIgnoreCase
public PlatformUserQuery userLastNameLikeIgnoreCase(String lastNameLikeIgnoreCase)
- Specified by:
userLastNameLikeIgnoreCase
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
public PlatformUserQuery userFullNameLike(String fullNameLike)
- Specified by:
userFullNameLike
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLikeIgnoreCase
public PlatformUserQuery userFullNameLikeIgnoreCase(String fullNameLikeIgnoreCase)
- Specified by:
userFullNameLikeIgnoreCase
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
protected PlatformUserQuery userFullNameLike(String filterKey, String fullNameLike)
-
userEmail
public PlatformUserQuery userEmail(String email)
- Specified by:
userEmail
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userEmailLike
public PlatformUserQuery userEmailLike(String emailLike)
- Specified by:
userEmailLike
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroup
public PlatformUserQuery memberOfGroup(String groupId)
- Specified by:
memberOfGroup
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroups
public PlatformUserQuery memberOfGroups(List<String> groupIds)
- Specified by:
memberOfGroups
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdsOrMemberOfGroupKeys
public PlatformUserQuery userIdsOrMemberOfGroupKeys(Collection<String> userIds, Collection<String> groupKeys)
Description copied from interface:PlatformUserQuery
Only selectPlatformUser
s with the given user ids or that belong to the groups with the given keys.- Specified by:
userIdsOrMemberOfGroupKeys
in interfacePlatformUserQuery
-
orderByUserId
public PlatformUserQuery orderByUserId()
- Specified by:
orderByUserId
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserFirstName
public PlatformUserQuery orderByUserFirstName()
- Specified by:
orderByUserFirstName
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserLastName
public PlatformUserQuery orderByUserLastName()
- Specified by:
orderByUserLastName
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserEmail
public PlatformUserQuery orderByUserEmail()
- Specified by:
orderByUserEmail
in interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
withInfo
protected PlatformUserQuery withInfo(String filterKey, String infoName, String value, BiFunction<String,String,Filter> filterCreator)
-
with
protected PlatformUserQuery with(String filterKey, Collection<String> attributeNames, String value, BiFunction<String,String,Filter> filterCreator)
-
createFilter
protected OrFilter createFilter(Collection<String> attributeNames, String value, BiFunction<String,String,Filter> filterCreator)
-
withFilter
protected PlatformUserQuery withFilter(String filterKey, Filter query)
-
getLdapOperations
protected LdapOperations getLdapOperations()
-
getUserMappings
protected LdapUserProperties.Mappings getUserMappings()
-
getUserProperties
protected LdapUserProperties getUserProperties()
-
getDistinguishedNameProvider
protected DistinguishedNameProvider getDistinguishedNameProvider()
-
getUserAttributesMapper
protected AttributesMapper<PlatformUser> getUserAttributesMapper()
-
-