Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


oracle.oud.requests
Interface SearchRequest

All Superinterfaces:
AttachmentHolder, Request
All Known Implementing Classes:
SearchRequestWrapper

public interface SearchRequest
extends Request

The Search operation is used to request a server to return, subject to access controls and other restrictions, a set of entries matching a complex search criterion. This can be used to read attributes from a single entry, from entries immediately subordinate to a particular entry, or from a whole subtree of entries.

Creation of Search requests is provided by newSearch(DN, SearchScope, Filter, String[]) and newSearch(String, SearchScope, String, String[])


Method Summary
 SearchRequest addAttribute(java.lang.String... attributeDescriptions)
          Adds the provided attribute name(s) to the list of attributes to be included with each entry that matches the search criteria.
 SearchRequest addControl(Control control)
          Adds the provided control to this request.
 java.util.Set<java.lang.String> getAttributes()
          Returns a Set containing the list of attributes to be included with each entry that matches the search criteria.
 DereferenceAliasesPolicy getDereferenceAliasesPolicy()
          Returns an indication as to whether or not alias entries are to be dereferenced during the search.
 Filter getFilter()
          Returns the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
 DN getName()
          Returns the distinguished name of the base entry relative to which the search is to be performed.
 SearchScope getScope()
          Returns the scope of the search.
 int getSizeLimit()
          Returns the size limit that should be used in order to restrict the maximum number of entries returned by the search.
 int getTimeLimit()
          Returns the time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.
 boolean isTypesOnly()
          Indicates whether search results are to contain both attribute descriptions and values, or just attribute descriptions.
 SearchRequest setDereferenceAliasesPolicy(DereferenceAliasesPolicy policy)
          Sets the alias dereferencing policy to be used during the search.
 SearchRequest setFilter(Filter filter)
          Sets the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
 SearchRequest setFilter(java.lang.String filter)
          Sets the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
 SearchRequest setName(DN dn)
          Sets the distinguished name of the base entry relative to which the search is to be performed.
 SearchRequest setName(java.lang.String dn)
          Sets the distinguished name of the base entry relative to which the search is to be performed.
 SearchRequest setScope(SearchScope scope)
          Sets the scope of the search.
 SearchRequest setSizeLimit(int limit)
          Sets the size limit that should be used in order to restrict the maximum number of entries returned by the search.
 SearchRequest setTimeLimit(int limit)
          Sets the time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.
 SearchRequest setTypesOnly(boolean typesOnly)
          Specifies whether search results are to contain both attribute descriptions and values, or just attribute descriptions.

 

Methods inherited from interface oracle.oud.requests.Request
getControl, getControls, isInternal, removeControl

 

Methods inherited from interface oracle.oud.plugin.AttachmentHolder
getAttachment, getAttachmentNames, removeAttachment, setAttachment

 

Method Detail

addAttribute

SearchRequest addAttribute(java.lang.String... attributeDescriptions)
                           throws java.lang.UnsupportedOperationException,
                                  java.lang.NullPointerException
Adds the provided attribute name(s) to the list of attributes to be included with each entry that matches the search criteria. Attributes that are sub-types of listed attributes are implicitly included.
Parameters:
attributeDescriptions - The name(s) of the attribute to be included with each entry.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit attribute names to be added.
java.lang.NullPointerException - If attributeDescriptions was null.

addControl

SearchRequest addControl(Control control)
                         throws java.lang.UnsupportedOperationException,
                                java.lang.NullPointerException
Adds the provided control to this request.
Specified by:
addControl in interface Request
Parameters:
control - The control to be added to this request.
Returns:
This request.
Throws:
java.lang.UnsupportedOperationException - If this request does not permit controls to be added.
java.lang.NullPointerException - If control was null.

getAttributes

java.util.Set<java.lang.String> getAttributes()
Returns a Set containing the list of attributes to be included with each entry that matches the search criteria. Attributes that are sub-types of listed attributes are implicitly included. The returned List may be modified if permitted by this search request.
Returns:
A List containing the list of attributes.

getDereferenceAliasesPolicy

DereferenceAliasesPolicy getDereferenceAliasesPolicy()
Returns an indication as to whether or not alias entries are to be dereferenced during the search.
Returns:
The alias dereferencing policy.

getFilter

Filter getFilter()
Returns the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
Returns:
The search filter.

getName

DN getName()
Returns the distinguished name of the base entry relative to which the search is to be performed.
Returns:
The distinguished name of the base entry.

getScope

SearchScope getScope()
Returns the scope of the search.
Returns:
The search scope.

getSizeLimit

int getSizeLimit()
Returns the size limit that should be used in order to restrict the maximum number of entries returned by the search.

