public class SearchResultEntryDecorator extends MessageDecorator<SearchResultEntry> implements SearchResultEntry
messageLength
Constructor and Description |
---|
SearchResultEntryDecorator(LdapApiService codec,
SearchResultEntry decoratedMessage)
Makes a SearchResultEntry encodable.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(byte[] type)
Create a new attribute
|
void |
addAttribute(String type)
Create a new attribute
|
void |
addAttributeValue(Object value)
Add a new value to the current attribute
|
int |
computeLength()
Compute the SearchResultEntry length
SearchResultEntry :
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SearchResultEntry message to a PDU.
|
List<Integer> |
getAttributeLength() |
int |
getAttributesLength() |
Attribute |
getCurrentAttribute() |
Entry |
getEntry()
Gets the entry.
|
Dn |
getObjectName()
Gets the distinguished name of the entry object returned.
|
byte[] |
getObjectNameBytes()
Gets the distinguished name bytes of the entry object returned.
|
int |
getSearchResultEntryLength() |
List<Integer> |
getValsLength() |
void |
setAttributeLength(List<Integer> attributeLength) |
void |
setAttributesLength(int attributesLength)
Stores the encoded length for the Attributes
|
void |
setEntry(Entry entry)
Sets an entry
|
void |
setObjectName(Dn objectName)
Sets the distinguished name of the entry object returned.
|
void |
setObjectNameBytes(byte[] objectNameBytes)
Sets the distinguished name bytes of the entry object returned.
|
void |
setSearchResultEntryLength(int searchResultEntryLength)
Stores the encoded length for the SearchResultEntry
|
void |
setValsLength(List<Integer> valsLength)
Stores the list of encoded length for the values
|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
public SearchResultEntryDecorator(LdapApiService codec, SearchResultEntry decoratedMessage)
decoratedMessage
- the decorated SearchResultEntrypublic byte[] getObjectNameBytes()
public void setObjectNameBytes(byte[] objectNameBytes)
objectNameBytes
- the Dn bytes of the entry returned.public int getSearchResultEntryLength()
public void setSearchResultEntryLength(int searchResultEntryLength)
searchResultEntryLength
- The encoded lengthpublic int getAttributesLength()
public void setAttributesLength(int attributesLength)
attributesLength
- The list of encoded lengthspublic List<Integer> getAttributeLength()
public void setAttributeLength(List<Integer> attributeLength)
public List<Integer> getValsLength()
public void setValsLength(List<Integer> valsLength)
valsLength
- The list of encoded lengthspublic Attribute getCurrentAttribute()
public void addAttribute(String type) throws LdapException
type
- The attribute's typeLdapException
public void addAttribute(byte[] type) throws LdapException
type
- The attribute's typeLdapException
public void addAttributeValue(Object value) throws LdapException
value
- The added valueLdapException
public Dn getObjectName()
getObjectName
in interface SearchResultEntry
public void setObjectName(Dn objectName)
setObjectName
in interface SearchResultEntry
objectName
- the Dn of the entry returned.public Entry getEntry()
getEntry
in interface SearchResultEntry
public void setEntry(Entry entry)
setEntry
in interface SearchResultEntry
entry
- the entrypublic int computeLength()
0x64 L1 | +--> 0x04 L2 objectName +--> 0x30 L3 (attributes) | +--> 0x30 L4-1 (partial attributes list) | | | +--> 0x04 L5-1 type | +--> 0x31 L6-1 (values) | | | +--> 0x04 L7-1-1 value | +--> ... | +--> 0x04 L7-1-n value | +--> 0x30 L4-2 (partial attributes list) | | | +--> 0x04 L5-2 type | +--> 0x31 L6-2 (values) | | | +--> 0x04 L7-2-1 value | +--> ... | +--> 0x04 L7-2-n value | +--> ... | +--> 0x30 L4-m (partial attributes list) | +--> 0x04 L5-m type +--> 0x31 L6-m (values) | +--> 0x04 L7-m-1 value +--> ... +--> 0x04 L7-m-n value
computeLength
in interface Asn1Object
computeLength
in interface Decorator<SearchResultEntry>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0x64 LL 0x04 LL objectName 0x30 LL attributes 0x30 LL partialAttributeList 0x04 LL type 0x31 LL vals 0x04 LL attributeValue ... 0x04 LL attributeValue ... 0x30 LL partialAttributeList 0x04 LL type 0x31 LL vals 0x04 LL attributeValue ... 0x04 LL attributeValue
encode
in interface Asn1Object
encode
in interface Decorator<SearchResultEntry>
buffer
- The buffer where to put the PDUsearchResultEntryDecorator
- the SearchResultEntry decoratorEncoderException
- if the buffer can't be encodedCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.