mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
20.58.2012 1e74b0f8f046cc9e69ba9eddbc180bf10ab83e06
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/controls/PreReadRequestControl.java
@@ -55,6 +55,25 @@
 * client to read the target entry of an update operation immediately before the
 * modifications are applied. These reads are done as an atomic part of the
 * update operation.
 * <p>
 * The following example gets the entry as it was before the modify operation.
 *
 * <pre>
 * Connection connection = ...;
 * String DN = ...;
 *
 * ModifyRequest request =
 *         Requests.newModifyRequest(DN)
 *         .addControl(PreReadRequestControl.newControl(true, "mail"))
 *         .addModification(ModificationType.REPLACE,
 *                 "mail", "modified@example.com");
 *
 * Result result = connection.modify(request);
 * PreReadResponseControl control =
 *             result.getControl(PreReadResponseControl.DECODER,
 *                     new DecodeOptions());
 * Entry unmodifiedEntry = control.getEntry();
 * </pre>
 *
 * @see PreReadResponseControl
 * @see <a href="http://tools.ietf.org/html/rfc4527">RFC 4527 - Lightweight