public class RecursiveEntryHandler extends AbstractSearchEntryHandler
dn: uugid=group1,ou=groups,dc=ldaptive,dc=org uugid: group1 member: uugid=group2,ou=groups,dc=ldaptive,dc=org dn: uugid=group2,ou=groups,dc=ldaptive,dc=org uugid: group2
With the following code:
RecursiveEntryHandler reh = new RecursiveEntryHandler("member", "uugid");
Will produce this result for the query (uugid=group1):
dn: uugid=group1,ou=groups,dc=ldaptive,dc=org uugid: group1 uugid: group2 member: uugid=group2,ou=groups,dc=ldaptive,dc=org
logger
Constructor and Description |
---|
RecursiveEntryHandler()
Default constructor.
|
RecursiveEntryHandler(String searchAttr,
String... mergeAttrs)
Creates a new recursive entry handler.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getMergeAttributes()
Returns the attribute names that will be merged by the recursive search.
|
String |
getSearchAttribute()
Returns the attribute name that will be recursively searched on.
|
HandlerResult<SearchEntry> |
handle(Connection conn,
SearchRequest request,
SearchEntry entry)
Handle the supplied result.
|
int |
hashCode() |
protected void |
initalizeReturnAttributes()
Initializes the return attributes array.
|
void |
setMergeAttributes(String... mergeAttrs)
Sets the attribute name that will be merged by the recursive search.
|
void |
setSearchAttribute(String name)
Sets the attribute name that will be recursively searched on.
|
String |
toString() |
equals, handleAttribute, handleAttributeName, handleAttributes, handleAttributeValue, handleAttributeValue, handleDn, initializeRequest
public String getSearchAttribute()
public void setSearchAttribute(String name)
name
- of the search attributepublic String[] getMergeAttributes()
public void setMergeAttributes(String... mergeAttrs)
mergeAttrs
- attribute names to mergeprotected void initalizeReturnAttributes()
public HandlerResult<SearchEntry> handle(Connection conn, SearchRequest request, SearchEntry entry) throws LdapException
Handler
handle
in interface Handler<SearchRequest,SearchEntry>
handle
in interface SearchEntryHandler
handle
in class AbstractSearchEntryHandler
conn
- connection the operation was executed onrequest
- executed by the operationentry
- produced from the operationLdapException
- if handling failspublic int hashCode()
hashCode
in class AbstractSearchEntryHandler
Copyright © 2022. All rights reserved.