Package org.opends.server.controls
Class PasswordPolicyResponseControl
- java.lang.Object
-
- org.opends.server.types.Control
-
- org.opends.server.controls.PasswordPolicyResponseControl
-
public class PasswordPolicyResponseControl extends Control
This class implements the password policy response control defined in draft-behera-ldap-password-policy. The value may have zero, one, or two elements, which may include flags to indicate a warning and/or an error.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<PasswordPolicyResponseControl>DECODERThe Control Decoder that can be used to decode this control.static byteTYPE_ERROR_ELEMENTThe BER type value for the error element of the control value.static byteTYPE_WARNING_ELEMENTThe BER type value for the warning element of the control value.
-
Constructor Summary
Constructors Constructor Description PasswordPolicyResponseControl()Creates a new instance of the password policy response control with the default OID and criticality, and without either a warning or an error flag.PasswordPolicyResponseControl(boolean isCritical, PasswordPolicyWarningType warningType, int warningValue, PasswordPolicyErrorType errorType)Creates a new instance of the password policy request control with the provided information.PasswordPolicyResponseControl(PasswordPolicyWarningType warningType, int warningValue, PasswordPolicyErrorType errorType)Creates a new instance of this password policy response control with the default OID and criticality, and with the provided warning and/or error flag information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordPolicyErrorTypegetErrorType()Retrieves the password policy error type contained in this control.PasswordPolicyWarningTypegetWarningType()Retrieves the password policy warning type contained in this control.intgetWarningValue()Retrieves the password policy warning value for this control.voidtoString(StringBuilder buffer)Appends a string representation of this control to the provided buffer.protected voidwriteValue(ASN1Writer writer)Writes this control's value to an ASN.1 writer.-
Methods inherited from class org.opends.server.types.Control
getOID, isCritical, toString, write
-
-
-
-
Field Detail
-
DECODER
public static final ControlDecoder<PasswordPolicyResponseControl> DECODER
The Control Decoder that can be used to decode this control.
-
TYPE_WARNING_ELEMENT
public static final byte TYPE_WARNING_ELEMENT
The BER type value for the warning element of the control value.- See Also:
- Constant Field Values
-
TYPE_ERROR_ELEMENT
public static final byte TYPE_ERROR_ELEMENT
The BER type value for the error element of the control value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PasswordPolicyResponseControl
public PasswordPolicyResponseControl()
Creates a new instance of the password policy response control with the default OID and criticality, and without either a warning or an error flag.
-
PasswordPolicyResponseControl
public PasswordPolicyResponseControl(PasswordPolicyWarningType warningType, int warningValue, PasswordPolicyErrorType errorType)
Creates a new instance of this password policy response control with the default OID and criticality, and with the provided warning and/or error flag information.- Parameters:
warningType- The warning type to use for this password policy response control, ornullif there should not be a warning flag.warningValue- The warning value to use for this password policy response control, if applicable.errorType- The error type to use for this password policy response control, ornullif there should not be an error flag.
-
PasswordPolicyResponseControl
public PasswordPolicyResponseControl(boolean isCritical, PasswordPolicyWarningType warningType, int warningValue, PasswordPolicyErrorType errorType)Creates a new instance of the password policy request control with the provided information.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the client processing.warningType- The warning type to use for this password policy response control, ornullif there should not be a warning flag.warningValue- The warning value to use for this password policy response control, if applicable.errorType- The error type to use for this password policy response control, ornullif there should not be an error flag.
-
-
Method Detail
-
writeValue
protected void writeValue(ASN1Writer writer) throws IOException
Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.- Specified by:
writeValuein classControl- Parameters:
writer- The ASN.1 writer to use.- Throws:
IOException- If a problem occurs while writing to the stream.
-
getWarningType
public PasswordPolicyWarningType getWarningType()
Retrieves the password policy warning type contained in this control.- Returns:
- The password policy warning type contained in this control, or
nullif there is no warning type.
-
getWarningValue
public int getWarningValue()
Retrieves the password policy warning value for this control. The value is undefined if there is no warning type.- Returns:
- The password policy warning value for this control.
-
getErrorType
public PasswordPolicyErrorType getErrorType()
Retrieves the password policy error type contained in this control.- Returns:
- The password policy error type contained in this control, or
nullif there is no error type.
-
toString
public void toString(StringBuilder buffer)
Description copied from class:ControlAppends a string representation of this control to the provided buffer.
-
-