From dff791d6bdd93ee5127094248f5e3cbc0d529653 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 16 Nov 2006 01:32:41 +0000
Subject: [PATCH] Update the ldapsearch tool to provide a --countEntries option that can be used to count the number of matching entries. The count will be displayed as a comment at the end of the results, and will also be used as the exit code for the tool. This addresses issue #1013.
---
opendj-sdk/opends/src/server/org/opends/server/messages/ToolMessages.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/messages/ToolMessages.java b/opendj-sdk/opends/src/server/org/opends/server/messages/ToolMessages.java
index 49f1f79..e7b3fec 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/messages/ToolMessages.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/messages/ToolMessages.java
@@ -7323,6 +7323,25 @@
/**
+ * The message ID for the message that will be used as the description of the
+ * countEntries property. This does not take any arguments.
+ */
+ public static final int MSGID_DESCRIPTION_COUNT_ENTRIES =
+ CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 750;
+
+
+
+ /**
+ * The message ID for the message that will be used to provide the number of
+ * matching entries for a search request. This takes a single argument, which
+ * is the number of matching entries.
+ */
+ public static final int MSGID_LDAPSEARCH_MATCHING_ENTRY_COUNT =
+ CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 751;
+
+
+
+ /**
* Associates a set of generic messages with the message IDs defined in this
* class.
*/
@@ -7999,6 +8018,8 @@
"SASL bind options");
registerMessage(MSGID_DESCRIPTION_DONT_WRAP,
"Do not wrap long lines");
+ registerMessage(MSGID_DESCRIPTION_COUNT_ENTRIES,
+ "Count the number of entries returned by the server");
registerMessage(MSGID_LDAPAUTH_PROPERTY_DESCRIPTION_KDC,
"Specifies the KDC to use for the Kerberos " +
"authentication.");
@@ -9428,6 +9449,8 @@
"# The account is locked.");
registerMessage(MSGID_LDAPSEARCH_ACCTUSABLE_TIME_UNTIL_UNLOCK,
"# Time until the account is unlocked: %s.");
+ registerMessage(MSGID_LDAPSEARCH_MATCHING_ENTRY_COUNT,
+ "# Total number of matching entries: %d.");
registerMessage(MSGID_TOOL_CONFLICTING_ARGS,
--
Gitblit v1.10.0