@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class GeneratedPassword extends java.lang.Object implements java.io.Serializable
GeneratePasswordExtendedResult
.
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.
Constructor and Description |
---|
GeneratedPassword(byte[] password,
boolean validationAttempted,
java.util.List<java.lang.String> validationErrors)
Creates a generated password object with the provided information.
|
GeneratedPassword(java.lang.String password,
boolean validationAttempted,
java.util.List<java.lang.String> validationErrors)
Creates a generated password object with the provided information.
|
Modifier and Type | Method and Description |
---|---|
static GeneratedPassword |
decode(ASN1Element element)
Decodes the provided ASN.1 element as a generated password object.
|
ASN1Sequence |
encode()
Encodes this generated password to a sequence suitable for inclusion in the
value of a
GeneratePasswordExtendedResult . |
byte[] |
getPasswordBytes()
Retrieves the bytes that comprise the server-generated password.
|
java.lang.String |
getPasswordString()
Retrieves a string representation of the server-generated password.
|
java.util.List<java.lang.String> |
getValidationErrors()
Retrieves a list of problems identified while the server was validating the
quality of the generated password.
|
java.lang.String |
toString()
Retrieves a string representation of this generated password object.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this generated password object to the
provided buffer.
|
boolean |
validationAttempted()
Indicates whether the server attempted to validate the quality of the
generated password.
|
public GeneratedPassword(java.lang.String password, boolean validationAttempted, java.util.List<java.lang.String> validationErrors)
password
- The password that was generated. It must not
be @code null} or empty.validationAttempted
- Indicates whether the server attempted to
validate the quality of the generated
password.validationErrors
- An optional list of messages with information
about any problems identified while the
server was validating the quality of the
generated password.public GeneratedPassword(byte[] password, boolean validationAttempted, java.util.List<java.lang.String> validationErrors)
password
- The password that was generated. It must not
be @code null} or empty.validationAttempted
- Indicates whether the server attempted to
validate the quality of the generated
password.validationErrors
- An optional list of messages with information
about any problems identified while the
server was validating the quality of the
generated password.public java.lang.String getPasswordString()
public byte[] getPasswordBytes()
public boolean validationAttempted()
true
if the server attempted to validate the quality of
the generated password, or false
if not.public java.util.List<java.lang.String> getValidationErrors()
public ASN1Sequence encode()
GeneratePasswordExtendedResult
.public static GeneratedPassword decode(ASN1Element element) throws LDAPException
element
- The ASN.1 element to be decoded. It must not be
null
.LDAPException
- If a problem is encountered while decoding the
provided element as a generated password.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be appended.