Package org.ldaptive.ad.handler
Class ObjectGuidHandler
- java.lang.Object
-
- org.ldaptive.AbstractFreezable
-
- org.ldaptive.transport.MessageFunctional<Q,S>
-
- org.ldaptive.transport.MessageFunctional.Function<SearchRequest,SearchResponse,T,T>
-
- org.ldaptive.transport.AbstractMessageFunctionalEntryHandler<T>
-
- org.ldaptive.ad.handler.AbstractBinaryAttributeHandler<LdapEntry>
-
- org.ldaptive.ad.handler.ObjectGuidHandler
-
- All Implemented Interfaces:
Function<LdapEntry,LdapEntry>
,Freezable
,LdapEntryHandler
public class ObjectGuidHandler extends AbstractBinaryAttributeHandler<LdapEntry> implements LdapEntryHandler
Processes an objectGuid attribute by converting it from binary to its string form.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
ATTRIBUTE_NAME
objectGuid attribute name.private static int
HASH_CODE_SEED
hash code seed.-
Fields inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
logger
-
-
Constructor Summary
Constructors Constructor Description ObjectGuidHandler()
Creates a new object guid handler.ObjectGuidHandler(String attrName)
Creates a new object guid handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LdapEntry
apply(LdapEntry entry)
protected String
convertValue(byte[] value)
Converts the supplied binary value to its string form.boolean
equals(Object o)
int
hashCode()
ObjectGuidHandler
newInstance()
Create a new instance of this message functional.-
Methods inherited from class org.ldaptive.ad.handler.AbstractBinaryAttributeHandler
getAttributeName, handleAttributes, setAttributeName, setRequest
-
Methods inherited from class org.ldaptive.transport.AbstractMessageFunctionalEntryHandler
handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, handleEntry
-
Methods inherited from class org.ldaptive.transport.MessageFunctional
getConnection, getHandle, getRequest, setConnection, setHandle
-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME
private static final String ATTRIBUTE_NAME
objectGuid attribute name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectGuidHandler
public ObjectGuidHandler()
Creates a new object guid handler.
-
ObjectGuidHandler
public ObjectGuidHandler(String attrName)
Creates a new object guid handler.- Parameters:
attrName
- name of the attribute which is encoded as an objectGUID
-
-
Method Detail
-
convertValue
protected String convertValue(byte[] value)
Description copied from class:AbstractBinaryAttributeHandler
Converts the supplied binary value to its string form.- Specified by:
convertValue
in classAbstractBinaryAttributeHandler<LdapEntry>
- Parameters:
value
- to convert- Returns:
- string form of the value
-
newInstance
public ObjectGuidHandler newInstance()
Description copied from class:MessageFunctional
Create a new instance of this message functional.- Specified by:
newInstance
in classMessageFunctional<SearchRequest,SearchResponse>
- Returns:
- new instance of this message functional
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractBinaryAttributeHandler<LdapEntry>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractBinaryAttributeHandler<LdapEntry>
-
-