Class SecretHintBuilderImpl

    • Constructor Detail

      • SecretHintBuilderImpl

        public SecretHintBuilderImpl()
    • Method Detail

      • setText

        public void setText​(java.lang.String... aText)
        Sets the text for the text property.
        Specified by:
        setText in interface TextAccessor.TextMutator
        Parameters:
        aText - The text to be stored by the text property.
      • toStrings

        public java.lang.String[] toStrings()
        The Strings being build by the builder upon the settings of the attributes.
        Specified by:
        toStrings in interface TextAccessor.TextProvider
        Returns:
        The according resulting String array
      • toString

        protected static java.lang.String toString​(java.lang.String aSecret)
        This method provides a password hint by keeping the first and the last characters of the password and exchanging the rest by an asterisk "*". In case the password length is smaller than 10 characters, then the complete password is replaced by asterisk "*" characters. ------------------------------------------------------------------------- CAUTION: This method must only be used when being in development environments and a password hint is required in debug log methods to see whether the correct password is being configured.
        Parameters:
        aSecret - The secret to be printed
        Returns:
        The printable secret
      • getText

        public java.lang.String[] getText()
        Retrieves the text from the text property.
        Specified by:
        getText in interface TextAccessor
        Returns:
        The text stored by the text property.
      • withText

        public B withText​(java.lang.String... aText)
        With text.
        Specified by:
        withText in interface Text<B extends Text<B>>
        Specified by:
        withText in interface TextAccessor.TextBuilder<B extends Text<B>>
        Parameters:
        aText - the text
        Returns:
        the b
      • withText

        public B withText​(java.util.Collection<java.lang.String> aText)
        With text.
        Specified by:
        withText in interface TextAccessor.TextBuilder<B extends Text<B>>
        Parameters:
        aText - the text
        Returns:
        the b
      • toString

        public java.lang.String toString()
        The String being build by the builder upon the settings of the attributes. In case more then one line has been set as input and the functionality of the builder is applied to each line in separate, then this method returns all of them lines concatenated with a line break between each of them (implementation depended).
        Specified by:
        toString in interface TextAccessor.TextProvider
        Overrides:
        toString in class java.lang.Object
        Returns:
        The according resulting String