Class AbstractPasswordRule

    • Constructor Detail

      • AbstractPasswordRule

        protected AbstractPasswordRule​(PasswordRuleType passwordRuleType)
    • Method Detail

      • isRequired

        public boolean isRequired()
        Description copied from interface: PasswordRule
        Indicates if the rule is required.
        Specified by:
        isRequired in interface PasswordRule
        Returns:
      • isCombined

        public boolean isCombined()
        Description copied from interface: PasswordRule
        Indicates if the rule is combined one.
        Specified by:
        isCombined in interface PasswordRule
        Returns:
      • random

        protected int random​(int maxValue)
        Returns a random integer value included between 0 and (given maxValue - 1).
        Returns:
      • getString

        protected String getString​(String key,
                                   String language,
                                   String... params)
        Gets a string message according to the given language.
        Parameters:
        key -
        language -
        params -
        Returns:
      • getIntegerFromSettings

        protected Integer getIntegerFromSettings​(String key,
                                                 Integer defaultValue)
        Gets an integer from settings
        Parameters:
        key -
        defaultValue -
        Returns:
      • countRegexOccur

        protected int countRegexOccur​(String text,
                                      String regex)
        Counting regexpr occurences in a String
        Parameters:
        text -
        regex -
        Returns: