com.ibm.passwordrules

Class InvalidPasswordException

    • Constructor Detail

      • InvalidPasswordException

        public InvalidPasswordException(Rule ruleViolated)
        Construct an invalid password exception with the rule that was violated.
        Parameters:
        ruleViolated - The rule the password violates.
      • InvalidPasswordException

        public InvalidPasswordException(Rule ruleViolated,
                                        java.lang.String reason)
        Construct an invalid password exception with the rule that was violated and the reason for the violation.
        Parameters:
        ruleViolated - The rule the password violates.
        reason - Reason for the violation.
      • InvalidPasswordException

        public InvalidPasswordException(Rule ruleViolated,
                                        java.lang.String reason,
                                        java.util.Collection<InvalidPasswordException> composingExceptions)
        Construct an invalid password exception with the rule that was violated and the reason for the violation.
        Parameters:
        ruleViolated - The rule the password violates.
        reason - Reason for the violation.
    • Method Detail

      • getRuleViolated

        public Rule getRuleViolated()
        Returns the rule that was violated to generate this exception.
        Returns:
        violated rule
      • getReason

        public java.lang.String getReason()
        Gets the reason that the password violated the given rule. May be an empty string indicating that no reason was given.
        Returns:
        reason for violation. Constant representing a error message key in a property file.
      • setComposingExceptions

        public void setComposingExceptions(java.util.Collection<InvalidPasswordException> composingExceptions)