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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PasswordException()Creates a new PasswordException instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LdapExceptiongetLdapException()If an LdapException was thrown causing this exception, that LdapException is returned.PasswordPolicyErrorEnumgetPasswordPolicyError()Returns the password policy error code if present, otherwise null.ResultCodeEnumgetResultCode()Returns the result code from the attempt to bind or modify the userPassword.PasswordExceptionsetLdapException(LdapException ldapException)Sets the wrapped exceptionPasswordExceptionsetPasswordPolicyError(PasswordPolicyErrorEnum passwordPolicyError)Set the Password Policy errorPasswordExceptionsetResultCode(ResultCodeEnum resultCode)Sets the LDAP Result code-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getLdapException
public 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 ResultCodeEnum getResultCode()
Returns the result code from the attempt to bind or modify the userPassword.- Returns:
- The result code.
-
getPasswordPolicyError
public PasswordPolicyErrorEnum getPasswordPolicyError()
Returns the password policy error code if present, otherwise null.- Returns:
- The password policy error code or null.
-
setLdapException
public PasswordException setLdapException(LdapException ldapException)
Sets the wrapped exception- Parameters:
ldapException- The wrapped exception- Returns:
- The wrapping exception
-
setPasswordPolicyError
public PasswordException setPasswordPolicyError(PasswordPolicyErrorEnum passwordPolicyError)
Set the Password Policy error- Parameters:
passwordPolicyError- The Password Policy error- Returns:
- The wrapping exception
-
setResultCode
public PasswordException setResultCode(ResultCodeEnum resultCode)
Sets the LDAP Result code- Parameters:
resultCode- The LDAP error code- Returns:
- The wrapping exception
-
-