Class PasswordField

java.lang.Object
com.pervasive.datarush.io.configuration.ConfigurationField
com.pervasive.datarush.io.configuration.PasswordField

public final class PasswordField extends ConfigurationField
A ConfigurationField that consists of secret information. When prompting the user for fields of this type, the user interface should obscure the users entry. In addition, when fields of this type are serialized, the user's entry is encrypted.
See Also:
  • Constructor Details

    • PasswordField

      public PasswordField(String fieldName) throws IllegalArgumentException
      Creates a new password field with an empty password value
      Parameters:
      fieldName - the name of the field
      Throws:
      IllegalArgumentException - if fieldName is null or empty
    • PasswordField

      public PasswordField(String fieldName, String fieldValue) throws IllegalArgumentException
      Create a new password field with the specified password value
      Parameters:
      fieldName - the unique identifier for this field
      fieldValue - the clear text password
      Throws:
      IllegalArgumentException - if fieldName is null or empty or if fieldValue is null (fieldValue may be empty though)
    • PasswordField

      public PasswordField(String fieldName, Password fieldValue) throws IllegalArgumentException
      Create a new password field
      Parameters:
      fieldName - the unique identifier for this field
      fieldValue - the clear text password
      Throws:
      IllegalArgumentException - if fieldName is null or empty or if fieldValue is null (fieldValue may be empty though)
  • Method Details

    • getFieldValue

      public Password getFieldValue()
      Returns the password.
      Returns:
      the password.
    • withValue

      public PasswordField withValue(Password fieldValue) throws IllegalArgumentException
      Creates a new field, equivalent to this, but with the value set to the specified value.
      Parameters:
      fieldValue - the new value
      Returns:
      a new field with its settings modified
      Throws:
      IllegalArgumentException - if value is null (may be empty though)
    • withValue

      public PasswordField withValue(String fieldValue)
      Creates a new field, equivalent to this, but with the value set to the specified value.
      Parameters:
      fieldValue - the new value
      Returns:
      a new field with its settings modified
      Throws:
      IllegalArgumentException - if value is null (may be empty though)