org.opends.server.controls
Class LDAPPreReadResponseControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.LDAPPreReadResponseControl

public class LDAPPreReadResponseControl
extends Control

This class implements the pre-read response control as defined in RFC 4527. This control holds the search result entry representing the state of the entry immediately before a modify, delete, or modify DN operation.


Constructor Summary
LDAPPreReadResponseControl(SearchResultEntry searchEntry)
          Creates a new instance of this LDAP pre-read response control with the provided information.
LDAPPreReadResponseControl(java.lang.String oid, boolean isCritical, SearchResultEntry searchEntry)
          Creates a new instance of this LDAP pre-read response control with the provided information.
 
Method Summary
static LDAPPreReadResponseControl decodeControl(Control control)
          Creates a new LDAP pre-read response control from the contents of the provided control.
 SearchResultEntry getSearchEntry()
          Retrieves the search result entry associated with this pre-read response control.
 void setSearchEntry(SearchResultEntry searchEntry)
          Specifies the search result entry for use with this pre-read response control.
 java.lang.String toString()
          Retrieves a string representation of this LDAP pre-read response control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this LDAP pre-read response control to the provided buffer.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPPreReadResponseControl

public LDAPPreReadResponseControl(SearchResultEntry searchEntry)
Creates a new instance of this LDAP pre-read response control with the provided information.

Parameters:
searchEntry - The search result entry to include in the response control.

LDAPPreReadResponseControl

public LDAPPreReadResponseControl(java.lang.String oid,
                                  boolean isCritical,
                                  SearchResultEntry searchEntry)
Creates a new instance of this LDAP pre-read response control with the provided information.

Parameters:
oid - The OID to use for this control.
isCritical - Indicates whether support for this control should be considered a critical part of the server processing.
searchEntry - The search result entry to include in the response control.
Method Detail

decodeControl

public static LDAPPreReadResponseControl decodeControl(Control control)
                                                throws LDAPException
Creates a new LDAP pre-read response control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this LDAP pre-read response control.
Returns:
The LDAP pre-read response control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid LDAP pre-read response control.

getSearchEntry

public SearchResultEntry getSearchEntry()
Retrieves the search result entry associated with this pre-read response control.

Returns:
The search result entry associated with this pre-read response control.

setSearchEntry

public void setSearchEntry(SearchResultEntry searchEntry)
Specifies the search result entry for use with this pre-read response control.

Parameters:
searchEntry - The search result entry for use with this pre-read response control.

toString

public java.lang.String toString()
Retrieves a string representation of this LDAP pre-read response control.

Overrides:
toString in class Control
Returns:
A string representation of this LDAP pre-read response control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP pre-read response control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.