|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.Asn1Object
org.apache.directory.shared.ldap.codec.LdapMessage
org.apache.directory.shared.ldap.codec.search.SearchResultEntry
public class SearchResultEntry
A SearchResultEntry Message. Its syntax is : SearchResultEntry ::= [APPLICATION 4] SEQUENCE { objectName LDAPDN, attributes PartialAttributeList } PartialAttributeList ::= SEQUENCE OF SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } AttributeDescription ::= LDAPString AttributeValue ::= OCTET STRING It contains an entry, with all its attributes, and all the attributes values. If a search request is submited, all the results are sent one by one, followed by a searchResultDone message.
Field Summary |
---|
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object |
---|
parent |
Constructor Summary | |
---|---|
SearchResultEntry()
Creates a new SearchResultEntry object. |
Method Summary | |
---|---|
void |
addAttributeValue(Object value)
Add a new value to the current attribute |
void |
addAttributeValues(String type)
Create a new attributeValue |
int |
computeLength()
Compute the SearchResultEntry length SearchResultEntry : 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 | +--> ... |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SearchResultEntry message to a PDU. |
String |
getCurrentAttributeValueType()
|
int |
getMessageType()
Get the message type |
LdapDN |
getObjectName()
Get the entry DN |
Attributes |
getPartialAttributeList()
Get the entry's attributes |
void |
setObjectName(LdapDN objectName)
Set the entry DN |
void |
setPartialAttributeList(Attributes partialAttributeList)
Initialize the partial Attribute list. |
String |
toString()
Returns the Search Result Entry string |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessage |
---|
addControl, getAbandonRequest, getAddRequest, getAddResponse, getBindRequest, getBindResponse, getCompareRequest, getCompareResponse, getControls, getControls, getCurrentControl, getDelRequest, getDelResponse, getExtendedRequest, getExtendedResponse, getLdapResponse, getMessageId, getMessageTypeName, getModifyDNRequest, getModifyDNResponse, getModifyRequest, getModifyResponse, getSearchRequest, getSearchResultDone, getSearchResultEntry, getSearchResultReference, getUnBindRequest, initControls, setMessageId, setProtocolOP |
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object |
---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchResultEntry()
Method Detail |
---|
public int getMessageType()
getMessageType
in class LdapMessage
public LdapDN getObjectName()
public void setObjectName(LdapDN objectName)
objectName
- The objectName to set.public Attributes getPartialAttributeList()
public void setPartialAttributeList(Attributes partialAttributeList)
public void addAttributeValues(String type)
type
- The attribute's namepublic void addAttributeValue(Object value)
value
- public int computeLength()
computeLength
in class LdapMessage
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in class LdapMessage
buffer
- The buffer where to put the PDU
EncoderException
- If anything goes wrong.public String toString()
toString
in class LdapMessage
public String getCurrentAttributeValueType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |