public class LdapPersonAttributeDao extends AbstractQueryPersonAttributeDao<org.jasig.services.persondir.support.ldap.LogicalFilterWrapper> implements org.springframework.beans.factory.InitializingBean
IPersonAttributeDao.
In the case of multi valued attributes a List is set as the value.
| Property | Description | Required | Default |
|---|---|---|---|
| searchControls |
Set the SearchControls used for executing the LDAP query.
|
No | Default instance with SUBTREE scope. |
| baseDN | The base DistinguishedName to use when executing the query filter. | No | "" |
| contextSource |
A ContextSource from the Spring-LDAP framework. Provides a DataSource
style object that this DAO can retrieve LDAP connections from.
|
Yes | null |
| setReturningAttributes |
If the ldap attributes set in the ldapAttributesToPortalAttributes Map should be copied
into the SearchControls.setReturningAttributes(String[]). Setting this helps reduce
wire traffic of ldap queries.
|
No | true |
| queryType | How multiple attributes in a query should be concatenated together. The other option is OR. | No | AND |
| queryTemplate | Optional wrapper template for the generated part of the query. Use {0} as a placeholder for where the generated query should be inserted. | No | null |
DEFAULT_CASE_CANONICALIZATION_MODE, DEFAULT_USERNAME_CASE_CANONICALIZATION_MODEloggerWILDCARD, WILDCARD_PATTERN| Constructor and Description |
|---|
LdapPersonAttributeDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.jasig.services.persondir.support.ldap.LogicalFilterWrapper |
appendAttributeToQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder,
String dataAttribute,
List<Object> queryValues)
Append the attribute and value to the queryBuilder.
|
String |
getBaseDN() |
org.springframework.ldap.core.ContextSource |
getContextSource() |
protected List<IPersonAttributes> |
getPeopleForQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder,
String queryUserName)
Executes the query for the generated queryBuilder object and returns a list where each entry is a Map of
attributes for a single IPersonAttributes.
|
String |
getQueryTemplate() |
QueryType |
getQueryType() |
SearchControls |
getSearchControls() |
int |
getTimeLimit()
Deprecated.
Set the property on the
SearchControls and set that via setSearchControls(SearchControls) |
void |
setBaseDN(String baseDN) |
void |
setContextSource(org.springframework.ldap.core.ContextSource contextSource) |
void |
setLdapTemplate(org.springframework.ldap.core.LdapTemplate ldapTemplate)
Sets the LdapTemplate, and thus the ContextSource (implicitly).
|
void |
setQueryTemplate(String queryTemplate)
Optional wrapper template for the generated part of the query.
|
void |
setQueryType(QueryType queryType)
Type of logical operator to use when joining WHERE clause components
|
void |
setSearchControls(SearchControls searchControls) |
void |
setTimeLimit(int ms)
Deprecated.
|
appendCanonicalizedAttributeToQuery, canonicalizeAttribute, generateQuery, getAvailableQueryAttributes, getCaseCanonicalizationLocale, getCaseInsensitiveQueryAttributes, getCaseInsensitiveResultAttributes, getConfiguredUserNameAttribute, getDefaultCaseCanonicalizationMode, getPeopleWithMultivaluedAttributes, getPossibleUserAttributeNames, getQueryAttributeMapping, getResultAttributeMapping, getUnmappedUsernameAttribute, getUsernameCaseCanonicalizationMode, isRequireAllQueryAttributes, isUseAllQueryAttributes, isUserNameAttributeConfigured, mapPersonAttributes, setCaseCanonicalizationLocale, setCaseInsensitiveQueryAttributes, setCaseInsensitiveQueryAttributesAsCollection, setCaseInsensitiveResultAttributes, setCaseInsensitiveResultAttributesAsCollection, setDefaultCaseCanonicalizationMode, setQueryAttributeMapping, setRequireAllQueryAttributes, setResultAttributeMapping, setUnmappedUsernameAttribute, setUseAllQueryAttributes, setUsernameCaseCanonicalizationModegetPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMapgetPeople, toMultivaluedSeedflattenResults, getMultivaluedUserAttributes, getMultivaluedUserAttributes, getUserAttributes, getUserAttributespublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionprotected org.jasig.services.persondir.support.ldap.LogicalFilterWrapper appendAttributeToQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder, String dataAttribute, List<Object> queryValues)
AbstractQueryPersonAttributeDaoappendAttributeToQuery in class AbstractQueryPersonAttributeDao<org.jasig.services.persondir.support.ldap.LogicalFilterWrapper>queryBuilder - The sub-class specific query builder objectdataAttribute - The full attribute name to appendqueryValues - The values for the data attributeprotected List<IPersonAttributes> getPeopleForQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder, String queryUserName)
AbstractQueryPersonAttributeDaogetPeopleForQuery in class AbstractQueryPersonAttributeDao<org.jasig.services.persondir.support.ldap.LogicalFilterWrapper>queryBuilder - The query generated by calls to AbstractQueryPersonAttributeDao.appendAttributeToQuery(Object, String, List)queryUserName - The username passed in the query map, if no username attribute existed in the query Map null is provided.@Deprecated public int getTimeLimit()
SearchControls and set that via setSearchControls(SearchControls)SearchControls.getTimeLimit()@Deprecated public void setTimeLimit(int ms)
ms - time limit in millisecondsSearchControls.setTimeLimit(int)public String getBaseDN()
public void setBaseDN(String baseDN)
baseDN - The base distinguished name to use for queries.public org.springframework.ldap.core.ContextSource getContextSource()
public void setContextSource(org.springframework.ldap.core.ContextSource contextSource)
contextSource - The ContextSource to get DirContext objects for queries from.public void setLdapTemplate(org.springframework.ldap.core.LdapTemplate ldapTemplate)
ldapTemplate - the LdapTemplate to query the LDAP server from. CANNOT be NULL.public SearchControls getSearchControls()
public void setSearchControls(SearchControls searchControls)
searchControls - Search controls to use for LDAP queriespublic QueryType getQueryType()
public void setQueryType(QueryType queryType)
queryType - the queryType to setpublic String getQueryTemplate()
public void setQueryTemplate(String queryTemplate)
queryTemplate - query templateCopyright © 2015 Jasig. All Rights Reserved.