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 ExtendedResult

All Superinterfaces:
Result

public interface ExtendedResult
extends Result

A Extended result indicates the status of an Extended operation and any additional information associated with the Extended operation, including the optional response name and value. These can be retrieved using the getOID() and getValue() methods respectively.


Method Summary
 ExtendedResult addControl(Control control)
          Adds the provided control to this response.
 ExtendedResult addReferralURI(java.lang.String uri)
          Adds the provided referral URI to this result.
<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.
 java.lang.String getOID()
          Returns the numeric OID, if any, associated with this extended result.
 ByteString getValue()
          Returns the value, if any, associated with this extended result.
 boolean hasValue()
          Returns true if this extended result has a value.
 ExtendedResult setCause(java.lang.Throwable cause)
          Sets the throwable cause associated with this result if available.
 ExtendedResult setDiagnosticMessage(java.lang.String message)
          Sets the diagnostic message associated with this result.
 ExtendedResult setMatchedDN(DN dn)
          Sets the matched DN associated with this result.
 ExtendedResult setResultCode(ResultCode resultCode)
          Sets the result code associated with this result.

 

Methods inherited from interface oracle.oud.responses.Result
getCause, getDiagnosticMessage, getMatchedDN, getReferralURIs, getResultCode, isReferral, isSuccess, removeControl

 

Method Detail

addControl

ExtendedResult addControl(Control control)
                          throws java.lang.UnsupportedOperationException,
                                 java.lang.NullPointerException
Adds the provided control to this response.
Specified by:
addControl in interface Result
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.

addReferralURI

ExtendedResult addReferralURI(java.lang.String uri)
                              throws java.lang.UnsupportedOperationException,
                                     java.lang.NullPointerException
Adds the provided referral URI to this result.
Specified by:
addReferralURI in interface Result
Parameters:
uri - The referral URI to be added.
Returns:
This result.
Throws:
java.lang.UnsupportedOperationException - If this result does not permit referrals to be added.
java.lang.NullPointerException - If uri was null.

getOID

java.lang.String getOID()
Returns the numeric OID, if any, associated with this extended result.
Returns:
The numeric OID associated with this extended result, or null if there is no OID.

getValue

ByteString getValue()
Returns the value, if any, associated with this extended result. Its format is defined by the specification of this extended result.
Returns:
The value associated with this extended result, or null if there is no value.

hasValue

boolean hasValue()
Returns true if this extended result has a value. In some circumstances it may be useful to determine if a extended result has a value, without actually calculating the value and incurring any performance costs.
Returns:
true if this extended result has a value, or false if there is no value.

setCause

ExtendedResult setCause(java.lang.Throwable cause)
                        throws java.lang.UnsupportedOperationException
Sets the throwable cause associated with this result if available. A cause may be provided in cases where a result indicates a failure due to a client-side error.
Specified by:
setCause in interface Result
Parameters:
cause - The throwable cause, which may be null indicating that none was provided.
Returns:
This result.
Throws:
java.lang.UnsupportedOperationException - If this result does not permit the cause to be set.

setDiagnosticMessage

ExtendedResult setDiagnosticMessage(java.lang.String message)
                                    throws java.lang.UnsupportedOperationException
Sets the diagnostic message associated with this result.
Specified by:
setDiagnosticMessage in interface Result
Parameters:
message - The diagnostic message, which may be empty or null indicating that none was provided.
Returns:
This result.
Throws:
java.lang.UnsupportedOperationException - If this result does not permit the diagnostic message to be set.

setMatchedDN

ExtendedResult setMatchedDN(DN dn)
                            throws java.lang.UnsupportedOperationException
Sets the matched DN associated with this result.
Specified by:
setMatchedDN in interface Result
Parameters:
dn - The matched DN associated, which may be empty or null indicating that none was provided.
Returns:
This result.
Throws:
java.lang.UnsupportedOperationException - If this result does not permit the matched DN to be set.

setResultCode

ExtendedResult setResultCode(ResultCode resultCode)
                             throws java.lang.UnsupportedOperationException,
                                    java.lang.NullPointerException
Sets the result code associated with this result.
Specified by:
setResultCode in interface Result
Parameters:
resultCode - The result code.
Returns:
This result.
Throws:
java.lang.UnsupportedOperationException - If this result does not permit the result code to be set.
java.lang.NullPointerException - If resultCode 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.