Package com.unboundid.ldap.sdk
Class ExtendedResult
java.lang.Object
com.unboundid.ldap.sdk.LDAPResult
com.unboundid.ldap.sdk.ExtendedResult
- All Implemented Interfaces:
LDAPResponse,Serializable
- Direct Known Subclasses:
AbortedTransactionExtendedResult,CollectSupportDataExtendedResult,DeliverOneTimePasswordExtendedResult,DeliverPasswordResetTokenExtendedResult,DeliverSingleUseTokenExtendedResult,EndBatchedTransactionExtendedResult,EndTransactionExtendedResult,GeneratePasswordExtendedResult,GenerateTOTPSharedSecretExtendedResult,GetBackupCompatibilityDescriptorExtendedResult,GetChangelogBatchExtendedResult,GetConfigurationExtendedResult,GetConnectionIDExtendedResult,GetPasswordQualityRequirementsExtendedResult,GetSubtreeAccessibilityExtendedResult,GetSupportedOTPDeliveryMechanismsExtendedResult,IdentifyBackupCompatibilityProblemsExtendedResult,ListConfigurationsExtendedResult,ListNotificationSubscriptionsExtendedResult,MultiUpdateExtendedResult,NoticeOfDisconnectionExtendedResult,PasswordModifyExtendedResult,PasswordPolicyStateExtendedResult,ReplaceCertificateExtendedResult,StartBatchedTransactionExtendedResult,StartTransactionExtendedResult,WhoAmIExtendedResult
@Extensible
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public class ExtendedResult
extends LDAPResult
This class provides a data structure for holding information about the result
of processing an extended operation. It includes all of the generic LDAP
result elements as described in the
LDAPResult class, but it may also
include the following elements:
- Response OID -- An optional OID that can be used to identify the type of response. This may be used if there can be different types of responses for a given request.
- Value -- An optional element that provides the encoded value for this response. If a value is provided, then the encoding for the value depends on the type of extended result.
- See Also:
-
Field Summary
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS -
Constructor Summary
ConstructorsModifierConstructorDescriptionExtendedResult(int messageID, ResultCode resultCode, String diagnosticMessage, String matchedDN, String[] referralURLs, String oid, ASN1OctetString value, Control[] responseControls) Creates a new extended result with the provided information.protectedExtendedResult(ExtendedResult extendedResult) Creates a new extended result initialized from all of the elements of the provided extended response.ExtendedResult(LDAPException exception) Creates a new extended result from the providedLDAPException.ExtendedResult(LDAPResult result) Creates a new extended result with the information contained in the provided LDAP result. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the user-friendly name for the extended result, if available.final StringgetOID()Retrieves the OID for this extended result, if available.final ASN1OctetStringgetValue()Retrieves the encoded value for this extended result, if available.final booleanhasValue()Indicates whether this extended result has a value.toString()Retrieves a string representation of this extended response.voidtoString(StringBuilder buffer) Appends a string representation of this extended response to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getOperationType, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl
-
Constructor Details
-
ExtendedResult
public ExtendedResult(int messageID, @NotNull ResultCode resultCode, @Nullable String diagnosticMessage, @Nullable String matchedDN, @Nullable String[] referralURLs, @Nullable String oid, @Nullable ASN1OctetString value, @Nullable Control[] responseControls) Creates a new extended result with the provided information.- Parameters:
messageID- The message ID for the LDAP message that is associated with this LDAP result.resultCode- The result code from the response.diagnosticMessage- The diagnostic message from the response, if available.matchedDN- The matched DN from the response, if available.referralURLs- The set of referral URLs from the response, if available.oid- The OID for this extended response, if available.value- The encoded value for this extended response, if available.responseControls- The set of controls from the response, if available.
-
ExtendedResult
Creates a new extended result with the information contained in the provided LDAP result. The extended result will not have an OID or value.- Parameters:
result- The LDAP result whose content should be used for this extended result.
-
ExtendedResult
Creates a new extended result from the providedLDAPException. The extended result will not have an OID or value.- Parameters:
exception- TheLDAPExceptionto use to create this extended result.
-
ExtendedResult
Creates a new extended result initialized from all of the elements of the provided extended response.- Parameters:
extendedResult- The extended response to use to initialize this extended response.
-
-
Method Details
-
getOID
Retrieves the OID for this extended result, if available.- Returns:
- The OID for this extended result, or
nullif none is available.
-
hasValue
Indicates whether this extended result has a value.- Returns:
trueif this extended result has a value, orfalseif not.
-
getValue
Retrieves the encoded value for this extended result, if available.- Returns:
- The encoded value for this extended result, or
nullif none is available.
-
getExtendedResultName
Retrieves the user-friendly name for the extended result, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, thennullwill be returned.- Returns:
- The user-friendly name for this extended request, the response OID
if a user-friendly name is not available but a response OID is, or
nullif neither a user-friendly name nor a response OID are available.
-
toString
Retrieves a string representation of this extended response.- Overrides:
toStringin classLDAPResult- Returns:
- A string representation of this extended response.
-
toString
Appends a string representation of this extended response to the provided buffer.- Specified by:
toStringin interfaceLDAPResponse- Overrides:
toStringin classLDAPResult- Parameters:
buffer- The buffer to which a string representation of this extended response will be appended.
-