Class StringValueConverter

java.lang.Object
com.xebialabs.deployit.repository.StringValueConverter

public class StringValueConverter extends Object
  • Field Details

  • 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

      public String convert(StringValue v, boolean keepPlainAsIs)
      Convert a StringValue to its public representation. For an EncryptedStringValue this means that the value will be encrypted. For a plaintext StringValue it adds a prefix/suffix to the string if the boolean keepPlainAsIs is set to true, the plaintext is output as is.
      Parameters:
      v - the StringValue to convert
      keepPlainAsIs - true to keep the plainText as is, false to add a special prefix/suffix to clearly demarcate the value.
      Returns:
      The converted String.
    • convert

      public StringValue convert(String s)
    • convert

      public StringValue convert(String s, boolean fallbackEncrypted)