Class PasswordException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.directory.ldap.client.template.exception.PasswordException
All Implemented Interfaces:
Serializable

public class PasswordException extends Exception
Thrown when an attempt to bind or modify a userPassword fails when using LdapConnectionTemplate.
Author:
Apache Directory Project
See Also:
  • Constructor Details

    • PasswordException

      public PasswordException()
      Creates a new PasswordException instance
    • PasswordException

      public PasswordException(String message)
      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