From c6e84a307b1b7278dcb8b7a6db97d218c51f30f6 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 01 Mar 2013 15:57:23 +0000
Subject: [PATCH] OPENDJ-796 Document new ldif-diff and ldapcompare arguments

---
 opendj-sdk/opendj3/src/main/docbkx/shared/man-ldif-diff.xml           |   27 +++++++++++--
 opendj-sdk/opends/resource/man/man1/ldapcompare.1                     |   21 +++++++++-
 opendj-sdk/opends/src/messages/messages/tools.properties              |    6 ++
 opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml              |    2 
 opendj-sdk/opendj3/src/main/docbkx/admin-guide/man-ldapcompare.xml    |   22 ++++++++++-
 opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java |    4 +-
 opendj-sdk/opends/resource/man/man1/ldif-diff.1                       |   21 +++++++++-
 opendj-sdk/opends/src/messages/messages/tools_es.properties           |    3 +
 opendj-sdk/opends/src/messages/messages/tools_fr.properties           |    3 +
 opendj-sdk/opends/src/server/org/opends/server/tools/LDIFDiff.java    |    4 +-
 10 files changed, 93 insertions(+), 20 deletions(-)

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 f96a096..fed89e1 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/admin-guide/index.xml
@@ -36,7 +36,7 @@
    project offers open source LDAP directory services in Java.</para>
   </abstract>
   <copyright>
-   <year>2011-2012</year>
+   <year>2011-2013</year>
    <holder>ForgeRock AS</holder>
   </copyright>
   <authorgroup>
diff --git a/opendj-sdk/opendj3/src/main/docbkx/admin-guide/man-ldapcompare.xml b/opendj-sdk/opendj3/src/main/docbkx/admin-guide/man-ldapcompare.xml
index 2a784d8..5862476 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/admin-guide/man-ldapcompare.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/admin-guide/man-ldapcompare.xml
@@ -20,7 +20,7 @@
   !
   ! CCPL HEADER END
   !
-  !      Copyright 2011-2012 ForgeRock AS
+  !      Copyright 2011-2013 ForgeRock AS
   !    
 -->
 <refentry xml:id='ldapcompare-1'
@@ -30,7 +30,7 @@
  xsi:schemaLocation='http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd'
  xmlns:xlink='http://www.w3.org/1999/xlink'
  xmlns:xinclude='http://www.w3.org/2001/XInclude'>
- <info><copyright><year>2011-2012</year><holder>ForgeRock AS</holder></copyright></info>
+ <info><copyright><year>2011-2013</year><holder>ForgeRock AS</holder></copyright></info>
  <refmeta>
   <refentrytitle>ldapcompare</refentrytitle><manvolnum>1</manvolnum>
   <refmiscinfo class="software">OpenDJ</refmiscinfo>
@@ -82,6 +82,12 @@
     </listitem>
    </varlistentry>
    <varlistentry>
+    <term><option>-m, --useCompareResultCode</option></term>
+    <listitem>
+     <para>Use the LDAP compare result as an exit code for the LDAP compare operations.</para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
     <term><option>-n, --dry-run</option></term>
     <listitem>
      <para>Show what would be done but do not perform any operation</para>
@@ -278,6 +284,18 @@
      </listitem>
     </varlistentry>
     <varlistentry>
+     <term>5</term>
+     <listitem>
+      <para>The -m option was used, and at least one of the LDAP compare operations did not match.</para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term>6</term>
+     <listitem>
+      <para>The -m option was used, and all the LDAP compare operations did match.</para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
      <term><replaceable>ldap-error</replaceable></term>
      <listitem>
       <para>An LDAP error occurred while processing the operation.</para>
diff --git a/opendj-sdk/opendj3/src/main/docbkx/shared/man-ldif-diff.xml b/opendj-sdk/opendj3/src/main/docbkx/shared/man-ldif-diff.xml
index 8440922..618ccf0 100644
--- a/opendj-sdk/opendj3/src/main/docbkx/shared/man-ldif-diff.xml
+++ b/opendj-sdk/opendj3/src/main/docbkx/shared/man-ldif-diff.xml
@@ -20,7 +20,7 @@
   !
   ! CCPL HEADER END
   !
-  !      Copyright 2011-2012 ForgeRock AS
+  !      Copyright 2011-2013 ForgeRock AS
   !    
 -->
 <refentry xml:id='ldif-diff-1'
@@ -30,7 +30,7 @@
  xsi:schemaLocation='http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd'
  xmlns:xlink='http://www.w3.org/1999/xlink'
  xmlns:xinclude='http://www.w3.org/2001/XInclude'>
- <info><copyright><year>2011-2012</year><holder>ForgeRock AS</holder></copyright></info>
+ <info><copyright><year>2011-2013</year><holder>ForgeRock AS</holder></copyright></info>
  <refmeta>
   <refentrytitle>ldif-diff</refentrytitle><manvolnum>1</manvolnum>
   <refmiscinfo class="software">OpenDJ</refmiscinfo>
