Class PasswordException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.directory.ldap.client.template.exception.PasswordException
- All Implemented Interfaces:
Serializable
Thrown when an attempt to bind or modify a userPassword fails when using
LdapConnectionTemplate.
- Author:
- Apache Directory Project
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PasswordException instancePasswordException(String message) Creates a new PasswordException instance -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.directory.api.ldap.model.exception.LdapExceptionIf an LdapException was thrown causing this exception, that LdapException is returned.org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyErrorEnumReturns the password policy error code if present, otherwise null.org.apache.directory.api.ldap.model.message.ResultCodeEnumReturns the result code from the attempt to bind or modify the userPassword.setLdapException(org.apache.directory.api.ldap.model.exception.LdapException ldapException) Sets the wrapped exceptionsetPasswordPolicyError(org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyErrorEnum passwordPolicyError) Set the Password Policy errorsetResultCode(org.apache.directory.api.ldap.model.message.ResultCodeEnum resultCode) Sets the LDAP Result codeMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PasswordException
public PasswordException()Creates a new PasswordException instance -
PasswordException
Creates a new PasswordException instance- Parameters:
message- The message to store
-
-
Method Details
-
getLdapException
public org.apache.directory.api.ldap.model.exception.LdapException getLdapException()If an LdapException was thrown causing this exception, that LdapException is returned. Otherwise null is returned.- Returns:
- The LdapException that was thrown, or null.
-
getResultCode
public org.apache.directory.api.ldap.model.message.ResultCodeEnum getResultCode()Returns the result code from the attempt to bind or modify the userPassword.- Returns:
- The result code.
-
getPasswordPolicyError
public org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyErrorEnum getPasswordPolicyError()Returns the password policy error code if present, otherwise null.- Returns:
- The password policy error code or null.
-
setLdapException
public PasswordException setLdapException(org.apache.directory.api.ldap.model.exception.LdapException ldapException) Sets the wrapped exception- Parameters:
ldapException- The wrapped exception- Returns:
- The wrapping exception
-
setPasswordPolicyError
public PasswordException setPasswordPolicyError(org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyErrorEnum passwordPolicyError) Set the Password Policy error- Parameters:
passwordPolicyError- The Password Policy error- Returns:
- The wrapping exception
-
setResultCode
public PasswordException setResultCode(org.apache.directory.api.ldap.model.message.ResultCodeEnum resultCode) Sets the LDAP Result code- Parameters:
resultCode- The LDAP error code- Returns:
- The wrapping exception
-