Class PasswordField
java.lang.Object
com.inet.taskplanner.server.api.field.Field
com.inet.taskplanner.server.api.field.PasswordField
A field that allows the definition of a password.
- Since:
- taskplanner 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionPasswordField(String key, String label) Creates the field for setting a password. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodePassword(String encodedPassword) Decodes the given encrypted password and returns the plain-text string.static StringencodePassword(String plainPassword) Encodes the given plain-text password with strong internal encryption.static PasswordFieldpasswordFieldAsTextArea(String key, String label, String placeholderIfValueSet) Creates the field for setting a password as a text area that displays the value only when it is created.Methods inherited from class Field
getConditions, getKey, getLabel, getPlaceholder, getType, getValue, isUpdateValuesOnChange, isValueSavable, patchResultPlaceholderInValue, patchSeriesPlaceholderInValue, replaceSeriesPlaceholders, setConditions, setKey, setLabel, setPlaceholder, setType, setType, setUpdateValuesOnChange, setValue, setValueSavable
-
Constructor Details
-
PasswordField
-
-
Method Details
-
passwordFieldAsTextArea
public static PasswordField passwordFieldAsTextArea(String key, String label, String placeholderIfValueSet) Creates the field for setting a password as a text area that displays the value only when it is created.- Parameters:
key- the key of the fieldlabel- the label to be displayed in front of the fieldplaceholderIfValueSet- a placeholder for the case that there is a value already set- Returns:
- the password field model
- Since:
- taskplanner 21.0
-
encodePassword
Encodes the given plain-text password with strong internal encryption.- Parameters:
plainPassword- the password to be encrypted- Returns:
- the encoded password
- Throws:
IOException- if the encryption failed due to an error- Since:
- taskplanner 3.0
-
decodePassword
Decodes the given encrypted password and returns the plain-text string.- Parameters:
encodedPassword- the encrypted password to be decoded- Returns:
- the decoded password
- Throws:
IOException- if the decryption failed due to an error- Since:
- taskplanner 3.0
-