From a4a3bbbbce610191440f309ecd1d6c4f112c561b Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Mon, 03 Sep 2012 14:39:43 +0000
Subject: [PATCH] CR-646 Review comments from Violette on SDK documentation

---
 opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-controls.xml                                          |   23 ++++++++++-
 opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-using-the-sdk.xml                                     |    2 
 opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-getting-directory-info.xml                            |    2 
 opendj-sdk/opendj3/src/main/docbkx/dev-guide/index.xml                                                  |   11 +++++
 opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml                                                |    7 +++
 opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchBind.java |   11 +----
 opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-reading.xml                                           |   10 +---
 7 files changed, 46 insertions(+), 20 deletions(-)

diff --git a/opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchBind.java b/opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchBind.java
index d807dfa..4659f76 100644
--- a/opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchBind.java
+++ b/opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchBind.java
@@ -33,7 +33,6 @@
 import org.forgerock.opendj.ldap.ErrorResultException;
 import org.forgerock.opendj.ldap.LDAPConnectionFactory;
 import org.forgerock.opendj.ldap.SearchScope;
-import org.forgerock.opendj.ldap.responses.BindResult;
 import org.forgerock.opendj.ldap.responses.SearchResultEntry;
 
 /**
@@ -85,14 +84,10 @@
                     connection.searchSingleEntry(baseDN, SearchScope.WHOLE_SUBTREE, "(mail=" + mail
                             + ")", "cn");
             DN bindDN = entry.getName();
-            BindResult result = connection.bind(bindDN.toString(), password);
+            connection.bind(bindDN.toString(), password);
 
-            if (result.isSuccess()) {
-                String cn = entry.getAttribute("cn").firstValueAsString();
-                System.out.println("Hello, " + cn + "!");
-            } else {
-                System.err.println("Failed to bind.");
-            }
+            String cn = entry.getAttribute("cn").firstValueAsString();
+            System.out.println("Hello, " + cn + "!");
         } catch (final ErrorResultException e) {
             System.err.println("Failed to bind.");
             System.exit(e.getResult().getResultCode().intValue());
diff --git a/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml b/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml
index e025859..894508b 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml
@@ -88,6 +88,13 @@
 
  <reference xml:id="admin-tools-ref">
   <title>Tools Reference</title>
+
+  <partintro>
+   <para>You can find the tools under the <filename>bin/</filename> or
+   <filename>bat\</filename> folder where you installed OpenDJ directory
+   server. For example, <filename>/path/to/OpenDJ/bin</filename>.</para>
+  </partintro>
+
    <xinclude:include href='../shared/man-backup.xml' />
    <xinclude:include href='../shared/man-base64.xml' />
    <xinclude:include href='../shared/man-control-panel.xml' />
diff --git a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-controls.xml b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
index 3af4b0d..85a6b3e 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
@@ -586,7 +586,12 @@
   <para>OpenDJ directory server supports the Password Expired Response Control.
   To obtain the following output from the excerpt, you can change the default
   password policy configuration to set a short maximum password age, change
-  Barbara Jensen's password, and wait for it to expire.</para>
+  Barbara Jensen's password, and wait for it to expire. See the OpenDJ
+  <citetitle>Administration Guide</citetitle> procedure explaining how
+  <link xlink:href="admin-guide#default-pwp"
+  xlink:role="http://docbook.org/xlink/role/olink"><citetitle
+  >To Adjust the Default Password Policy</citetitle></link> for an example
+  of how to adjust the maximum password age.</para>
 
   <programlisting
   >Password expired for uid=bjensen,ou=People,dc=example,dc=com</programlisting>
@@ -633,7 +638,13 @@
   To obtain the following output from the excerpt, you can change the default
   password policy configuration to set a maximum password age and a warning
   interval, change Barbara Jensen's password, and wait until you enter the
-  warning interval before password expiration.</para>
+  warning interval before password expiration. See the OpenDJ
+  <citetitle>Administration Guide</citetitle> procedure explaining how
+  <link xlink:href="admin-guide#default-pwp"
+  xlink:role="http://docbook.org/xlink/role/olink"><citetitle
+  >To Adjust the Default Password Policy</citetitle></link> for an example
+  of how to adjust the maximum password age. Also set a short
+  <literal>password-expiration-warning-interval</literal> value.</para>
 
   <programlisting>Password for uid=bjensen,ou=People,dc=example,dc=com
  expires in 237 seconds.</programlisting>
@@ -700,7 +711,13 @@
   the output from the excerpt, you can change the default password policy
   configuration to set a maximum password age and a warning interval, change
   Barbara Jensen's password, and then run the example during the warning
-  interval and after the password has expired.</para>
+  interval and after the password has expired. See the OpenDJ
+  <citetitle>Administration Guide</citetitle> procedure explaining how
+  <link xlink:href="admin-guide#default-pwp"
+  xlink:role="http://docbook.org/xlink/role/olink"><citetitle
+  >To Adjust the Default Password Policy</citetitle></link> for an example
+  of how to adjust the maximum password age. Also set a short
+  <literal>password-expiration-warning-interval</literal> value.</para>
 
   <para>For a warning:</para>
   <programlisting>Password policy warning timeBeforeExpiration, value 237 for
diff --git a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-getting-directory-info.xml b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-getting-directory-info.xml
index 6388bee..48ae9c2 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-getting-directory-info.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-getting-directory-info.xml
@@ -47,7 +47,7 @@
    <secondary>Checking supported features</secondary>
   </indexterm>
 
-  <para>The directory with distinguished name <literal>""</literal> (empty
+  <para>The directory entry with distinguished name <literal>""</literal> (empty
   string) is called the <firstterm>root DSE</firstterm>. DSE stands for
   DSA-Specific Entry. DSA stands for Directory Server Agent, a single
   directory server.</para>
diff --git a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-reading.xml b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-reading.xml
index a052d80..086f793 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-reading.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-reading.xml
@@ -129,14 +129,10 @@
     SearchResultEntry entry = connection.searchSingleEntry(baseDN,
             SearchScope.WHOLE_SUBTREE, "(mail=" + mail + ")", "cn");
     DN bindDN = entry.getName();
-    BindResult result = connection.bind(bindDN.toString(), password);
+    connection.bind(bindDN.toString(), password);
 
-    if (result.isSuccess()) {
-        String cn = entry.getAttribute("cn").firstValueAsString();
-        System.out.println("Hello, " + cn + "!");
-    } else {
-        System.err.println("Failed to bind.");
-    }
+    String cn = entry.getAttribute("cn").firstValueAsString();
+    System.out.println("Hello, " + cn + "!");
 } catch (final ErrorResultException e) {
     System.err.println("Failed to bind.");
     System.exit(e.getResult().getResultCode().intValue());
diff --git a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-using-the-sdk.xml b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-using-the-sdk.xml
index 5885646..b830127 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-using-the-sdk.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/chap-using-the-sdk.xml
@@ -189,7 +189,7 @@
   <indexterm>
    <primary>Referrals</primary>
   </indexterm>
-
+  <!-- See https://bugster.forgerock.org/jira/browse/OPENDJ-178 -->
   <para>TODO</para>
  </section>
 </chapter>
\ No newline at end of file
diff --git a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/index.xml b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/index.xml
index 0a0fe61..33dda1d 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/dev-guide/index.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/dev-guide/index.xml
@@ -72,6 +72,17 @@
  
  <reference xml:id="dev-tools-ref">
   <title>Tools Reference</title>
+
+  <partintro>
+   <para>You can find the tools under the <filename>bin/</filename> or
+   <filename>bat\</filename> folder where you installed OpenDJ LDAP SDK
+   toolkit as described in the procedure explaining how <link
+   xlink:href="dev-guide#install-stable-sdk"
+   xlink:role="http://docbook.org/xlink/role/olink"><citetitle>To Install the
+   Latest Stable SDK &amp; Tools</citetitle></link>. For example,
+   <filename>/path/to/opendj-ldap-toolkit-<?eval ${currentSDKversion}?>/bin</filename>.</para>
+  </partintro>
+
   <xinclude:include href='../shared/man-authrate.xml' />
   <xinclude:include href='../shared/man-ldapcompare.xml' />
   <xinclude:include href='../shared/man-ldapmodify.xml' />

--
Gitblit v1.10.0