@@ -91,6 +91,13 @@
     </listitem>
    </varlistentry>
    <varlistentry>
+    <term><option>-r, --useCompareResultCode</option></term>
+    <listitem>
+     <para>Use the LDAP compare result as an exit code for reporting
+     differences between the two LDIF files.</para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
     <term><option>-s, --sourceLDIF {file}</option></term>
     <listitem>
      <para>LDIF file to use as the source data.</para>
@@ -134,7 +141,19 @@
     </listitem>
    </varlistentry>
    <varlistentry>
-    <term>&gt; 0</term>
+    <term>5</term>
+    <listitem>
+     <para>The -r option was used, and no differences are reported.</para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term>6</term>
+    <listitem>
+     <para>The-r option was used, and differences are reported.</para>
+    </listitem>
+   </varlistentry>
+   <varlistentry>
+    <term>other</term>
     <listitem>
      <para>An error occurred.</para>
     </listitem>
@@ -185,4 +204,4 @@
 description: A new description.
 </screen>
  </refsect1>
-</refentry>
\ No newline at end of file
+</refentry>
diff --git a/opendj-sdk/opends/resource/man/man1/ldapcompare.1 b/opendj-sdk/opends/resource/man/man1/ldapcompare.1
index 38bdcb6..791cfa1 100644
--- a/opendj-sdk/opends/resource/man/man1/ldapcompare.1
+++ b/opendj-sdk/opends/resource/man/man1/ldapcompare.1
@@ -2,12 +2,12 @@
 .\"     Title: ldapcompare
 .\"    Author: 
 .\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 03/21/2012
+.\"      Date: 03/01/2013
 .\"    Manual: Tools Reference
 .\"    Source: OpenDJ 2.5.0
 .\"  Language: English
 .\"
-.TH "LDAPCOMPARE" "1" "03/21/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
+.TH "LDAPCOMPARE" "1" "03/01/2013" "OpenDJ 2\&.5\&.0" "Tools Reference"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -59,6 +59,11 @@
 Use a request control with the provided information
 .RE
 .PP
+\fB\-m, \-\-useCompareResultCode\fR
+.RS 4
+Use the LDAP compare result as an exit code for the LDAP compare operations\&.
+.RE
+.PP
 \fB\-n, \-\-dry\-run\fR
 .RS 4
 Show what would be done but do not perform any operation
@@ -213,6 +218,16 @@
 The command completed successfully\&.
 .RE
 .PP
+5
+.RS 4
+The \-m option was used, and at least one of the LDAP compare operations did not match\&.
+.RE
+.PP
+6
+.RS 4
+The \-m option was used, and all the LDAP compare operations did match\&.
+.RE
+.PP
 \fIldap\-error\fR
 .RS 4
 An LDAP error occurred while processing the operation\&.
@@ -285,5 +300,5 @@
 .\}
 .SH "COPYRIGHT"
 .br
