Package org.opends.server.protocols.ldap
Class SearchResultEntryProtocolOp
- java.lang.Object
-
- org.opends.server.protocols.ldap.ProtocolOp
-
- org.opends.server.protocols.ldap.SearchResultEntryProtocolOp
-
public class SearchResultEntryProtocolOp extends ProtocolOp
This class defines the structures and methods for an LDAP search result entry protocol op, which is used to return entries that match the associated search criteria.
-
-
Constructor Summary
Constructors Constructor Description SearchResultEntryProtocolOp(DN dn)Creates a new LDAP search result entry protocol op with the specified DN and no attributes.SearchResultEntryProtocolOp(DN dn, LinkedList<LDAPAttribute> attributes)Creates a new LDAP search result entry protocol op with the specified DN and set of attributes.SearchResultEntryProtocolOp(SearchResultEntry searchEntry)Creates a new search result entry protocol op from the provided search result entry.SearchResultEntryProtocolOp(SearchResultEntry searchEntry, int ldapVersion)Creates a new search result entry protocol op from the provided search result entry and ldap protocol version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkedList<LDAPAttribute>getAttributes()Retrieves the set of attributes for this search result entry.DNgetDN()Retrieves the DN for this search result entry.StringgetProtocolOpName()Retrieves the name for this protocol op type.bytegetType()Retrieves the BER type for this protocol op.voidtoLDIF(StringBuilder buffer, int wrapColumn)Appends an LDIF representation of the entry to the provided buffer.SearchResultEntrytoSearchResultEntry()Converts this protocol op to a search result entry.voidtoString(StringBuilder buffer)Appends a string representation of this LDAP protocol op to the provided buffer.voidtoString(StringBuilder buffer, int indent)Appends a multi-line string representation of this LDAP protocol op to the provided buffer.voidwrite(ASN1Writer stream)Writes this protocol op to an ASN.1 output stream.-
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
toString
-
-
-
-
Constructor Detail
-
SearchResultEntryProtocolOp
public SearchResultEntryProtocolOp(DN dn)
Creates a new LDAP search result entry protocol op with the specified DN and no attributes.- Parameters:
dn- The DN for this search result entry.
-
SearchResultEntryProtocolOp
public SearchResultEntryProtocolOp(DN dn, LinkedList<LDAPAttribute> attributes)
Creates a new LDAP search result entry protocol op with the specified DN and set of attributes.- Parameters:
dn- The DN for this search result entry.attributes- The set of attributes for this search result entry.
-
SearchResultEntryProtocolOp
public SearchResultEntryProtocolOp(SearchResultEntry searchEntry)
Creates a new search result entry protocol op from the provided search result entry.- Parameters:
searchEntry- The search result entry object to use to create this search result entry protocol op.
-
SearchResultEntryProtocolOp
public SearchResultEntryProtocolOp(SearchResultEntry searchEntry, int ldapVersion)
Creates a new search result entry protocol op from the provided search result entry and ldap protocol version.- Parameters:
searchEntry- The search result entry object to use to create this search result entry protocol op.ldapVersion- The version of the LDAP protocol.
-
-
Method Detail
-
getDN
public DN getDN()
Retrieves the DN for this search result entry.- Returns:
- The DN for this search result entry.
-
getAttributes
public LinkedList<LDAPAttribute> getAttributes()
Retrieves the set of attributes for this search result entry. The returned list may be altered by the caller.- Returns:
- The set of attributes for this search result entry.
-
getType
public byte getType()
Retrieves the BER type for this protocol op.- Specified by:
getTypein classProtocolOp- Returns:
- The BER type for this protocol op.
-
getProtocolOpName
public String getProtocolOpName()
Retrieves the name for this protocol op type.- Specified by:
getProtocolOpNamein classProtocolOp- Returns:
- The name for this protocol op type.
-
write
public void write(ASN1Writer stream) throws IOException
Writes this protocol op to an ASN.1 output stream.- Specified by:
writein classProtocolOp- Parameters:
stream- The ASN.1 output stream to write to.- Throws:
IOException- If a problem occurs while writing to the stream.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the string should be appended.
-
toString
public void toString(StringBuilder buffer, int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the information should be appended.indent- The number of spaces from the margin that the lines should be indented.
-
toLDIF
public void toLDIF(StringBuilder buffer, int wrapColumn)
Appends an LDIF representation of the entry to the provided buffer.- Parameters:
buffer- The buffer to which the entry should be appended.wrapColumn- The column at which long lines should be wrapped.
-
toSearchResultEntry
public SearchResultEntry toSearchResultEntry() throws LDAPException
Converts this protocol op to a search result entry.- Returns:
- The search result entry created from this protocol op.
- Throws:
LDAPException- If a problem occurs while trying to create the search result entry.
-
-