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, CrowdLdapName 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:
-
Constructor Summary
ConstructorsConstructorDescriptionIncrementalAttributeMapper(String attributeName, AttributeValueProcessor valueProcessor) IncrementalAttributeMapper(String attributeName, AttributeValueProcessor valueProcessor, RangeOption requestRange) -
Method Summary
Modifier and TypeMethodDescriptionString[]booleanhasMore()mapFromAttributes(Attributes attributes)
-
Constructor Details
-
IncrementalAttributeMapper
-
IncrementalAttributeMapper
public IncrementalAttributeMapper(String attributeName, AttributeValueProcessor valueProcessor, RangeOption requestRange)
-
-
Method Details
-
mapFromAttributes
- Specified by:
mapFromAttributesin interfaceorg.springframework.ldap.core.AttributesMapper- Throws:
NamingException
-
hasMore
public boolean hasMore() -
getAttributesArray
-