|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao
org.jasig.portal.services.persondir.support.LdapPersonAttributeDaoImpl
public class LdapPersonAttributeDaoImpl
LDAP implementation of IPersonAttributeDao
. This is code copied
from uPortal 2.4 PersonDirectory
and
made to implement this DAO interface. Dependent upon JNDI.
In the case of multi valued attributes, now stores a
ArrayList
rather than a Vector
.
Field Summary | |
---|---|
private java.util.Map |
attributeMappings
Map from LDAP attribute names to uPortal attribute names. |
private ILdapServer |
ldapServer
The ldap server to use to make the queries against. |
private java.lang.String |
query
The query we should execute. |
private java.util.List |
queryAttributes
List of names of uPortal attributes the values of which will be used, in order, to populate the parameters of the LDAP query. |
private int |
timeLimit
Time limit, in milliseconds, for LDAP query. |
private java.util.Set |
userAttributes
Set of attributes this DAO may provide when queried. |
Fields inherited from class org.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao |
---|
log |
Constructor Summary | |
---|---|
LdapPersonAttributeDaoImpl()
|
Method Summary | |
---|---|
java.util.Map |
getLdapAttributesToPortalAttributes()
Get the mapping from LDAP attribute names to uPortal attribute names. |
ILdapServer |
getLdapServer()
|
java.util.Set |
getPossibleUserAttributeNames()
Gets a Set of attribute names that may be returned by the
IPersonAttributeDao.getUserAttributes(Map) . |
java.lang.String |
getQuery()
|
java.util.List |
getQueryAttributes()
|
int |
getTimeLimit()
|
java.util.Map |
getUserAttributes(java.util.Map seed)
Returned Map will have values of String or String[] or byte[] |
void |
setLdapAttributesToPortalAttributes(java.util.Map ldapAttributesToPortalAttributesArg)
Set the Map to use for mapping from a ldap attribute name to a
portal attribute name or Set of portal attribute names. |
void |
setLdapServer(ILdapServer ldapServer)
|
void |
setQuery(java.lang.String uidQuery)
|
void |
setQueryAttributes(java.util.List queryAttributes)
|
void |
setTimeLimit(int timeLimit)
|
java.lang.String |
toString()
|
Methods inherited from class org.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao |
---|
getDefaultAttributeName, getUserAttributes, setDefaultAttributeName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int timeLimit
private java.lang.String query
private java.util.Map attributeMappings
private java.util.Set userAttributes
Set
of attributes this DAO may provide when queried.
private java.util.List queryAttributes
private ILdapServer ldapServer
Constructor Detail |
---|
public LdapPersonAttributeDaoImpl()
Method Detail |
---|
public java.util.Map getUserAttributes(java.util.Map seed)
Map
will have values of String or String[] or byte[]
seed
- immutable Map of attributes to values to seed the query
IPersonAttributeDao.getUserAttributes(java.util.Map)
public java.util.Set getPossibleUserAttributeNames()
IPersonAttributeDao
Set
of attribute names that may be returned by the
IPersonAttributeDao.getUserAttributes(Map)
. The names returned represent all
possible names IPersonAttributeDao.getUserAttributes(Map)
could return. If the
dao doesn't have a way to know all possible attribute names this
method should return null
.
Set
.
public java.util.Map getLdapAttributesToPortalAttributes()
public void setLdapAttributesToPortalAttributes(java.util.Map ldapAttributesToPortalAttributesArg)
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.
Map
must have keys of type String
and values
of type String
or a Set
of String
.
ldapAttributesToPortalAttributesArg
- Map
from ldap attribute names to portal attribute names.
java.lang.IllegalArgumentException
- If the Map
doesn't follow the rules stated above.MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(Map)
public int getTimeLimit()
public void setTimeLimit(int timeLimit)
timeLimit
- The timeLimit to set.public java.lang.String getQuery()
public void setQuery(java.lang.String uidQuery)
uidQuery
- The query to set.public ILdapServer getLdapServer()
public void setLdapServer(ILdapServer ldapServer)
ldapServer
- The ldapServer to set.public java.util.List getQueryAttributes()
public void setQueryAttributes(java.util.List queryAttributes)
queryAttributes
- The queryAttributes to set.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |