Package org.ldaptive.handler
Class DnAttributeEntryHandler
java.lang.Object
- All Implemented Interfaces:
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.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether to add the entry dn if an attribute of the same name exists.private StringAttribute name for the entry dn.private static final inthash code seed.Fields inherited from class org.ldaptive.handler.AbstractEntryHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the DN attribute name.protected voidhandleAttributes(LdapEntry entry) Handle the attributes of a search entry.inthashCode()booleanReturns 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(String name) Sets the DN attribute name.toString()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:
-
dnAttributeName
Attribute name for the entry dn. -
addIfExists
private boolean addIfExistsWhether to add the entry dn if an attribute of the same name exists.
-
-
Constructor Details
-
DnAttributeEntryHandler
public DnAttributeEntryHandler()
-
-
Method Details
-
getDnAttributeName
Returns the DN attribute name.- Returns:
- DN attribute name
-
setDnAttributeName
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
-
apply
-
handleAttributes
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
- Overrides:
equalsin classAbstractEntryHandler<LdapEntry>
-
hashCode
public int hashCode()- Specified by:
hashCodein classAbstractEntryHandler<LdapEntry>
-
toString
-