- java.lang.Object
-
- com.pervasive.datarush.io.configuration.ConfigurationField
-
- com.pervasive.datarush.io.configuration.PasswordField
-
public final class PasswordField extends ConfigurationField
AConfigurationField
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:
ConfigurationField
-
-
Constructor Summary
Constructors Constructor Description PasswordField(String fieldName)
Creates a new password field with an empty password valuePasswordField(String fieldName, Password fieldValue)
Create a new password fieldPasswordField(String fieldName, String fieldValue)
Create a new password field with the specified password value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Password
getFieldValue()
Returns the password.PasswordField
withValue(Password fieldValue)
Creates a new field, equivalent to this, but with the value set to the specified value.PasswordField
withValue(String fieldValue)
Creates a new field, equivalent to this, but with the value set to the specified value.-
Methods inherited from class com.pervasive.datarush.io.configuration.ConfigurationField
getFieldName
-
-
-
-
Constructor Detail
-
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 fieldfieldValue
- 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 fieldfieldValue
- the clear text password- Throws:
IllegalArgumentException
- if fieldName is null or empty or if fieldValue is null (fieldValue may be empty though)
-
-
Method Detail
-
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)
-
-