org.kuali.rice.kim.dao.impl
Class LdapPrincipalDaoImpl

java.lang.Object
  extended by org.kuali.rice.kim.dao.impl.LdapPrincipalDaoImpl
All Implemented Interfaces:
LdapPrincipalDao

public class LdapPrincipalDaoImpl
extends Object
implements LdapPrincipalDao

Integrated Data Access via LDAP to EDS. Provides implementation to interface method for using Spring-LDAP to communicate with EDS.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
LdapPrincipalDaoImpl()
           
 
Method Summary
 Map<String,org.springframework.ldap.core.ContextMapper> getContextMappers()
           
 Map<String,EntityNamePrincipalName> getDefaultNamesForEntityIds(List<String> entityIds)
           
 Map<String,EntityNamePrincipalName> getDefaultNamesForPrincipalIds(List<String> principalIds)
           
 Entity getEntity(String entityId)
          FIND entity objects based on the given criteria.
 Entity getEntityByPrincipalId(String principalId)
          Fetches full entity info, populated from EDS, based on the Entity's principal id
 Entity getEntityByPrincipalName(String principalName)
           
 EntityDefault getEntityDefault(String entityId)
          Find entity objects based on the given criteria.
 EntityDefault getEntityDefaultByPrincipalId(String principalId)
          entityid and principalId are treated as the same.
 EntityDefault getEntityDefaultByPrincipalName(String principalName)
           
 EntityPrivacyPreferences getEntityPrivacyPreferences(String entityId)
           
protected  Matcher getKimAttributeMatcher(String kimAttribute)
           
 Constants getKimConstants()
           
protected  String getLdapAttribute(String kimAttribute)
           
protected  Map<String,Object> getLdapLookupCriteria(Map<String,String> searchCriteria)
          Converts Kuali Lookup parameters into LDAP query parameters
 org.springframework.ldap.core.LdapTemplate getLdapTemplate()
           
protected  Object getLdapValue(String kimAttribute)
           
 ParameterService getParameterService()
           
 Principal getPrincipal(String principalId)
          In EDS, the principalId, principalName, and entityId will all be the same.
 Principal getPrincipalByName(String principalName)
          Assuming he principalId, principalName, and entityId will all be the same.
protected  SearchControls getSearchControls()
           
protected  boolean isMapped(String kimAttribute)
           
 List<EntityDefault> lookupEntityDefault(Map<String,String> searchCriteria, boolean unbounded)
           
 List<String> lookupEntityIds(Map<String,String> searchCriteria)
           
<T> List<T>
search(Class<T> type, Map<String,Object> criteria)
           
 void setContextMappers(Map<String,org.springframework.ldap.core.ContextMapper> contextMappers)
           
 void setKimConstants(Constants constants)
           
 void setLdapTemplate(org.springframework.ldap.core.LdapTemplate template)
           
 void setParameterService(ParameterService service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapPrincipalDaoImpl

public LdapPrincipalDaoImpl()
Method Detail

getPrincipal

public Principal getPrincipal(String principalId)
In EDS, the principalId, principalName, and entityId will all be the same.

Specified by:
getPrincipal in interface LdapPrincipalDao

getPrincipalByName

public Principal getPrincipalByName(String principalName)
Assuming he principalId, principalName, and entityId will all be the same.

Specified by:
getPrincipalByName in interface LdapPrincipalDao

search

public <T> List<T> search(Class<T> type,
                          Map<String,Object> criteria)
Specified by:
search in interface LdapPrincipalDao

getSearchControls

protected SearchControls getSearchControls()

getEntity

public Entity getEntity(String entityId)
FIND entity objects based on the given criteria.

Specified by:
getEntity in interface LdapPrincipalDao
Parameters:
entityId - of user/person to grab entity information for
Returns:
Entity

getEntityByPrincipalId

public Entity getEntityByPrincipalId(String principalId)
Fetches full entity info, populated from EDS, based on the Entity's principal id

Specified by:
getEntityByPrincipalId in interface LdapPrincipalDao
Parameters:
principalId - the principal id to look the entity up for
Returns:
the corresponding entity info

getEntityDefault

public EntityDefault getEntityDefault(String entityId)
Description copied from interface: LdapPrincipalDao
Find entity objects based on the given criteria.

Specified by:
getEntityDefault in interface LdapPrincipalDao

getEntityDefaultByPrincipalId

public EntityDefault getEntityDefaultByPrincipalId(String principalId)
entityid and principalId are treated as the same.

Specified by:
getEntityDefaultByPrincipalId in interface LdapPrincipalDao
See Also:
#getEntityDefaultInfo(String)

getEntityDefaultByPrincipalName

public EntityDefault getEntityDefaultByPrincipalName(String principalName)
Specified by:
getEntityDefaultByPrincipalName in interface LdapPrincipalDao

getEntityByPrincipalName

public Entity getEntityByPrincipalName(String principalName)
Specified by:
getEntityByPrincipalName in interface LdapPrincipalDao

lookupEntityDefault

public List<EntityDefault> lookupEntityDefault(Map<String,String> searchCriteria,
                                               boolean unbounded)

lookupEntityIds

public List<String> lookupEntityIds(Map<String,String> searchCriteria)
Specified by:
lookupEntityIds in interface LdapPrincipalDao

getLdapLookupCriteria

protected Map<String,Object> getLdapLookupCriteria(Map<String,String> searchCriteria)
Converts Kuali Lookup parameters into LDAP query parameters

Parameters:
searchCriteria - kuali lookup info
Returns:
Map of LDAP query info

getEntityPrivacyPreferences

public EntityPrivacyPreferences getEntityPrivacyPreferences(String entityId)
Specified by:
getEntityPrivacyPreferences in interface LdapPrincipalDao

getDefaultNamesForPrincipalIds

public Map<String,EntityNamePrincipalName> getDefaultNamesForPrincipalIds(List<String> principalIds)
Specified by:
getDefaultNamesForPrincipalIds in interface LdapPrincipalDao

getDefaultNamesForEntityIds

public Map<String,EntityNamePrincipalName> getDefaultNamesForEntityIds(List<String> entityIds)
Specified by:
getDefaultNamesForEntityIds in interface LdapPrincipalDao

getKimAttributeMatcher

protected Matcher getKimAttributeMatcher(String kimAttribute)

isMapped

protected boolean isMapped(String kimAttribute)

getLdapAttribute

protected String getLdapAttribute(String kimAttribute)

getLdapValue

protected Object getLdapValue(String kimAttribute)

setKimConstants

public void setKimConstants(Constants constants)

getKimConstants

public Constants getKimConstants()
Specified by:
getKimConstants in interface LdapPrincipalDao

getParameterService

public ParameterService getParameterService()

setParameterService

public void setParameterService(ParameterService service)

getLdapTemplate

public org.springframework.ldap.core.LdapTemplate getLdapTemplate()
Specified by:
getLdapTemplate in interface LdapPrincipalDao

setLdapTemplate

public void setLdapTemplate(org.springframework.ldap.core.LdapTemplate template)
Specified by:
setLdapTemplate in interface LdapPrincipalDao

getContextMappers

public Map<String,org.springframework.ldap.core.ContextMapper> getContextMappers()
Specified by:
getContextMappers in interface LdapPrincipalDao

setContextMappers

public void setContextMappers(Map<String,org.springframework.ldap.core.ContextMapper> contextMappers)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.