public final class PasswordField extends ConfigurationField
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.ConfigurationField
Constructor and Description |
---|
PasswordField(String fieldName)
Creates a new password field with an empty password value
|
PasswordField(String fieldName,
Password fieldValue)
Create a new password field
|
PasswordField(String fieldName,
String fieldValue)
Create a new password field with the specified password value
|
Modifier and Type | Method and 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.
|
getFieldName
public PasswordField(String fieldName) throws IllegalArgumentException
fieldName
- the name of the fieldIllegalArgumentException
- if fieldName is null or emptypublic PasswordField(String fieldName, String fieldValue) throws IllegalArgumentException
fieldName
- the unique identifier for this fieldfieldValue
- the clear text passwordIllegalArgumentException
- if fieldName is null or empty or if fieldValue is null (fieldValue may be empty though)public PasswordField(String fieldName, Password fieldValue) throws IllegalArgumentException
fieldName
- the unique identifier for this fieldfieldValue
- the clear text passwordIllegalArgumentException
- if fieldName is null or empty or if fieldValue is null (fieldValue may be empty though)public Password getFieldValue()
public PasswordField withValue(Password fieldValue) throws IllegalArgumentException
fieldValue
- the new valueIllegalArgumentException
- if value is null (may be empty though)public PasswordField withValue(String fieldValue)
fieldValue
- the new valueIllegalArgumentException
- if value is null (may be empty though)Copyright © 2016 Actian Corporation. All rights reserved.