Class AuthKey


  • public class AuthKey
    extends java.lang.Object
    Describes an item of authorization information required when connecting to a remote service. This will typically be something like username, password, etc.
    Since:
    18 Feb 2005
    Author:
    Mark Taylor (Starlink)
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthKey​(java.lang.String name)
      Constructs a new key with a given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDefault()
      Returns the default value for this key.
      java.lang.String getDescription()
      Returns the description of this key.
      java.lang.String getName()
      Returns the name of this key.
      boolean isHidden()
      Returns true if this key's value should be hidden.
      boolean isRequired()
      Indicates whether this key must have a non-null value.
      void setDefault​(java.lang.String dfault)
      Sets a default value for this key.
      void setDescription​(java.lang.String description)
      Sets the description of this key.
      void setHidden​(boolean hidden)
      Sets whether this key's value will be hidden.
      void setName​(java.lang.String name)
      Sets the name of this key.
      void setRequired​(boolean required)
      Sets whether this key must have a non-null value for a connection attempt to proceed.
      • Methods inherited from class java.lang.Object

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

      • AuthKey

        public AuthKey​(java.lang.String name)
        Constructs a new key with a given name.
        Parameters:
        name - name
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets the name of this key.
        Parameters:
        name - name
      • getName

        public java.lang.String getName()
        Returns the name of this key.
        Returns:
        name
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of this key. May be used as a tooltip or similar.
        Parameters:
        description - description
      • getDescription

        public java.lang.String getDescription()
        Returns the description of this key. May be used as a tooltip or similar.
        Returns:
        description
      • setDefault

        public void setDefault​(java.lang.String dfault)
        Sets a default value for this key.
        Parameters:
        dfault - default
      • getDefault

        public java.lang.String getDefault()
        Returns the default value for this key.
        Returns:
        default
      • setHidden

        public void setHidden​(boolean hidden)
        Sets whether this key's value will be hidden. Typically set true for password-type fields in which the display should not echo characters that are typed in.
        Parameters:
        hidden - true for fields whose values should not be shown
      • isHidden

        public boolean isHidden()
        Returns true if this key's value should be hidden. False by default.
        Returns:
        hidden attribute
      • setRequired

        public void setRequired​(boolean required)
        Sets whether this key must have a non-null value for a connection attempt to proceed.
        Parameters:
        required - true iff this key must have a value
      • isRequired

        public boolean isRequired()
        Indicates whether this key must have a non-null value. False by default.
        Returns:
        required attribute