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.responses
Interface SearchResultEntry

All Superinterfaces:
Entry

public interface SearchResultEntry
extends Entry

A Search Result Entry represents an entry found during a Search operation.

Each entry returned in a Search Result Entry will contain all appropriate attributes as specified in the Search request, subject to access control and other administrative policy.

Note that a Search Result Entry may hold zero attributes. This may happen when none of the attributes of an entry were requested or could be returned.

Note also that each returned attribute may hold zero attribute values. This may happen when only attribute types are requested, access controls prevent the return of values, or other reasons.


Method Summary
 SearchResultEntry addAttribute(java.lang.String attributeDescription, java.lang.Object... values)
          Ensures that this entry contains the provided attribute and values (optional operation).
 SearchResultEntry addControl(Control control)
          Adds the provided control to this response.
 SearchResultEntry clearAttributes()
          Removes all the attributes from this entry (optional operation).
<C extends Control>
C
getControl(ControlDecoder<C> decoder)
          Decodes and returns the first control in this response having an OID corresponding to the provided control decoder.
 java.util.List<Control> getControls()
          Returns a List containing the controls included with this response.
 SearchResultEntry removeAttribute(java.lang.String attributeDescription, java.lang.Object... values)
          Removes all of the attribute values contained in values from the named attribute in this entry if it is present (optional operation).
 SearchResultEntry removeControl(Control control)
          Removes the provided control from this response.
 SearchResultEntry replaceAttribute(java.lang.String attributeDescription, java.lang.Object... values)
          Adds all of the attribute values contained in values to this entry, replacing any existing attribute values (optional operation).
 SearchResultEntry setName(DN dn)
          Sets the distinguished name of this entry (optional operation).
 SearchResultEntry setName(java.lang.String dn)
          Sets the distinguished name of this entry (optional operation).

 

Methods inherited from interface oracle.oud.types.Entry
addAttribute, addAttribute, containsAttribute, containsAttribute, containsAttribute, equals, getAllAttributes, getAllAttributes, getAllAttributes, getAttribute, getAttribute, getName, hashCode, removeAttribute, removeAttribute, removeAttribute, replaceAttribute, toString

 

Method Detail

addAttribute

SearchResultEntry addAttribute(java.lang.String attributeDescription,
                               java.lang.Object... values)
                               throws PluginException,
                                      java.lang.UnsupportedOperationException,
                                      java.lang.NullPointerException
Ensures that this entry contains the provided attribute and values (optional operation). This method has the following semantics:

NOTE: When attribute is non-empty, this method implements LDAP Modify add semantics.

Specified by:
addAttribute in interface Entry
Parameters:
attributeDescription - The name of the attribute whose values are to be added.
values - The attribute values to be added to this entry, merging any existing attribute values.
Returns:
This entry.
Throws:
PluginException - If attributeDescription could not be decoded.
java.lang.UnsupportedOperationException - If this entry does not permit attributes or their values to be added.
java.lang.NullPointerException - If attributeDescription was null.

addControl

SearchResultEntry addControl(Control control)
                             throws java.lang.UnsupportedOperationException,
                                    java.lang.NullPointerException
Adds the provided control to this response.
Parameters:
control - The control to be added.
Returns:
This response.
Throws:
java.lang.UnsupportedOperationException - If this response does not permit controls to be added.
java.lang.NullPointerException - If control was null.

removeControl

SearchResultEntry removeControl(Control control)
                                throws java.lang.UnsupportedOperationException,
                                       java.lang.NullPointerException
Removes the provided control from this response.
Parameters:
control - The control to be removed from this response.
Returns:
This response.
Throws:
java.lang.UnsupportedOperationException - If this response does not permit controls to be removed.
java.lang.NullPointerException - If control was null.

clearAttributes

SearchResultEntry clearAttributes()
                                  throws java.lang.UnsupportedOperationException
Removes all the attributes from this entry (optional operation).
Specified by:
clearAttributes in interface Entry
Returns:
This entry.
Throws:
java.lang.UnsupportedOperationException - If this entry does not permit attributes to be removed.

removeAttribute

SearchResultEntry removeAttribute(java.lang.String attributeDescription,
                                  java.lang.Object... values)
                                  throws PluginException,
                                         java.lang.UnsupportedOperationException,
                                         java.lang.NullPointerException
Removes all of the attribute values contained in values from the named attribute in this entry if it is present (optional operation). If values is null or empty then the entire attribute will be removed if it is present.

NOTE: This method implements LDAP Modify delete semantics.

Specified by:
removeAttribute in interface Entry
Parameters:
attributeDescription - The name of the attribute whose values are to be removed.
values - The attribute values to be removed from this entry, which may be null or empty if the entire attribute is to be removed.
Returns:
This entry.
Throws:
PluginException - If attributeDescription could not be decoded.
java.lang.UnsupportedOperationException - If this entry does not permit attributes or their values to be removed.
java.lang.NullPointerException - If attributeDescription was null.

replaceAttribute

SearchResultEntry replaceAttribute(java.lang.String attributeDescription,
                                   java.lang.Object... values)
                                   throws PluginException,
                                          java.lang.UnsupportedOperationException,
                                          java.lang.NullPointerException
Adds all of the attribute values contained in values to this entry, replacing any existing attribute values (optional operation). If values is null or empty then the entire attribute will be removed if it is present.

NOTE: This method implements LDAP Modify replace semantics.

Specified by:
replaceAttribute in interface Entry
Parameters:
attributeDescription - The name of the attribute whose values are to be replaced.
values - The attribute values to be added to this entry, replacing any existing attribute values, and which may be null or empty if the entire attribute is to be removed.
Returns:
This entry.
Throws:
PluginException - If attributeDescription could not be decoded.
java.lang.UnsupportedOperationException - If this entry does not permit attributes or their values to be replaced.
java.lang.NullPointerException - If attribute was null.

setName

SearchResultEntry setName(DN dn)
                          throws java.lang.UnsupportedOperationException,
                                 java.lang.NullPointerException
Sets the distinguished name of this entry (optional operation).
Specified by:
setName in interface Entry
Parameters:
dn - The distinguished name.
Returns:
This entry.
Throws:
java.lang.UnsupportedOperationException - If this entry does not permit the distinguished name to be set.
java.lang.NullPointerException - If dn was null.

setName

SearchResultEntry setName(java.lang.String dn)
                          throws PluginException,
                                 java.lang.UnsupportedOperationException,
                                 java.lang.NullPointerException
Sets the distinguished name of this entry (optional operation).
Specified by:
setName in interface Entry
Parameters:
dn - The string representation of the distinguished name.
Returns:
This entry.
Throws:
PluginException - If dn could not be decoded.
java.lang.UnsupportedOperationException - If this entry does not permit the distinguished name to be set.
java.lang.NullPointerException - If dn was null.

getControl

<C extends Control> C getControl(ControlDecoder<C> decoder)
                             throws java.lang.NullPointerException,
                                    PluginException
Decodes and returns the first control in this response having an OID corresponding to the provided control decoder.
Type Parameters:
C - The type of control to be decoded and returned.
Parameters:
decoder - The control decoder.
Returns:
The decoded control, or null if the control is not included with this response.
Throws:
PluginException - If the control could not be decoded because it was malformed in some way (e.g. the control value was missing, or its content could not be decoded).
java.lang.NullPointerException - If decoder or options was null.

getControls

java.util.List<Control> getControls()
Returns a List containing the controls included with this response. The returned List may be modified if permitted by this response.
Returns:
A List containing the controls.

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.