Package org.ldaptive.ad.handler
Class RangeEntryHandler
- 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 String
The character indicating that the end of the range has been reached.private static final int
hash code seed.private static final String
The format used to calculate attribute IDs for subsequent searches.private static final Pattern
The pattern matching the range attribute ID.private static final String
The 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) boolean
protected void
handleAttributes
(LdapEntry entry) Handle the attributes of a search entry.int
hashCode()
Methods inherited from class org.ldaptive.handler.AbstractEntryHandler
handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, handleEntry
Methods 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:
apply
in interfaceFunction<SearchResponse,
SearchResponse>
-
handleAttributes
Description copied from class:AbstractEntryHandler
Handle the attributes of a search entry.- Overrides:
handleAttributes
in classAbstractEntryHandler<SearchResponse>
- Parameters:
entry
- search entry to extract the attributes from
-
equals
- Overrides:
equals
in classAbstractEntryHandler<SearchResponse>
-
hashCode
public int hashCode()- Specified by:
hashCode
in classAbstractEntryHandler<SearchResponse>
-