org.jasig.services.persondir.support.ldap
Class LdapPersonAttributeDao
java.lang.Object
org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao
org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao
- All Implemented Interfaces:
- org.jasig.services.persondir.IPersonAttributeDao
public class LdapPersonAttributeDao
- extends AbstractQueryPersonAttributeDao
LDAP implementation of IPersonAttributeDao.
In the case of multi valued attributes a List is set as the value.
Configuration:
| Property |
Description |
Required |
Default |
| timeLimit |
Sets a time limit for LDAP Query execution time. See SearchControls.setTimeLimit(int)
|
No |
0 |
| ldapAttributesToPortalAttributes |
The Map of String ldap attribute names to String or
Sets of Strings to use as attribute names in the returned Map.
If a ldap attribute name is not in the map the ldap attribute name will be
used in as the returned attribute name.
|
No |
Collections.EMPTY_MAP |
| query |
The LDAP filter query to use when finding the user attributes.
|
Yes |
null |
| 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 |
- Since:
- uPortal 2.5
- Version:
- $Revision: 43106 $ $Date: 2008-02-14 11:22:40 -0600 (Thu, 14 Feb 2008) $
- Author:
- andrew.petro@yale.edu, Eric Dalquist
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LdapPersonAttributeDao
public LdapPersonAttributeDao()
getUserAttributesIfNeeded
protected Map<String,List<Object>> getUserAttributesIfNeeded(Object[] args)
- Checks for valid query and context source objects.
Executes the search.
Returns the attribute map results from the query.
- Overrides:
getUserAttributesIfNeeded in class AbstractQueryPersonAttributeDao
- Parameters:
args - The arguments to execute the query with.
- Returns:
- The results of the query, as specified by
IPersonAttributeDao.getUserAttributes(Map) - See Also:
AbstractQueryPersonAttributeDao.getUserAttributesIfNeeded(java.lang.Object[])
getPossibleUserAttributeNames
public Set<String> getPossibleUserAttributeNames()
getLdapAttributesToPortalAttributes
public Map<String,Set<String>> getLdapAttributesToPortalAttributes()
- Get the mapping from LDAP attribute names to uPortal attribute names.
Mapping type is from String to [String | Set of String].
- Returns:
- Returns the ldapAttributesToPortalAttributes.
setLdapAttributesToPortalAttributes
public void setLdapAttributesToPortalAttributes(Map<String,Object> ldapAttributesToPortalAttributesArg)
- Set the
Map to use for mapping from a ldap attribute name to a
portal attribute name or Set of portal attribute names. Ldap
attribute names that are specified but have null mappings will use the
ldap attribute name for the portal attribute name. Ldap attribute names
that are not specified as keys in this Map will be ignored.
The passed Map must have keys of type String and values
of type String or a Set of String.
- Parameters:
ldapAttributesToPortalAttributesArg - Map from ldap attribute names to portal attribute
names.
- Throws:
IllegalArgumentException - If the Map doesn't follow the rules stated above.- See Also:
MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(Map)
getTimeLimit
public int getTimeLimit()
- Returns:
- Returns the timeLimit.
setTimeLimit
public void setTimeLimit(int timeLimit)
- Parameters:
timeLimit - The timeLimit to set.
getQuery
public String getQuery()
- Returns:
- Returns the query.
setQuery
public void setQuery(String uidQuery)
- Parameters:
uidQuery - The query to set.
getBaseDN
public String getBaseDN()
- Returns:
- Returns the ldapServer.
setBaseDN
public void setBaseDN(String baseDN)
- Parameters:
baseDN - The ldapServer to set.
getContextSource
public ContextSource getContextSource()
- Returns:
- Returns the contextSource.
setContextSource
public void setContextSource(ContextSource contextSource)
- Parameters:
contextSource - The contextSource to set.
Copyright © 1998-2008 Java Architectures Special Interest Group. All Rights Reserved.