-Copyright \(co 2011-2012 ForgeRock AS
+Copyright \(co 2011-2013 ForgeRock AS
 .br
diff --git a/opendj-sdk/opends/resource/man/man1/ldif-diff.1 b/opendj-sdk/opends/resource/man/man1/ldif-diff.1
index a86ae93..770ad61 100644
--- a/opendj-sdk/opends/resource/man/man1/ldif-diff.1
+++ b/opendj-sdk/opends/resource/man/man1/ldif-diff.1
@@ -2,12 +2,12 @@
 .\"     Title: ldif-diff
 .\"    Author: 
 .\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 03/21/2012
+.\"      Date: 03/01/2013
 .\"    Manual: Tools Reference
 .\"    Source: OpenDJ 2.5.0
 .\"  Language: English
 .\"
-.TH "LDIF\-DIFF" "1" "03/21/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
+.TH "LDIF\-DIFF" "1" "03/01/2013" "OpenDJ 2\&.5\&.0" "Tools Reference"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -64,6 +64,11 @@
 Any existing output file should be overwritten rather than appending to it\&.
 .RE
 .PP
+\fB\-r, \-\-useCompareResultCode\fR
+.RS 4
+Use the LDAP compare result as an exit code for reporting differences between the two LDIF files\&.
+.RE
+.PP
 \fB\-s, \-\-sourceLDIF {file}\fR
 .RS 4
 LDIF file to use as the source data\&.
@@ -95,7 +100,17 @@
 The command completed successfully\&.
 .RE
 .PP
-> 0
+5
+.RS 4
+The \-r option was used, and no differences are reported\&.
+.RE
+.PP
+6
+.RS 4
+The\-r option was used, and differences are reported\&.
+.RE
+.PP
+other
 .RS 4
 An error occurred\&.
 .RE
diff --git a/opendj-sdk/opends/src/messages/messages/tools.properties b/opendj-sdk/opends/src/messages/messages/tools.properties
index ab8b62b..861e82e 100644
--- a/opendj-sdk/opends/src/messages/messages/tools.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools.properties
@@ -2600,4 +2600,8 @@
 This is an advanced option which must only be used in cases where a degraded index \
 is known to be empty and does not therefore need rebuilding. \
 This situation typically arises when an index is created for an attribute \
-which has just been added to the schema
\ No newline at end of file
+which has just been added to the schema
+INFO_LDIFDIFF_DESCRIPTION_USE_COMPARE_RESULT_1735=Use the LDAP compare result \
+as an exit code for reporting differences between the two LDIF files
+INFO_LDAPCOMPARE_DESCRIPTION_USE_COMPARE_RESULT_1736=Use the LDAP compare result \
+as an exit code for the LDAP compare operations
\ No newline at end of file
diff --git a/opendj-sdk/opends/src/messages/messages/tools_es.properties b/opendj-sdk/opends/src/messages/messages/tools_es.properties
index 54e9c86..15e2119 100644
--- a/opendj-sdk/opends/src/messages/messages/tools_es.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools_es.properties
@@ -1369,4 +1369,5 @@
 MILD_ERR_MAKELDIF_CANNOT_WRITE_ENTRY_WITHOUT_DN_1713=Se ha producido un error al tratar de escribir una entrada en LDIF: no ha podido calcularse el DN para la entrada (no se ha encontrado ning\u00fan valor para el atributo RDN %s)
 SEVERE_ERR_CLIENT_SIDE_TIMEOUT_1714=Se ha producido un tiempo de espera en el lado del cliente.%nInformaci\u00f3n adicional:  %s
 INFO_LABEL_DBTEST_INDEX_UNDEFINED_RECORD_COUNT_1715=No definido
-
+INFO_LDIFDIFF_DESCRIPTION_USE_COMPARE_RESULT_1735=Utilice los resultados de comparaci\u00f3n de LDAP como un c\u00f3digo de salida para se\\u00F1alar diferencias entre los dos archivos LDIF
+INFO_LDAPCOMPARE_DESCRIPTION_USE_COMPARE_RESULT_1736=Utilice los resultados de comparaci\u00f3n de LDAP como un c\u00f3digo de salida para las comparaci\u00f3nes LDAP
diff --git a/opendj-sdk/opends/src/messages/messages/tools_fr.properties b/opendj-sdk/opends/src/messages/messages/tools_fr.properties
index 1efda55..38d8652 100644
--- a/opendj-sdk/opends/src/messages/messages/tools_fr.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools_fr.properties
@@ -1369,4 +1369,5 @@
 MILD_ERR_MAKELDIF_CANNOT_WRITE_ENTRY_WITHOUT_DN_1713=Une erreur est survenue lors de la tentative d'\u00e9criture d'une entr\u00e9e dans LDIF : Impossible de calculer le DN de l'entr\u00e9e (aucune valeur trouv\u00e9e pour l'attribut RDN %s)
 SEVERE_ERR_CLIENT_SIDE_TIMEOUT_1714=Une expiration du d\u00e9lai s'est produite c\u00f4t\u00e9 client.%nInformations suppl\u00e9mentaires\u00a0:  %s
 INFO_LABEL_DBTEST_INDEX_UNDEFINED_RECORD_COUNT_1715=Non d\u00e9fini
-
+INFO_LDIFDIFF_DESCRIPTION_USE_COMPARE_RESULT_1735=Utiliser le r\u00e9sultat de comparaison LDAP en tant que code de sortie pour signaler les diff\u00e9rences entre deux fichiers LDIF
+INFO_LDAPCOMPARE_DESCRIPTION_USE_COMPARE_RESULT_1736=Utiliser le r\u00e9sultat de comparaison LDAP en tant que code de sortie pour les comparaisons LDAP
\ No newline at end of file
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
index 2e3da35..9ef6072 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -677,8 +677,8 @@
 
       useCompareResultCode =
           new BooleanArgument("usecompareresultcode", 'm',
-              "useCompareResultCode", INFO_ENCPW_DESCRIPTION_USE_COMPARE_RESULT
-                  .get());
+              "useCompareResultCode",
+              INFO_LDAPCOMPARE_DESCRIPTION_USE_COMPARE_RESULT.get());
       argParser.addArgument(useCompareResultCode);
 
       argParser.setUsageArgument(showUsage, out);
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/LDIFDiff.java b/opendj-sdk/opends/src/server/org/opends/server/tools/LDIFDiff.java
index 9f63284..10c9292 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/LDIFDiff.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/LDIFDiff.java
@@ -256,8 +256,8 @@
 
       useCompareResultCode =
           new BooleanArgument("usecompareresultcode", 'r',
-              "useCompareResultCode", INFO_ENCPW_DESCRIPTION_USE_COMPARE_RESULT
-                  .get());
+              "useCompareResultCode",
+              INFO_LDIFDIFF_DESCRIPTION_USE_COMPARE_RESULT.get());
       argParser.addArgument(useCompareResultCode);
 
       argParser.setUsageArgument(showUsage);

--
Gitblit v1.10.0