Module org.github.gestalt.core
Package org.github.gestalt.config.source
Class SystemPropertiesConfigSourceBuilder
- java.lang.Object
-
- org.github.gestalt.config.builder.SourceBuilder<SystemPropertiesConfigSourceBuilder,SystemPropertiesConfigSource>
-
- org.github.gestalt.config.source.SystemPropertiesConfigSourceBuilder
-
public final class SystemPropertiesConfigSourceBuilder extends SourceBuilder<SystemPropertiesConfigSourceBuilder,SystemPropertiesConfigSource>
ConfigSourceBuilder for the System Properties Config Source.Convert the System properties into a config source.
-
-
Field Summary
-
Fields inherited from class org.github.gestalt.config.builder.SourceBuilder
configReloadStrategies, source, tags
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigSourcePackagebuild()Build the ConfigSourcePackage with the config source, tags and any reload strategies.static SystemPropertiesConfigSourceBuilderbuilder()Static function to create the builder.booleanfailOnErrors()Get if we should fail on errors for the config source.SystemPropertiesConfigSourceBuildersetFailOnErrors(boolean failOnErrors)Set if we should fail on errors for the config source.-
Methods inherited from class org.github.gestalt.config.builder.SourceBuilder
addConfigReloadStrategy, addTag, buildPackage, getConfigReloadStrategies, getTags, self, setTags
-
-
-
-
Method Detail
-
builder
public static SystemPropertiesConfigSourceBuilder builder()
Static function to create the builder.- Returns:
- the builder
-
failOnErrors
public boolean failOnErrors()
Get if we should fail on errors for the config source.- Returns:
- if we should fail on errors for the config source
-
setFailOnErrors
public SystemPropertiesConfigSourceBuilder setFailOnErrors(boolean failOnErrors)
Set if we should fail on errors for the config source.- Parameters:
failOnErrors- Set if we should fail on errors for the config source.- Returns:
- the builder
-
build
public ConfigSourcePackage build() throws GestaltException
Description copied from class:SourceBuilderBuild the ConfigSourcePackage with the config source, tags and any reload strategies.- Specified by:
buildin classSourceBuilder<SystemPropertiesConfigSourceBuilder,SystemPropertiesConfigSource>- Returns:
- the ConfigSourcePackage with the config source, tags and any reload strategies.
- Throws:
GestaltException- exceptions if any of the required properties are not set.
-
-