Class StringValueConverter
java.lang.Object
com.xebialabs.deployit.repository.StringValueConverter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStringValueConverter(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter) -
Method Summary
Modifier and TypeMethodDescriptionconvert(StringValue v, boolean keepPlainAsIs) Convert a StringValue to its public representation.static final Function<String, StringValue> stringToValue(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter) static final Function<StringValue, String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter) static final Function<StringValue, String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter, boolean fallbackEncrypted)
-
Field Details
-
ENCRYPTED_PREFIX
- See Also:
-
PLAIN_PREFIX
- See Also:
-
SUFFIX
- See Also:
-
-
Constructor Details
-
StringValueConverter
public StringValueConverter(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)
-
-
Method Details
-
valueToString
public static final Function<StringValue,String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter) -
valueToString
public static final Function<StringValue,String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter, boolean fallbackEncrypted) -
stringToValue
public static final Function<String,StringValue> stringToValue(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter) -
convert
Convert a StringValue to its public representation. For anEncryptedStringValuethis means that the value will be encrypted. For a plaintextStringValueit adds a prefix/suffix to the string if the boolean keepPlainAsIs is set totrue, the plaintext is output as is.- Parameters:
v- theStringValueto convertkeepPlainAsIs-trueto keep the plainText as is,falseto add a special prefix/suffix to clearly demarcate the value.- Returns:
- The converted String.
-
convert
-
convert
-