Package com.atlassian.crowd.search.ldap
Class LDAPQueryTranslaterImpl
java.lang.Object
com.atlassian.crowd.search.ldap.LDAPQueryTranslaterImpl
- All Implemented Interfaces:
LDAPQueryTranslater
- Direct Known Subclasses:
ActiveDirectoryQueryTranslaterImpl
The LDAPQueryTranslater:
- Does not support searching based on GroupTermKeys.GROUP_TYPE: this cannot exist as a search restriction.
If it does, say hello to IllegalArgumentException.
- Assumes that all groups and users are 'active' in the underlying directory implementation. Thus if a
subsearch if made for an 'inactive' groups/users, that subsearch is returns nothing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasLDAPFilter
(EntityQuery query, LDAPPropertiesMapper ldapPropertiesMapper) protected org.springframework.ldap.filter.Filter
booleanTermRestrictionAsFilter
(EntityDescriptor entityDescriptor, PropertyRestriction<Boolean> termRestriction, LDAPPropertiesMapper ldapPropertiesMapper) protected org.springframework.ldap.filter.Filter
getStringTermEqualityFilter
(String propertyName, PropertyRestriction<String> termRestriction) Certain LDAP directories, like AD, may require the value being searched to be encoded or not depending on the attribute under search.
-
Constructor Details
-
LDAPQueryTranslaterImpl
public LDAPQueryTranslaterImpl()
-
-
Method Details
-
asLDAPFilter
public LDAPQuery asLDAPFilter(EntityQuery query, LDAPPropertiesMapper ldapPropertiesMapper) throws NullResultException - Specified by:
asLDAPFilter
in interfaceLDAPQueryTranslater
- Throws:
NullResultException
-
booleanTermRestrictionAsFilter
protected org.springframework.ldap.filter.Filter booleanTermRestrictionAsFilter(EntityDescriptor entityDescriptor, PropertyRestriction<Boolean> termRestriction, LDAPPropertiesMapper ldapPropertiesMapper) -
getStringTermEqualityFilter
protected org.springframework.ldap.filter.Filter getStringTermEqualityFilter(String propertyName, PropertyRestriction<String> termRestriction) Certain LDAP directories, like AD, may require the value being searched to be encoded or not depending on the attribute under search. Subclasses may override to create appropriate Filter with encoding on or off.- Parameters:
propertyName
- attribute name to be queried in LDAPtermRestriction
- PropertyRestriction containing the value that will be searched for- Returns:
- filter object to execute the appropriate query
-