mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
12.00.2007 6cf851aa0b2fc944f8a2707787e1355283c59b28
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 Issue Number: 1148
2 files modified
74 ■■■■■ changed files
opends/src/server/org/opends/server/types/operation/PreOperationSearchOperation.java 37 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/operation/PreParseSearchOperation.java 37 ●●●●● patch | view | raw | blame | history
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);
}
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);
}