java.lang.Object
io.helidon.config.ConfigSources
Provides access to built-in
ConfigSource implementations.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSystem properties config source. -
Method Summary
Modifier and TypeMethodDescriptionProvides aBuilderfor creating aConfigSourcefrom the specified resource located on the classpath of the current thread's context classloader.static List<UrlConfigSource.Builder> classpathAll(String resource) Create builders for each instance of the resource on the current classpath.static ConfigSourceReturns aConfigSourcethat contains the same configuration model as the providedconfig.static NodeConfigSourcecreate(ConfigNode.ObjectNode objectNode) Returns aConfigSourcethat wraps the specifiedobjectNode.static ConfigSourcecreate(InputStream data, MediaType mediaType) static ConfigSourcestatic MapConfigSource.Builderstatic MapConfigSource.Builderstatic MapConfigSource.Buildercreate(Properties properties) static MapConfigSource.Buildercreate(Properties properties, String name) Provides aBuilderfor creating aConfigSourcefrom the specified directory path.static ConfigSourceempty()Provides an empty config source.static MapConfigSourceProvides a @{code ConfigSource} for creating aConfigfrom environment variables.static FileConfigSource.BuilderProvides aBuilderfor creating aConfigSourcefrom the specified file path.static FileConfigSource.BuilderProvides aBuilderfor creating aConfigSourcefrom the specified file path.static ConfigSourceprefixed(String key, Supplier<? extends ConfigSource> sourceSupplier) Provides aConfigSourcefrom asourceSupplier, adding the specifiedprefixto the keys in the source.Provides aConfigSourcefor creating aConfigderived from system properties.static UrlConfigSource.BuilderProvides aBuilderfor creating aConfigSourcefrom the specified URL.
-
Method Details
-
empty
Provides an empty config source.- Returns:
- empty config source
-
create
Returns aConfigSourcethat contains the same configuration model as the providedconfig.- Parameters:
config- the originalConfig- Returns:
ConfigSourcefor the sameConfigas the original
-
create
Returns aConfigSourcethat wraps the specifiedobjectNode.- Parameters:
objectNode- hierarchical configuration representation that will be returned by the created config source- Returns:
- new instance of
ConfigSource - See Also:
-
create
Provides aConfigSourcefrom the providedreadable contentand with the specifiedmediaType.Instant.now()is thecontent timestamp.- Parameters:
data- aInputStreamproviding the configuration contentmediaType- a configuration media type- Returns:
- a config source
-
create
Provides aConfigSourcefrom the providedStringcontent and with the specifiedmediaType.Instant.now()is thecontent timestamp.- Parameters:
content- a configuration contentmediaType- a configuration media type- Returns:
- a config source
-
create
- Parameters:
map- a map- Returns:
- new Builder instance
- See Also:
-
create
- Parameters:
map- a mapname- the name.- Returns:
- new Builder instance
- See Also:
-
create
- Parameters:
properties- properties- Returns:
- new Builder instance
- See Also:
-
create
- Parameters:
properties- propertiesname- the name.- Returns:
- new Builder instance
- See Also:
-
prefixed
Provides aConfigSourcefrom asourceSupplier, adding the specifiedprefixto the keys in the source.- Parameters:
key- key prefix to be added to all keyssourceSupplier- a config source supplier- Returns:
- new @{code ConfigSource} for the newly-prefixed content
-
systemProperties
Provides aConfigSourcefor creating aConfigderived from system properties.- Returns:
ConfigSourcefor config derived from system properties
-
environmentVariables
Provides a @{code ConfigSource} for creating aConfigfrom environment variables.- Returns:
ConfigSourcefor config derived from environment variables
-
classpath
Provides aBuilderfor creating aConfigSourcefrom the specified resource located on the classpath of the current thread's context classloader.The name of a resource is a '
/'-separated full path name that identifies the resource. If the resource name has a leading slash then it is dropped before lookup.- Parameters:
resource- a name of the resource- Returns:
- builder for a
ConfigSourcefor the classpath-based resource
-
classpathAll
Create builders for each instance of the resource on the current classpath.- Parameters:
resource- resource to look for- Returns:
- a list of classpath config source builders
-
file
Provides aBuilderfor creating aConfigSourcefrom the specified file path.- Parameters:
path- a file path- Returns:
- builder for the file-based
ConfigSource
-
file
Provides aBuilderfor creating aConfigSourcefrom the specified file path.- Parameters:
path- a file path- Returns:
- builder for the file-based
ConfigSource
-
directory
Provides aBuilderfor creating aConfigSourcefrom the specified directory path.- Parameters:
path- a directory path- Returns:
- new Builder instance
-
url
Provides aBuilderfor creating aConfigSourcefrom the specified URL.- Parameters:
url- a URL with configuration- Returns:
- new Builder instance
- See Also:
-