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_MAPPERAn AttributesMapper that would be used only for the count query.protected static QueryPropertyEMAILprotected Map<String,Filter>filtersMapprotected static QueryPropertyFIRST_NAMEprotected PlatformIdentityServiceidentityServiceprotected booleanincludeIdentityInfoprotected static QueryPropertyLAST_NAMEprotected LdapConfigurationApildapConfigurationprotected org.slf4j.Loggerloggerprotected StringmemberOfGroupprotected StringmemberOfGroupKeyprotected Collection<String>memberOfGroupKeysprotected Collection<String>memberOfGroupKeysForOrprotected Collection<String>memberOfGroupsprotected StringtenantIdprotected static QueryPropertyUSER_IDprotected StringuserDefinitionKeyprotected 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:
executeListin classAbstractQuery<PlatformUserQuery,PlatformUser>
-
mapWithDbInfos
protected PlatformUser mapWithDbInfos(Attributes attributes) throws NamingException
- Throws:
NamingException
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCountin 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: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
public PlatformUserQuery userDisplayName(String displayName)
- Specified by:
userDisplayNamein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLike
public PlatformUserQuery userDisplayNameLike(String displayNameLike)
- Specified by:
userDisplayNameLikein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userDisplayNameLikeIgnoreCase
public PlatformUserQuery userDisplayNameLikeIgnoreCase(String displayNameLikeIgnoreCase)
- Specified by:
userDisplayNameLikeIgnoreCasein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
accessibleByUser
public PlatformUserQuery accessibleByUser(String userId)
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(String userId, 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
public PlatformUserQuery active()
- Specified by:
activein interfacePlatformUserQuery
-
state
public PlatformUserQuery state(String state)
- Specified by:
statein interfacePlatformUserQuery
-
subState
public PlatformUserQuery subState(String subState)
- Specified by:
subStatein interfacePlatformUserQuery
-
userIdsNotIn
public PlatformUserQuery userIdsNotIn(List<String> ids)
- Specified by:
userIdsNotInin interfacePlatformUserQuery
-
userDefinitionKey
public PlatformUserQuery userDefinitionKey(String userDefinitionKey)
- Specified by:
userDefinitionKeyin interfacePlatformUserQuery
-
type
public PlatformUserQuery type(String type)
Description copied from interface:PlatformUserQueryQuery for users of the given type- Specified by:
typein interfacePlatformUserQuery- See Also:
for known user types
-
subType
public PlatformUserQuery subType(String subType)
- Specified by:
subTypein interfacePlatformUserQuery
-
presence
public PlatformUserQuery presence(String presence)
Description copied from interface:PlatformUserQueryQuery for users with the given presence status.- Specified by:
presencein interfacePlatformUserQuery- See Also:
for known presence states
-
infoEquals
public PlatformUserQuery infoEquals(String name, Object value)
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
public PlatformUserQuery infoEqualsIgnoreCase(String name, String value)
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
public PlatformUserQuery infoValueLike(String name, String valueLike)
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(String name, 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
public PlatformUserQuery createdBefore(Date createdBefore)
- Specified by:
createdBeforein interfacePlatformUserQuery
-
createAfter
public PlatformUserQuery createAfter(Date createdAfter)
- Specified by:
createAfterin interfacePlatformUserQuery
-
tenantId
public PlatformUserQuery tenantId(String tenantId)
- Specified by:
tenantIdin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
withoutTenantId
public PlatformUserQuery withoutTenantId()
Description copied from interface:PlatformUserQueryQuery only users belonging to no tenant.- Specified by:
withoutTenantIdin interfacePlatformUserQuery
-
memberOfGroupKey
public PlatformUserQuery memberOfGroupKey(String groupKey)
Description copied from interface:PlatformUserQueryOnly selectPlatformUsers that belong to the group with the given key.- Specified by:
memberOfGroupKeyin interfacePlatformUserQuery
-
memberOfGroupKeys
public PlatformUserQuery memberOfGroupKeys(Collection<String> groupKeys)
Description copied from interface:PlatformUserQueryOnly selectPlatformUsers that belong to the groups with the given keys.- Specified by:
memberOfGroupKeysin interfacePlatformUserQuery
-
userId
public PlatformUserQuery userId(String id)
- Specified by:
userIdin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIds
public PlatformUserQuery userIds(List<String> ids)
- Specified by:
userIdsin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdIgnoreCase
public PlatformUserQuery userIdIgnoreCase(String id)
- Specified by:
userIdIgnoreCasein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstName
public PlatformUserQuery userFirstName(String firstName)
- Specified by:
userFirstNamein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLike
public PlatformUserQuery userFirstNameLike(String firstNameLike)
- Specified by:
userFirstNameLikein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFirstNameLikeIgnoreCase
public PlatformUserQuery userFirstNameLikeIgnoreCase(String firstNameLikeIgnoreCase)
- Specified by:
userFirstNameLikeIgnoreCasein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastName
public PlatformUserQuery userLastName(String lastName)
- Specified by:
userLastNamein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLike
public PlatformUserQuery userLastNameLike(String lastNameLike)
- Specified by:
userLastNameLikein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userLastNameLikeIgnoreCase
public PlatformUserQuery userLastNameLikeIgnoreCase(String lastNameLikeIgnoreCase)
- Specified by:
userLastNameLikeIgnoreCasein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
public PlatformUserQuery userFullNameLike(String fullNameLike)
- Specified by:
userFullNameLikein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLikeIgnoreCase
public PlatformUserQuery userFullNameLikeIgnoreCase(String fullNameLikeIgnoreCase)
- Specified by:
userFullNameLikeIgnoreCasein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userFullNameLike
protected PlatformUserQuery userFullNameLike(String filterKey, String fullNameLike)
-
userEmail
public PlatformUserQuery userEmail(String email)
- Specified by:
userEmailin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userEmailLike
public PlatformUserQuery userEmailLike(String emailLike)
- Specified by:
userEmailLikein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroup
public PlatformUserQuery memberOfGroup(String groupId)
- Specified by:
memberOfGroupin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
memberOfGroups
public PlatformUserQuery memberOfGroups(List<String> groupIds)
- Specified by:
memberOfGroupsin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
userIdsOrMemberOfGroupKeys
public PlatformUserQuery userIdsOrMemberOfGroupKeys(Collection<String> userIds, Collection<String> groupKeys)
Description copied from interface:PlatformUserQueryOnly selectPlatformUsers with the given user ids or that belong to the groups with the given keys.- Specified by:
userIdsOrMemberOfGroupKeysin interfacePlatformUserQuery
-
orderByUserId
public PlatformUserQuery orderByUserId()
- Specified by:
orderByUserIdin interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserFirstName
public PlatformUserQuery orderByUserFirstName()
- Specified by:
orderByUserFirstNamein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserLastName
public PlatformUserQuery orderByUserLastName()
- Specified by:
orderByUserLastNamein interfaceUserBaseQuery<PlatformUserQuery,PlatformUser>
-
orderByUserEmail
public PlatformUserQuery orderByUserEmail()
- Specified by:
orderByUserEmailin 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()
-
-