|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.codec.decorators.MessageDecorator<SearchResultEntry>
org.apache.directory.shared.ldap.codec.decorators.SearchResultEntryDecorator
public class SearchResultEntryDecorator
A decorator for the SearchResultEntry message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.SearchResultEntry |
|---|
TYPE |
| Constructor Summary | |
|---|---|
SearchResultEntryDecorator(LdapCodecService codec,
SearchResultEntry decoratedMessage)
Makes a SearchResultEntry encodable. |
|
| Method Summary | |
|---|---|
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()
|
EntryAttribute |
getCurrentAttribute()
|
Entry |
getEntry()
|
Dn |
getObjectName()
|
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)
|
void |
setObjectName(Dn objectName)
|
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 |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message |
|---|
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId |
| Constructor Detail |
|---|
public SearchResultEntryDecorator(LdapCodecService codec,
SearchResultEntry decoratedMessage)
decoratedMessage - the decorated SearchResultEntry| Method Detail |
|---|
public 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 EntryAttribute getCurrentAttribute()
public void addAttribute(String type)
throws LdapException
type - The attribute's type
LdapExceptionpublic void addAttributeValue(Object value)
value - The added valuepublic Dn getObjectName()
getObjectName in interface SearchResultEntrypublic void setObjectName(Dn objectName)
setObjectName in interface SearchResultEntrypublic Entry getEntry()
getEntry in interface SearchResultEntrypublic void setEntry(Entry entry)
setEntry in interface SearchResultEntrypublic 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 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 Decorator<SearchResultEntry>buffer - The buffer where to put the PDUsearchResultEntryDecorator - the SearchResultEntry decorator
EncoderException - if the buffer can't be encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||