com.atlassian.crowd.directory.ldap.util
Class IncrementalAttributeMapper
java.lang.Object
com.atlassian.crowd.directory.ldap.util.IncrementalAttributeMapper
- All Implemented Interfaces:
- org.springframework.ldap.core.AttributesMapper
public class IncrementalAttributeMapper
- extends Object
- implements org.springframework.ldap.core.AttributesMapper
Code based on: http://jira.springframework.org/browse/LDAP-176
To fix: http://jira.atlassian.com/browse/CWD-1445
Utility class that helps with reading all attribute values from Active Directory using Incremental Retrieval of
Multi-valued Properties.
Example usage of this attribute mapper:
public void retrieveAttributeIncrementally(LdapTemplate ldap, LdapName entrDn, String attributeName, AttributeValueProcessor valueProcessor)
{
IncrementalAttributeMapper incrementalAttributeMapper = new IncrementalAttributeMapper(attributeName, valueProcessor);
while (incrementalAttributeMapper.hasMore())
{
ldap.lookup(entrDn, incrementalAttributeMapper.getAttributesArray(), incrementalAttributeMapper);
}
}
- Author:
- Marius Scurtescu
- See Also:
- Incremental Retrieval of Multi-valued Properties
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IncrementalAttributeMapper
public IncrementalAttributeMapper(String attributeName,
AttributeValueProcessor valueProcessor)
IncrementalAttributeMapper
public IncrementalAttributeMapper(String attributeName,
AttributeValueProcessor valueProcessor,
RangeOption requestRange)
mapFromAttributes
public Object mapFromAttributes(Attributes attributes)
throws NamingException
- Specified by:
mapFromAttributes
in interface org.springframework.ldap.core.AttributesMapper
- Throws:
NamingException
hasMore
public boolean hasMore()
getAttributesArray
public String[] getAttributesArray()
Copyright © 2013 Atlassian. All Rights Reserved.