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 String
decodePassword
(String encodedPassword) Decodes the given encrypted password and returns the plain stringstatic String
encodePassword
(String plainPassword) Encodes the given plain password with an internal strong encryptionstatic PasswordField
passwordFieldAsTextArea
(String key, String label, String placeholderIfValueSet) Creates the field for setting a password - as textarea, which displays the value only when being createdMethods inherited from class com.inet.taskplanner.server.api.field.Field
getConditions, getKey, getLabel, getPlaceholder, getType, getValue, isUpdateValuesOnChange, isValueSavable, patchResultPlaceholderInValue, patchSeriesPlaceholderInValue, replaceSeriesPlaceholders, setConditions, setKey, setLabel, setPlaceholder, setType, setType, setUpdateValuesOnChange, setValue, setValueSavable
-
Constructor Details
-
PasswordField
Creates the field for setting a password- Parameters:
key
- the key of the fieldlabel
- the label to be displayed in front of the field- Since:
- taskplanner 3.0
-
-
Method Details
-
passwordFieldAsTextArea
public static PasswordField passwordFieldAsTextArea(String key, String label, String placeholderIfValueSet) Creates the field for setting a password - as textarea, which displays the value only when being 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 password with an internal strong 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 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
-