Class CredentialItem

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String promptText  
      private boolean valueSecure  
    • Constructor Summary

      Constructors 
      Constructor Description
      CredentialItem​(java.lang.String promptText, boolean maskValue)
      Initialize a prompt.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void clear()
      Clear the stored value, destroying it as much as possible.
      java.lang.String getPromptText()
      Get prompt to display to the user.
      boolean isValueSecure()
      Whether the value should be masked when entered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • promptText

        private final java.lang.String promptText
      • valueSecure

        private final boolean valueSecure
    • Constructor Detail

      • CredentialItem

        public CredentialItem​(java.lang.String promptText,
                              boolean maskValue)
        Initialize a prompt.
        Parameters:
        promptText - prompt to display to the user alongside of the input field. Should be sufficient text to indicate what to supply for this item.
        maskValue - true if the value should be masked from displaying during input. This should be true for passwords and other secrets, false for names and other public data.
    • Method Detail

      • getPromptText

        public java.lang.String getPromptText()
        Get prompt to display to the user.
        Returns:
        prompt to display to the user.
      • isValueSecure

        public boolean isValueSecure()
        Whether the value should be masked when entered.
        Returns:
        true if the value should be masked when entered.
      • clear

        public abstract void clear()
        Clear the stored value, destroying it as much as possible.