Class PasswordPolicyStateExtendedResult
- java.lang.Object
-
- org.forgerock.opendj.ldap.responses.AbstractExtendedResult<PasswordPolicyStateExtendedResult>
-
- com.forgerock.opendj.ldap.extensions.PasswordPolicyStateExtendedResult
-
- All Implemented Interfaces:
ExtendedResult,Response,Result
public final class PasswordPolicyStateExtendedResult extends AbstractExtendedResult<PasswordPolicyStateExtendedResult>
The password policy state extended result.
-
-
Constructor Summary
Constructors Constructor Description PasswordPolicyStateExtendedResult(ResultCode resultCode)Creates a new password policy state extended result with the provided result code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaddControl(Control control)Adds the provided control to this response.voidaddOperation(PasswordPolicyStateOperation operation)SaddReferralURI(String uri)Adds the provided referral URI to this result.booleancontainsControl(String oid)Returnstrueif this response contains the specified response control.ThrowablegetCause()Returns the throwable cause associated with this result if available.<C extends Control>
CgetControl(ControlDecoder<C> decoder, DecodeOptions options)Decodes and returns the first control in this response having an OID corresponding to the provided control decoder.List<Control>getControls()Returns aListcontaining the controls included with this response.StringgetDiagnosticMessage()Returns the diagnostic message associated with this result.StringgetMatchedDN()Returns the matched DN associated with this result.StringgetOID()Returns the numeric OID, if any, associated with this extended result.Iterable<PasswordPolicyStateOperation>getOperations()List<String>getReferralURIs()Returns aListcontaining the referral URIs included with this result.ResultCodegetResultCode()Returns the result code associated with this result.StringgetTargetUser()ByteStringgetValue()Returns the value, if any, associated with this extended result.booleanhasValue()Returnstrueif this extended result has a value.booleanisReferral()Indicates whether a referral needs to be chased in order to complete the operation.booleanisSuccess()Indicates whether the request succeeded or not.SsetCause(Throwable cause)Sets the throwable cause associated with this result if available.SsetDiagnosticMessage(String message)Sets the diagnostic message associated with this result.SsetMatchedDN(String dn)Sets the matched DN associated with this result.SsetResultCode(ResultCode resultCode)Sets the result code associated with this result.voidsetTargetUser(String targetUser)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.forgerock.opendj.ldap.responses.ExtendedResult
addControl, addReferralURI, getCause, getControl, getControls, getDiagnosticMessage, getMatchedDN, getReferralURIs, getResultCode, isReferral, isSuccess, setCause, setDiagnosticMessage, setMatchedDN, setResultCode
-
Methods inherited from interface org.forgerock.opendj.ldap.responses.Response
containsControl
-
-
-
-
Constructor Detail
-
PasswordPolicyStateExtendedResult
public PasswordPolicyStateExtendedResult(ResultCode resultCode)
Creates a new password policy state extended result with the provided result code.- Parameters:
resultCode- The result code.
-
-
Method Detail
-
addOperation
public void addOperation(PasswordPolicyStateOperation operation)
-
getOID
public String getOID()
Description copied from interface:ExtendedResultReturns the numeric OID, if any, associated with this extended result.- Specified by:
getOIDin interfaceExtendedResult- Specified by:
getOIDin classAbstractExtendedResult<PasswordPolicyStateExtendedResult>- Returns:
- The numeric OID associated with this extended result, or
nullif there is no OID.
-
getOperations
public Iterable<PasswordPolicyStateOperation> getOperations()
-
getTargetUser
public String getTargetUser()
-
getValue
public ByteString getValue()
Description copied from interface:ExtendedResultReturns the value, if any, associated with this extended result. Its format is defined by the specification of this extended result.- Specified by:
getValuein interfaceExtendedResult- Specified by:
getValuein classAbstractExtendedResult<PasswordPolicyStateExtendedResult>- Returns:
- The value associated with this extended result, or
nullif there is no value.
-
hasValue
public boolean hasValue()
Description copied from interface:ExtendedResultReturnstrueif 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.- Specified by:
hasValuein interfaceExtendedResult- Specified by:
hasValuein classAbstractExtendedResult<PasswordPolicyStateExtendedResult>- Returns:
trueif this extended result has a value, orfalseif there is no value.
-
setTargetUser
public void setTargetUser(String targetUser)
-
toString
public String toString()
- Overrides:
toStringin classAbstractExtendedResult<PasswordPolicyStateExtendedResult>
-
addReferralURI
public final S addReferralURI(String uri)
Description copied from interface:ResultAdds the provided referral URI to this result.- Specified by:
addReferralURIin interfaceResult- Parameters:
uri- The referral URI to be added.- Returns:
- This result.
-
getCause
public final Throwable getCause()
Description copied from interface:ResultReturns 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.
-
getDiagnosticMessage
public final String getDiagnosticMessage()
Description copied from interface:ResultReturns the diagnostic message associated with this result.- Specified by:
getDiagnosticMessagein interfaceResult- Returns:
- The diagnostic message, which may be empty if none was provided
(never
null).
-
getMatchedDN
public final String getMatchedDN()
Description copied from interface:ResultReturns the matched DN associated with this result.- Specified by:
getMatchedDNin interfaceResult- Returns:
- The matched DN, which may be empty if none was provided (never
null).
-
getReferralURIs
public final List<String> getReferralURIs()
Description copied from interface:ResultReturns aListcontaining the referral URIs included with this result. The returnedListmay be modified if permitted by this result.- Specified by:
getReferralURIsin interfaceResult- Returns:
- A
Listcontaining the referral URIs.
-
getResultCode
public final ResultCode getResultCode()
Description copied from interface:ResultReturns the result code associated with this result.- Specified by:
getResultCodein interfaceResult- Returns:
- The result code.
-
isReferral
public final boolean isReferral()
Description copied from interface:ResultIndicates whether a referral needs to be chased in order to complete the operation.Specifically, this method returns
trueif the result code is equal toResultCode.REFERRAL.- Specified by:
isReferralin interfaceResult- Returns:
trueif a referral needs to be chased, otherwisefalse.
-
isSuccess
public final boolean isSuccess()
Description copied from interface:ResultIndicates whether the request succeeded or not. This method will return {code true} for all non-error responses.
-
setCause
public final S setCause(Throwable cause)
Description copied from interface:ResultSets 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.
-
setDiagnosticMessage
public final S setDiagnosticMessage(String message)
Description copied from interface:ResultSets the diagnostic message associated with this result.- Specified by:
setDiagnosticMessagein interfaceResult- Parameters:
message- The diagnostic message, which may be empty ornullindicating that none was provided.- Returns:
- This result.
-
setMatchedDN
public final S setMatchedDN(String dn)
Description copied from interface:ResultSets the matched DN associated with this result.- Specified by:
setMatchedDNin interfaceResult- Parameters:
dn- The matched DN associated, which may be empty ornullindicating that none was provided.- Returns:
- This result.
-
setResultCode
public final S setResultCode(ResultCode resultCode)
Description copied from interface:ResultSets the result code associated with this result.- Specified by:
setResultCodein interfaceResult- Parameters:
resultCode- The result code.- Returns:
- This result.
-
addControl
public final S addControl(Control control)
Description copied from interface:ResponseAdds the provided control to this response.- Specified by:
addControlin interfaceResponse- Parameters:
control- The control to be added.- Returns:
- This response.
-
containsControl
public boolean containsControl(String oid)
Description copied from interface:ResponseReturnstrueif this response contains the specified response control.- Specified by:
containsControlin interfaceResponse- Parameters:
oid- The numeric OID of the response control.- Returns:
trueif this response contains the specified response control.
-
getControl
public final <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
Description copied from interface:ResponseDecodes and returns the first control in this response having an OID corresponding to the provided control decoder.- Specified by:
getControlin interfaceResponse- Type Parameters:
C- The type of control to be decoded and returned.- Parameters:
decoder- The control decoder.options- The set of decode options which should be used when decoding the control.- Returns:
- The decoded control, or
nullif the control is not included with this response. - Throws:
DecodeException- 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).
-
getControls
public final List<Control> getControls()
Description copied from interface:ResponseReturns aListcontaining the controls included with this response. The returnedListmay be modified if permitted by this response.- Specified by:
getControlsin interfaceResponse- Returns:
- A
Listcontaining the controls.
-
-