001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * docs/licenses/cddl.txt
011 * or http://www.opensource.org/licenses/cddl1.php.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * docs/licenses/cddl.txt.  If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 *      Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 *      Copyright 2010-2018 Ping Identity Corporation
026 */
027package com.unboundid.directory.sdk.common.operation;
028
029
030
031import java.util.List;
032
033import com.unboundid.ldap.sdk.DereferencePolicy;
034import com.unboundid.ldap.sdk.DN;
035import com.unboundid.ldap.sdk.Filter;
036import com.unboundid.ldap.sdk.LDAPException;
037import com.unboundid.ldap.sdk.SearchScope;
038import com.unboundid.util.NotExtensible;
039import com.unboundid.util.ThreadSafety;
040import com.unboundid.util.ThreadSafetyLevel;
041
042
043
044/**
045 * This interface defines a set of methods which may be used to update a search
046 * request.
047 */
048@NotExtensible()
049@ThreadSafety(level=ThreadSafetyLevel.INTERFACE_NOT_THREADSAFE)
050public interface UpdatableSearchRequest
051       extends SearchRequest, UpdatableRequest
052{
053  /**
054   * Specifies the base DN for the search.
055   *
056   * @param  baseDN  The base DN for the search.  It must not be {@code null}.
057   */
058  void setBaseDN(final String baseDN);
059
060
061
062  /**
063   * Specifies the base DN for the search.
064   *
065   * @param  baseDN  The base DN for the search.  It must not be {@code null}.
066   */
067  void setBaseDN(final DN baseDN);
068
069
070
071  /**
072   * Specifies the scope for the search.
073   *
074   * @param  scope  The scope for the search.  It must not be {@code null}.
075   */
076  void setScope(final SearchScope scope);
077
078
079
080  /**
081   * Specifies the dereference policy for the search.
082   *
083   * @param  derefPolicy  The dereference policy for the search.  It must not be
084   *                      {@code null}.
085   */
086  void setDerefPolicy(final DereferencePolicy derefPolicy);
087
088
089
090  /**
091   * Specifies the size limit for the search.  A value less than or equal to
092   * zero indicates that no size limit should be requested.
093   *
094   * @param  sizeLimit  The size limit for the search.
095   */
096  void setSizeLimit(final int sizeLimit);
097
098
099
100  /**
101   * Specifies the time limit for the search in seconds.  A value less than or
102   * equal to zero indicates that no time limit should be requested.
103   *
104   * @param  timeLimit  The time limit for the search in seconds.
105   */
106  void setTimeLimitSeconds(final int timeLimit);
107
108
109
110  /**
111   * Specifies whether search result entries should contain attribute values.
112   *
113   * @param  typesOnly  Indicates whether search result entries should contain
114   *                    only attribute types or both types and values.
115   */
116  void setTypesOnly(final boolean typesOnly);
117
118
119
120  /**
121   * Specifies the filter for the search.
122   *
123   * @param  filter  The filter for the search.  It must not be {@code null}.
124   */
125  void setFilter(final Filter filter);
126
127
128
129  /**
130   * Specifies the filter for the search.
131   *
132   * @param  filter  The string representation of the filter for the search.  It
133   *                 must not be {@code null}.
134   *
135   * @throws  LDAPException  If the provided string cannot be parsed as a valid
136   *                         filter.
137   */
138  void setFilter(final String filter)
139       throws LDAPException;
140
141
142
143  /**
144   * Specifies the list of requested attributes.
145   *
146   * @param  attributes  The list of requested attributes.
147   */
148  void setAttributes(final List<String> attributes);
149}