|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.services.persondir.support.BasePersonAttributeDao
org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao<org.jasig.services.persondir.support.ldap.LogicalFilterWrapper>
org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao
public class LdapPersonAttributeDao
LDAP implementation of IPersonAttributeDao.
In the case of multi valued attributes a List is set as the value.
Configuration:
| 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 |
| Field Summary |
|---|
| Fields inherited from class org.jasig.services.persondir.support.BasePersonAttributeDao |
|---|
logger |
| Fields inherited from interface org.jasig.services.persondir.IPersonAttributeDao |
|---|
WILDCARD, WILDCARD_PATTERN |
| Constructor Summary | |
|---|---|
LdapPersonAttributeDao()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao |
|---|
getPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMap |
| Methods inherited from class org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao |
|---|
getPeople, toMultivaluedSeed |
| Methods inherited from class org.jasig.services.persondir.support.BasePersonAttributeDao |
|---|
flattenResults, getMultivaluedUserAttributes, getMultivaluedUserAttributes, getUserAttributes, getUserAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LdapPersonAttributeDao()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
protected org.jasig.services.persondir.support.ldap.LogicalFilterWrapper appendAttributeToQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder,
String dataAttribute,
List<Object> queryValues)
AbstractQueryPersonAttributeDao
appendAttributeToQuery 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 attribute
protected List<IPersonAttributes> getPeopleForQuery(org.jasig.services.persondir.support.ldap.LogicalFilterWrapper queryBuilder,
String queryUserName)
AbstractQueryPersonAttributeDao
getPeopleForQuery 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)
SearchControls.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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||