Class StringValueConverter
- java.lang.Object
-
- com.xebialabs.deployit.repository.StringValueConverter
-
public class StringValueConverter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENCRYPTED_PREFIXstatic java.lang.StringPLAIN_PREFIXstatic java.lang.StringSUFFIX
-
Constructor Summary
Constructors Constructor Description StringValueConverter(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringconvert(StringValue v, boolean keepPlainAsIs)Convert a StringValue to its public representation.StringValueconvert(java.lang.String s)StringValueconvert(java.lang.String s, boolean fallbackEncrypted)static java.util.function.Function<java.lang.String,StringValue>stringToValue(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)static java.util.function.Function<StringValue,java.lang.String>valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)static java.util.function.Function<StringValue,java.lang.String>valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter, boolean fallbackEncrypted)
-
-
-
Field Detail
-
ENCRYPTED_PREFIX
public static final java.lang.String ENCRYPTED_PREFIX
- See Also:
- Constant Field Values
-
PLAIN_PREFIX
public static final java.lang.String PLAIN_PREFIX
- See Also:
- Constant Field Values
-
SUFFIX
public static final java.lang.String SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
valueToString
public static final java.util.function.Function<StringValue,java.lang.String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)
-
valueToString
public static final java.util.function.Function<StringValue,java.lang.String> valueToString(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter, boolean fallbackEncrypted)
-
stringToValue
public static final java.util.function.Function<java.lang.String,StringValue> stringToValue(com.xebialabs.deployit.util.PasswordEncrypter passwordEncrypter)
-
convert
public java.lang.String convert(StringValue v, boolean keepPlainAsIs)
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
public StringValue convert(java.lang.String s)
-
convert
public StringValue convert(java.lang.String s, boolean fallbackEncrypted)
-
-