Package org.ldaptive.handler
Class DnAttributeEntryHandler
- java.lang.Object
-
- org.ldaptive.transport.MessageFunctional<Q,S>
-
- org.ldaptive.transport.MessageFunctional.Function<SearchRequest,SearchResponse,T,T>
-
- org.ldaptive.handler.AbstractEntryHandler<LdapEntry>
-
- org.ldaptive.handler.DnAttributeEntryHandler
-
- All Implemented Interfaces:
java.util.function.Function<LdapEntry,LdapEntry>,LdapEntryHandler
public class DnAttributeEntryHandler extends AbstractEntryHandler<LdapEntry> implements LdapEntryHandler
Adds the entry DN as an attribute to the result set. Provides a client side implementation of RFC 5020.- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class org.ldaptive.handler.AbstractEntryHandler
logger
-
-
Constructor Summary
Constructors Constructor Description DnAttributeEntryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LdapEntryapply(LdapEntry entry)booleanequals(java.lang.Object o)java.lang.StringgetDnAttributeName()Returns the DN attribute name.protected voidhandleAttributes(LdapEntry entry)Handle the attributes of a search entry.inthashCode()booleanisAddIfExists()Returns whether to add the entryDN if an attribute of the same name exists.voidsetAddIfExists(boolean b)Sets whether to add the entryDN if an attribute of the same name exists.voidsetDnAttributeName(java.lang.String name)Sets the DN attribute name.java.lang.StringtoString()-
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
-
-
-
-
Method Detail
-
getDnAttributeName
public java.lang.String getDnAttributeName()
Returns the DN attribute name.- Returns:
- DN attribute name
-
setDnAttributeName
public void setDnAttributeName(java.lang.String name)
Sets the DN attribute name.- Parameters:
name- of the DN attribute
-
isAddIfExists
public boolean isAddIfExists()
Returns whether to add the entryDN if an attribute of the same name exists.- Returns:
- whether to add the entryDN if an attribute of the same name exists
-
setAddIfExists
public void setAddIfExists(boolean b)
Sets whether to add the entryDN if an attribute of the same name exists.- Parameters:
b- whether to add the entryDN if an attribute of the same name exists
-
handleAttributes
protected void handleAttributes(LdapEntry entry)
Description copied from class:AbstractEntryHandlerHandle the attributes of a search entry.- Overrides:
handleAttributesin classAbstractEntryHandler<LdapEntry>- Parameters:
entry- search entry to extract the attributes from
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAbstractEntryHandler<LdapEntry>
-
hashCode
public int hashCode()
- Specified by:
hashCodein classAbstractEntryHandler<LdapEntry>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-