Class PasswordPolicyStateExtendedResult
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPResult
-
- com.unboundid.ldap.sdk.ExtendedResult
-
- com.unboundid.ldap.sdk.unboundidds.extensions.PasswordPolicyStateExtendedResult
-
- All Implemented Interfaces:
LDAPResponse
,java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class PasswordPolicyStateExtendedResult extends ExtendedResult
This class implements a data structure for storing the information from an extended result for the password policy state extended request as used in the Ping Identity, UnboundID, or Nokia/Alcatel-Lucent 8661 Directory Server. It is able to decode a generic extended result to obtain the user DN and operations. See the documentation in thePasswordPolicyStateExtendedRequest
class for an example that demonstrates the use of the password policy state extended operation.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
This extended result does not have an OID. If the request was processed successfully, then the result will have a value that has the same encoding as the request, which was described in the class-level documentation for thePasswordPolicyStateExtendedRequest
class.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
-
-
Constructor Summary
Constructors Constructor Description PasswordPolicyStateExtendedResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, java.lang.String userDN, PasswordPolicyStateOperation[] operations, Control[] responseControls)
Creates a new password policy state extended result with the provided information.PasswordPolicyStateExtendedResult(ExtendedResult extendedResult)
Creates a new password policy state extended result from the provided extended result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBooleanValue(int opType)
Retrieves the value of the specified password policy state operation as a boolean.java.lang.String
getExtendedResultName()
Retrieves the user-friendly name for the extended result, if available.java.util.Date
getGeneralizedTimeValue(int opType)
Retrieves the value for the specified password policy state operation as aDate
in generalized time format.java.util.Date[]
getGeneralizedTimeValues(int opType)
Retrieves the set of values for the specified password policy state operation asDate
s in generalized time format.int
getIntValue(int opType)
Retrieves the value of the specified password policy state operation as an integer.PasswordPolicyStateOperation
getOperation(int opType)
Retrieves the specified password policy state operation from the response.java.lang.Iterable<PasswordPolicyStateOperation>
getOperations()
Retrieves the set of password policy operations included in the response.java.lang.String
getStringValue(int opType)
Retrieves the value for the specified password policy state operation as a string.java.lang.String[]
getStringValues(int opType)
Retrieves the set of string values for the specified password policy state operation.java.lang.String
getUserDN()
Retrieves the user DN included in the response.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this extended result to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.ExtendedResult
getOID, getValue, hasValue, toString
-
Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getOperationType, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl
-
-
-
-
Constructor Detail
-
PasswordPolicyStateExtendedResult
public PasswordPolicyStateExtendedResult(ExtendedResult extendedResult) throws LDAPException
Creates a new password policy state extended result from the provided extended result.- Parameters:
extendedResult
- The extended result to be decoded as a password policy state extended result. It must not benull
.- Throws:
LDAPException
- If the provided extended result cannot be decoded as a password policy state extended result.
-
PasswordPolicyStateExtendedResult
public PasswordPolicyStateExtendedResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, java.lang.String userDN, PasswordPolicyStateOperation[] operations, Control[] responseControls)
Creates a new password policy state 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.userDN
- The user DN from the response.operations
- The set of operations from the response, mapped from operation type to the corresponding operation data.responseControls
- The set of controls from the response, if available.
-
-
Method Detail
-
getUserDN
public java.lang.String getUserDN()
Retrieves the user DN included in the response.- Returns:
- The user DN included in the response, or
null
if the user DN is not available (e.g., if this is an error response).
-
getOperations
public java.lang.Iterable<PasswordPolicyStateOperation> getOperations()
Retrieves the set of password policy operations included in the response.- Returns:
- The set of password policy operations included in the response.
-
getOperation
public PasswordPolicyStateOperation getOperation(int opType)
Retrieves the specified password policy state operation from the response.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The requested password policy state operation, or
null
if no such operation was included in the response.
-
getStringValue
public java.lang.String getStringValue(int opType)
Retrieves the value for the specified password policy state operation as a string.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The string value of the requested password policy state operation,
or
null
if the specified operation was not included in the response or did not have any values.
-
getStringValues
public java.lang.String[] getStringValues(int opType)
Retrieves the set of string values for the specified password policy state operation.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The set of string values for the requested password policy state
operation, or
null
if the specified operation was not included in the response.
-
getBooleanValue
public boolean getBooleanValue(int opType) throws java.util.NoSuchElementException, java.lang.IllegalStateException
Retrieves the value of the specified password policy state operation as a boolean.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The boolean value of the requested password policy state operation.
- Throws:
java.util.NoSuchElementException
- If the specified operation was not included in the response.java.lang.IllegalStateException
- If the specified password policy state operation does not have exactly one value, or if the value cannot be parsed as a boolean value.
-
getIntValue
public int getIntValue(int opType) throws java.util.NoSuchElementException, java.lang.IllegalStateException
Retrieves the value of the specified password policy state operation as an integer.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The integer value of the requested password policy state operation.
- Throws:
java.util.NoSuchElementException
- If the specified operation was not included in the response.java.lang.IllegalStateException
- If the value of the specified password policy state operation cannot be parsed as an integer value.
-
getGeneralizedTimeValue
public java.util.Date getGeneralizedTimeValue(int opType) throws java.text.ParseException
Retrieves the value for the specified password policy state operation as aDate
in generalized time format.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The value of the requested password policy state operation as a
Date
, ornull
if the specified operation was not included in the response or did not have any values. - Throws:
java.text.ParseException
- If the value cannot be parsed as a date in generalized time format.
-
getGeneralizedTimeValues
public java.util.Date[] getGeneralizedTimeValues(int opType) throws java.text.ParseException
Retrieves the set of values for the specified password policy state operation asDate
s in generalized time format.- Parameters:
opType
- The operation type for the password policy state operation to retrieve.- Returns:
- The set of values of the requested password policy state operation
as
Date
s. - Throws:
java.text.ParseException
- If any of the values cannot be parsed as a date in generalized time format.
-
getExtendedResultName
public java.lang.String 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, thennull
will be returned.- Overrides:
getExtendedResultName
in classExtendedResult
- 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
null
if neither a user-friendly name nor a response OID are available.
-
toString
public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this extended result to the provided buffer.- Specified by:
toString
in interfaceLDAPResponse
- Overrides:
toString
in classExtendedResult
- Parameters:
buffer
- The buffer to which a string representation of this extended result will be appended.
-
-