java.lang.Object
io.helidon.config.ConfigSources
Provides access to built-in
ConfigSource
implementations.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
System properties config source. -
Method Summary
Modifier and TypeMethodDescriptionProvides aBuilder
for creating aConfigSource
from 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 ConfigSource
Returns aConfigSource
that contains the same configuration model as the providedconfig
.static NodeConfigSource
create
(ConfigNode.ObjectNode objectNode) Returns aConfigSource
that wraps the specifiedobjectNode
.static ConfigSource
create
(InputStream data, MediaType mediaType) static ConfigSource
static MapConfigSource.Builder
static MapConfigSource.Builder
static MapConfigSource.Builder
create
(Properties properties) static MapConfigSource.Builder
create
(Properties properties, String name) Provides aBuilder
for creating aConfigSource
from the specified directory path.static ConfigSource
empty()
Provides an empty config source.static MapConfigSource
Provides a @{code ConfigSource} for creating aConfig
from environment variables.static FileConfigSource.Builder
Provides aBuilder
for creating aConfigSource
from the specified file path.static FileConfigSource.Builder
Provides aBuilder
for creating aConfigSource
from the specified file path.static ConfigSource
prefixed
(String key, Supplier<? extends ConfigSource> sourceSupplier) Provides aConfigSource
from asourceSupplier
, adding the specifiedprefix
to the keys in the source.Provides aConfigSource
for creating aConfig
derived from system properties.static UrlConfigSource.Builder
Provides aBuilder
for creating aConfigSource
from the specified URL.
-
Method Details
-
empty
Provides an empty config source.- Returns:
- empty config source
-
create
Returns aConfigSource
that contains the same configuration model as the providedconfig
.- Parameters:
config
- the originalConfig
- Returns:
ConfigSource
for the sameConfig
as the original
-
create
Returns aConfigSource
that 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 aConfigSource
from the providedreadable content
and with the specifiedmediaType
.Instant.now()
is thecontent timestamp
.- Parameters:
data
- aInputStream
providing the configuration contentmediaType
- a configuration media type- Returns:
- a config source
-
create
Provides aConfigSource
from the providedString
content 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 aConfigSource
from asourceSupplier
, adding the specifiedprefix
to 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 aConfigSource
for creating aConfig
derived from system properties.- Returns:
ConfigSource
for config derived from system properties
-
environmentVariables
Provides a @{code ConfigSource} for creating aConfig
from environment variables.- Returns:
ConfigSource
for config derived from environment variables
-
classpath
Provides aBuilder
for creating aConfigSource
from 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
ConfigSource
for 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 aBuilder
for creating aConfigSource
from the specified file path.- Parameters:
path
- a file path- Returns:
- builder for the file-based
ConfigSource
-
file
Provides aBuilder
for creating aConfigSource
from the specified file path.- Parameters:
path
- a file path- Returns:
- builder for the file-based
ConfigSource
-
directory
Provides aBuilder
for creating aConfigSource
from the specified directory path.- Parameters:
path
- a directory path- Returns:
- new Builder instance
-
url
Provides aBuilder
for creating aConfigSource
from the specified URL.- Parameters:
url
- a URL with configuration- Returns:
- new Builder instance
- See Also:
-