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 java.lang.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(java.lang.String attributeName,
AttributeValueProcessor valueProcessor)
IncrementalAttributeMapper
public IncrementalAttributeMapper(java.lang.String attributeName,
AttributeValueProcessor valueProcessor,
RangeOption requestRange)
isOmitFullRange
public boolean isOmitFullRange()
setOmitFullRange
public void setOmitFullRange(boolean omitFullRange)
mapFromAttributes
public java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attributes)
throws javax.naming.NamingException
- Specified by:
mapFromAttributes in interface org.springframework.ldap.core.AttributesMapper
- Throws:
javax.naming.NamingException
hasMore
public boolean hasMore()
getAttributesArray
public java.lang.String[] getAttributesArray()
Copyright © 2012 Atlassian. All Rights Reserved.