Package org.ldaptive.ad.handler
Class RangeEntryHandler
java.lang.Object
- All Implemented Interfaces:
Function<SearchResponse,,SearchResponse> SearchResultHandler
public class RangeEntryHandler
extends AbstractEntryHandler<SearchResponse>
implements SearchResultHandler
Rewrites attributes returned from Active Directory to include all values by performing additional searches. This
behavior is based on the expired RFC "Incremental Retrieval of Multi-valued Properties"
http://www.ietf.org/proceedings/53/I-D/draft-kashi-incremental-00.txt.
For example, when the membership of a group exceeds 1500, requests for the member attribute will likely return an attribute with name "member;Range=0-1499" and 1500 values. For a group with just over 3000 members, subsequent searches will request "member;Range=1500-2999" and then "member;Range=3000-4499". When the returned attribute is of the form "member;Range=3000-*", all values have been retrieved.
This handler should only be used with theSearchOperation.execute() method since it leverages
the connection to make further searches.-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe character indicating that the end of the range has been reached.private static final inthash code seed.private static final StringThe format used to calculate attribute IDs for subsequent searches.private static final PatternThe pattern matching the range attribute ID.private static final StringThe expression matching the range attribute ID "<id>range=<X>-<Y>".Fields inherited from class org.ldaptive.handler.AbstractEntryHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(SearchResponse response) booleanprotected voidhandleAttributes(LdapEntry entry) Handle the attributes of a search entry.inthashCode()Methods inherited from class org.ldaptive.handler.AbstractEntryHandler
handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, handleEntryMethods inherited from class org.ldaptive.transport.MessageFunctional
getConnection, getHandle, getRequest, setConnection, setHandle, setRequest
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
END_OF_RANGE
The character indicating that the end of the range has been reached.- See Also:
-
RANGE_FORMAT
The format used to calculate attribute IDs for subsequent searches.- See Also:
-
RANGE_PATTERN_STRING
The expression matching the range attribute ID "<id>range=<X>-<Y>".- See Also:
-
RANGE_PATTERN
The pattern matching the range attribute ID.
-
-
Constructor Details
-
RangeEntryHandler
public RangeEntryHandler()
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<SearchResponse,SearchResponse>
-
handleAttributes
Description copied from class:AbstractEntryHandlerHandle the attributes of a search entry.- Overrides:
handleAttributesin classAbstractEntryHandler<SearchResponse>- Parameters:
entry- search entry to extract the attributes from
-
equals
- Overrides:
equalsin classAbstractEntryHandler<SearchResponse>
-
hashCode
public int hashCode()- Specified by:
hashCodein classAbstractEntryHandler<SearchResponse>
-