A value of zero (the default) in this field indicates that no client-requested size limit restrictions are in effect. Servers may also enforce a maximum number of entries to return.

Returns:
The size limit that should be used in order to restrict the maximum number of entries returned by the search.

getTimeLimit

int getTimeLimit()
Returns the time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.

A value of zero (the default) in this field indicates that no client-requested time limit restrictions are in effect for the search. Servers may also enforce a maximum time limit for the search.

Returns:
The time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.

isTypesOnly

boolean isTypesOnly()
Indicates whether search results are to contain both attribute descriptions and values, or just attribute descriptions.
Returns:
true if only attribute descriptions (and not values) are to be returned, or false (the default) if both attribute descriptions and values are to be returned.

setDereferenceAliasesPolicy

SearchRequest setDereferenceAliasesPolicy(DereferenceAliasesPolicy policy)
                                          throws java.lang.UnsupportedOperationException,
                                                 java.lang.NullPointerException
Sets the alias dereferencing policy to be used during the search.
Parameters:
policy - The alias dereferencing policy to be used during the search.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the alias dereferencing policy to be set.
java.lang.NullPointerException - If policy was null.

setFilter

SearchRequest setFilter(Filter filter)
                        throws java.lang.UnsupportedOperationException,
                               java.lang.NullPointerException
Sets the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
Parameters:
filter - The filter that defines the conditions that must be fulfilled in order for an entry to be returned.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the filter to be set.
java.lang.NullPointerException - If filter was null.

setFilter

SearchRequest setFilter(java.lang.String filter)
                        throws java.lang.UnsupportedOperationException,
                               PluginException,
                               java.lang.NullPointerException
Sets the filter that defines the conditions that must be fulfilled in order for an entry to be returned.
Parameters:
filter - The filter that defines the conditions that must be fulfilled in order for an entry to be returned.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the filter to be set.
PluginException - If filter is not a valid LDAP string representation of a filter.
java.lang.NullPointerException - If filter was null.

setName

SearchRequest setName(DN dn)
                      throws java.lang.UnsupportedOperationException,
                             java.lang.NullPointerException
Sets the distinguished name of the base entry relative to which the search is to be performed.
Parameters:
dn - The distinguished name of the base entry relative to which the search is to be performed.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the distinguished name to be set.
java.lang.NullPointerException - If dn was null.

setName

SearchRequest setName(java.lang.String dn)
                      throws PluginException,
                             java.lang.UnsupportedOperationException,
                             java.lang.NullPointerException
Sets the distinguished name of the base entry relative to which the search is to be performed.
Parameters:
dn - The distinguished name of the base entry relative to which the search is to be performed.
Returns:
This search request.
Throws:
PluginException - If dn could not be decoded.
java.lang.UnsupportedOperationException - If this search request does not permit the distinguished name to be set.
java.lang.NullPointerException - If dn was null.

setScope

SearchRequest setScope(SearchScope scope)
                       throws java.lang.UnsupportedOperationException,
                              java.lang.NullPointerException
Sets the scope of the search.
Parameters:
scope - The scope of the search.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the scope to be set.
java.lang.NullPointerException - If scope was null.

setSizeLimit

SearchRequest setSizeLimit(int limit)
                           throws java.lang.UnsupportedOperationException,
                                  PluginException
Sets the size limit that should be used in order to restrict the maximum number of entries returned by the search.

A value of zero (the default) in this field indicates that no client-requested size limit restrictions are in effect. Servers may also enforce a maximum number of entries to return.

Parameters:
limit - The size limit that should be used in order to restrict the maximum number of entries returned by the search.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the size limit to be set.
PluginException - If limit was negative.

setTimeLimit

SearchRequest setTimeLimit(int limit)
                           throws java.lang.UnsupportedOperationException,
                                  PluginException
Sets the time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.

A value of zero (the default) in this field indicates that no client-requested time limit restrictions are in effect for the search. Servers may also enforce a maximum time limit for the search.

Parameters:
limit - The time limit that should be used in order to restrict the maximum time (in seconds) allowed for the search.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the time limit to be set.
PluginException - If limit was negative.

setTypesOnly

SearchRequest setTypesOnly(boolean typesOnly)
                           throws java.lang.UnsupportedOperationException
Specifies whether search results are to contain both attribute descriptions and values, or just attribute descriptions.
Parameters:
typesOnly - true if only attribute descriptions (and not values) are to be returned, or false (the default) if both attribute descriptions and values are to be returned.
Returns:
This search request.
Throws:
java.lang.UnsupportedOperationException - If this search request does not permit the types-only parameter to be set.

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.