From 29e4318f91939a35e9ae42a2be6a4d66a24fa925 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 16 Jul 2013 10:56:34 +0000
Subject: [PATCH] CR-2004 Fix for OPENDJ-1028: There are 3 ways of constructing ModifyRequests
---
opendj3/src/main/docbkx/dev-guide/chap-writing.xml | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/opendj3/src/main/docbkx/dev-guide/chap-writing.xml b/opendj3/src/main/docbkx/dev-guide/chap-writing.xml
index c1af02d..91ba451 100644
--- a/opendj3/src/main/docbkx/dev-guide/chap-writing.xml
+++ b/opendj3/src/main/docbkx/dev-guide/chap-writing.xml
@@ -176,10 +176,11 @@
<para>The <literal>Connection.modify()</literal> methods let you add, replace,
and delete attributes values on an entry. Either the modifications are
expressed in LDIF, or you build a <literal>ModifyRequest</literal> to
- express the changes.</para>
-
- <para>The following excerpt demonstrates how to replace one attribute value
- and to add another.</para>
+ express the changes. To build a <literal>ModifyRequest</literal>, you can
+ either specify individual changes, or derive the modifications from the
+ differences between the original entry and a modified copy, as in the
+ following excerpt. This is not always a particularly efficient method, but
+ it can be easy to use in some cases.</para>
<programlisting language="java"
>final LDAPConnectionFactory factory = new LDAPConnectionFactory(host, port);
@@ -206,6 +207,16 @@
connection.close();
}
}</programlisting>
+
+ <para>Especially when working with large entries, a more efficient choice is
+ to construct a <literal>ModifyRequest</literal> without copying the entire
+ entry, but instead by specifying individual changes. See a demonstration
+ of this technique in <xref linkend="updating-static-groups" />.</para>
+
+ <para>If the modifications are easier to construct in LDIF, you can write the
+ LDIF to the directory server as shown in the chapter, <link xlink:show="new"
+ xlink:href="dev-guide#chap-ldif" xlink:role="http://docbook.org/xlink/role/olink"
+ ><citetitle>Working With LDIF</citetitle></link>.</para>
</section>
<section xml:id="renaming-entries">
--
Gitblit v1.10.0