|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.handler.AbstractSearchEntryHandler
org.ldaptive.handler.RecursiveEntryHandler
public class RecursiveEntryHandler
This recursively searches based on a supplied attribute and merges those results into the original entry. For the following LDIF:
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
| Field Summary |
|---|
| Fields inherited from class org.ldaptive.handler.AbstractSearchEntryHandler |
|---|
logger |
| Constructor Summary | |
|---|---|
RecursiveEntryHandler()
Default constructor. |
|
RecursiveEntryHandler(String searchAttr,
String... mergeAttrs)
Creates a new recursive entry handler. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.ldaptive.handler.AbstractSearchEntryHandler |
|---|
equals, handleAttribute, handleAttributeName, handleAttributes, handleAttributeValue, handleAttributeValue, handleDn, initializeRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RecursiveEntryHandler()
public RecursiveEntryHandler(String searchAttr,
String... mergeAttrs)
searchAttr - attribute to search onmergeAttrs - attribute names to merge| Method Detail |
|---|
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
handle in interface Handler<SearchRequest,SearchEntry>handle in interface SearchEntryHandlerhandle in class AbstractSearchEntryHandlerconn - connection the operation was executed onrequest - executed by the operationentry - produced from the operation
LdapException - if handling failspublic int hashCode()
hashCode in class AbstractSearchEntryHandlerpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||