Class StringConfigSourceBuilder


  • public final class StringConfigSourceBuilder
    extends SourceBuilder<StringConfigSourceBuilder,​StringConfigSource>
    ConfigSourceBuilder for the String Config Source.

    Load a config source from a String. The string must be in the format provided, so if a property file it would be db.port = 1234 db.password = password dp.user = notroot

    If the format is json the string would be { db { "port" = 1234 "password" = "password" "user" = "notroot" }. }

    A format for the data in the string must also be provided.

    • Method Detail

      • getConfig

        public java.lang.String getConfig()
        Get the string based config source.
        Returns:
        the string based config source
      • setConfig

        public StringConfigSourceBuilder setConfig​(java.lang.String config)
        Set the string based config source.
        Parameters:
        config - the string based config source.
        Returns:
        the builder
      • getFormat

        public java.lang.String getFormat()
        Get the format the String Based Config source represents.
        Returns:
        the format the String Based Config source represents.
      • setFormat

        public StringConfigSourceBuilder setFormat​(java.lang.String format)
        Set the format the String Based Config source represents.
        Parameters:
        format - the format the String Based Config source represents.
        Returns:
        the builder