com.atlassian.crowd.directory.ldap
Class LdapTemplateWithClassLoaderWrapper

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper

public class LdapTemplateWithClassLoaderWrapper
extends Object

Wrap an LdapTemplate and perform all operations with the context ClassLoader set to this class's ClassLoader. com.sun.naming.internal.NamingManager uses the context ClassLoader so, without this wrapper, calls that originate from plugins and end up using LDAP will fail when they can't see the Spring LDAP implementation classes.


Constructor Summary
LdapTemplateWithClassLoaderWrapper(org.springframework.ldap.core.LdapTemplate template)
           
 
Method Summary
 void bind(Name dn, Object obj, Attributes attributes)
           
<T> T
lookup(LdapName dn, ContextMapperWithRequiredAttributes<T> mapper)
           
 void lookup(LdapName dn, String[] attributes, org.springframework.ldap.core.AttributesMapper mapper)
           
 Object lookup(Name dn)
           
 void modifyAttributes(Name dn, ModificationItem[] mods)
           
 List search(Name base, String filter, SearchControls controls, org.springframework.ldap.core.ContextMapper mapper)
           
 List search(Name base, String filter, SearchControls controls, org.springframework.ldap.core.ContextMapper mapper, org.springframework.ldap.core.DirContextProcessor processor)
           
 void search(Name base, String filter, SearchControls controls, org.springframework.ldap.core.NameClassPairCallbackHandler handler, org.springframework.ldap.core.DirContextProcessor processor)
           
 void search(org.springframework.ldap.core.SearchExecutor se, org.springframework.ldap.core.NameClassPairCallbackHandler handler, org.springframework.ldap.core.DirContextProcessor processor)
           
 List searchWithLimitedResults(Name baseDN, String filter, SearchControls searchControls, org.springframework.ldap.core.ContextMapper contextMapper, org.springframework.ldap.core.DirContextProcessor processor, int limit)
           
 void setIgnorePartialResultException(boolean ignore)
           
 void unbind(Name dn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapTemplateWithClassLoaderWrapper

public LdapTemplateWithClassLoaderWrapper(org.springframework.ldap.core.LdapTemplate template)
Method Detail

search

public List search(Name base,
                   String filter,
                   SearchControls controls,
                   org.springframework.ldap.core.ContextMapper mapper)

search

public List search(Name base,
                   String filter,
                   SearchControls controls,
                   org.springframework.ldap.core.ContextMapper mapper,
                   org.springframework.ldap.core.DirContextProcessor processor)

lookup

public Object lookup(Name dn)

search

public void search(Name base,
                   String filter,
                   SearchControls controls,
                   org.springframework.ldap.core.NameClassPairCallbackHandler handler,
                   org.springframework.ldap.core.DirContextProcessor processor)

unbind

public void unbind(Name dn)

bind

public void bind(Name dn,
                 Object obj,
                 Attributes attributes)

modifyAttributes

public void modifyAttributes(Name dn,
                             ModificationItem[] mods)

lookup

public void lookup(LdapName dn,
                   String[] attributes,
                   org.springframework.ldap.core.AttributesMapper mapper)

lookup

public <T> T lookup(LdapName dn,
                    ContextMapperWithRequiredAttributes<T> mapper)

setIgnorePartialResultException

public void setIgnorePartialResultException(boolean ignore)

search

public void search(org.springframework.ldap.core.SearchExecutor se,
                   org.springframework.ldap.core.NameClassPairCallbackHandler handler,
                   org.springframework.ldap.core.DirContextProcessor processor)

searchWithLimitedResults

public List searchWithLimitedResults(Name baseDN,
                                     String filter,
                                     SearchControls searchControls,
                                     org.springframework.ldap.core.ContextMapper contextMapper,
                                     org.springframework.ldap.core.DirContextProcessor processor,
                                     int limit)


Copyright © 2013 Atlassian. All Rights Reserved.