org.opends.server.protocols.ldap
Class CompareRequestProtocolOp

java.lang.Object
  extended by org.opends.server.protocols.ldap.ProtocolOp
      extended by org.opends.server.protocols.ldap.CompareRequestProtocolOp

public class CompareRequestProtocolOp
extends ProtocolOp

This class defines the structures and methods for an LDAP compare request protocol op, which is used to determine whether a particular entry contains a specified attribute value.


Constructor Summary
CompareRequestProtocolOp(ASN1OctetString dn, java.lang.String attributeType, ASN1OctetString assertionValue)
          Creates a new compare request protocol op with the provided information.
 
Method Summary
static CompareRequestProtocolOp decodeCompareRequest(ASN1Element element)
          Decodes the provided ASN.1 element as an LDAP compare request protocol op.
 ASN1Element encode()
          Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.
 ASN1OctetString getAssertionValue()
          Retrieves the assertion value for this compare request.
 java.lang.String getAttributeType()
          Retrieves the attribute type for this compare request.
 ASN1OctetString getDN()
          Retrieves the DN for this compare request.
 java.lang.String getProtocolOpName()
          Retrieves the name for this protocol op type.
 byte getType()
          Retrieves the BER type for this protocol op.
 void setAssertionValue(ASN1OctetString assertionValue)
          Specifies the assertion value for this compare request.
 void setAttributeType(java.lang.String attributeType)
          Specifies the attribute type for this compare request.
 void setDN(ASN1OctetString dn)
          Specifies the DN for this compare request.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this LDAP protocol op to the provided buffer.
 void toString(java.lang.StringBuilder buffer, int indent)
          Appends a multi-line string representation of this LDAP protocol op to the provided buffer.
 
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
decode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompareRequestProtocolOp

public CompareRequestProtocolOp(ASN1OctetString dn,
                                java.lang.String attributeType,
                                ASN1OctetString assertionValue)
Creates a new compare request protocol op with the provided information.

Parameters:
dn - The DN for this compare request.
attributeType - The attribute type for this compare request.
assertionValue - The assertion value for this compare request.
Method Detail

getDN

public ASN1OctetString getDN()
Retrieves the DN for this compare request.

Returns:
The DN for this compare request.

setDN

public void setDN(ASN1OctetString dn)
Specifies the DN for this compare request.

Parameters:
dn - The DN for this compare request.

getAttributeType

public java.lang.String getAttributeType()
Retrieves the attribute type for this compare request.

Returns:
The attribute type for this compare request.

setAttributeType

public void setAttributeType(java.lang.String attributeType)
Specifies the attribute type for this compare request.

Parameters:
attributeType - The attribute type for this compare request.

getAssertionValue

public ASN1OctetString getAssertionValue()
Retrieves the assertion value for this compare request.

Returns:
The assertion value for this compare request.

setAssertionValue

public void setAssertionValue(ASN1OctetString assertionValue)
Specifies the assertion value for this compare request.

Parameters:
assertionValue - The assertion value for this compare request.

getType

public byte getType()
Retrieves the BER type for this protocol op.

Specified by:
getType in class ProtocolOp
Returns:
The BER type for this protocol op.

getProtocolOpName

public java.lang.String getProtocolOpName()
Retrieves the name for this protocol op type.

Specified by:
getProtocolOpName in class ProtocolOp
Returns:
The name for this protocol op type.

encode

public ASN1Element encode()
Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.

Specified by:
encode in class ProtocolOp
Returns:
The ASN.1 element containing the encoded protocol op.

decodeCompareRequest

public static CompareRequestProtocolOp decodeCompareRequest(ASN1Element element)
                                                     throws LDAPException
Decodes the provided ASN.1 element as an LDAP compare request protocol op.

Parameters:
element - The ASN.1 element to decode.
Returns:
The decoded LDAP compare request protocol op.
Throws:
LDAPException - If a problem occurs while attempting to decode the ASN.1 element as a compare request protocol op.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
Parameters:
buffer - The buffer to which the string should be appended.

toString

public void toString(java.lang.StringBuilder buffer,
                     int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
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.