From 6cf851aa0b2fc944f8a2707787e1355283c59b28 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 12 Jan 2007 04:00:50 +0000
Subject: [PATCH] Update the pre-parse and pre-operation search plugin API to expose the returnEntry and returnReference methods so that those plugins can send entries and referrals to the client.

---
 opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java |   37 ++++++++++++++++++
 opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java     |   37 ++++++++++++++++++
 2 files changed, 74 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java
index 172a0fe..c81ae75 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java
@@ -29,13 +29,17 @@
 
 
 import java.util.LinkedHashSet;
+import java.util.List;
 
 import org.opends.server.protocols.ldap.LDAPFilter;
 import org.opends.server.types.ByteString;
+import org.opends.server.types.Control;
 import org.opends.server.types.DereferencePolicy;
 import org.opends.server.types.DN;
+import org.opends.server.types.Entry;
 import org.opends.server.types.SearchScope;
 import org.opends.server.types.SearchFilter;
+import org.opends.server.types.SearchResultReference;
 
 
 
@@ -147,5 +151,38 @@
    *          operation.
    */
   public LinkedHashSet<String> getAttributes();
+
+
+
+  /**
+   * Returns the provided entry to the client.
+   *
+   * @param  entry     The entry that should be returned.
+   * @param  controls  The set of controls to include with the entry
+   *                   (may be {@code null} if no controls should be
+   *                   included with the entry).
+   *
+   * @return  {@code true} if the caller should continue processing
+   *          the search request and sending additional entries and
+   *          references, or {@code false} if not for some reason
+   *          (e.g., the size limit has been reached or the search has
+   *          been abandoned).
+   */
+  public boolean returnEntry(Entry entry, List<Control> controls);
+
+
+
+  /**
+   * Returns the provided search result reference to the client.
+   *
+   * @param  reference  The search reference that should be returned.
+   *
+   * @return  {@code true} if the caller should continue processing
+   *          the search request and sending additional entries and
+   *          references, or {@code false} if not for some reason
+   *          (e.g., the size limit has been reached or the search has
+   *          been abandoned).
+   */
+  public boolean returnReference(SearchResultReference reference);
 }
 
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java
index c1ae12f..850fd5f 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java
@@ -29,10 +29,14 @@
 
 
 import java.util.LinkedHashSet;
+import java.util.List;
 
 import org.opends.server.protocols.ldap.LDAPFilter;
 import org.opends.server.types.ByteString;
+import org.opends.server.types.Control;
 import org.opends.server.types.DereferencePolicy;
+import org.opends.server.types.Entry;
+import org.opends.server.types.SearchResultReference;
 import org.opends.server.types.SearchScope;
 
 
@@ -205,5 +209,38 @@
    *                     search operation.
    */
   public void setAttributes(LinkedHashSet<String> attributes);
+
+
+
+  /**
+   * Returns the provided entry to the client.
+   *
+   * @param  entry     The entry that should be returned.
+   * @param  controls  The set of controls to include with the entry
+   *                   (may be {@code null} if no controls should be
+   *                   included with the entry).
+   *
+   * @return  {@code true} if the caller should continue processing
+   *          the search request and sending additional entries and
+   *          references, or {@code false} if not for some reason
+   *          (e.g., the size limit has been reached or the search has
+   *          been abandoned).
+   */
+  public boolean returnEntry(Entry entry, List<Control> controls);
+
+
+
+  /**
+   * Returns the provided search result reference to the client.
+   *
+   * @param  reference  The search reference that should be returned.
+   *
+   * @return  {@code true} if the caller should continue processing
+   *          the search request and sending additional entries and
+   *          references, or {@code false} if not for some reason
+   *          (e.g., the size limit has been reached or the search has
+   *          been abandoned).
+   */
+  public boolean returnReference(SearchResultReference reference);
 }
 

--
Gitblit v1.10.0