- java.lang.Object
-
- io.helidon.config.AbstractSource
-
- io.helidon.config.ClasspathOverrideSource
-
- All Implemented Interfaces:
OverrideSource
,Source
,Supplier<OverrideSource>
public class ClasspathOverrideSource extends AbstractSource implements OverrideSource
OverrideSource
implementation that loads override definitions from a resource on a classpath.- See Also:
Source.Builder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClasspathOverrideSource.Builder
Classpath OverrideSource Builder.-
Nested classes/interfaces inherited from interface io.helidon.config.spi.OverrideSource
OverrideSource.OverrideData
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClasspathOverrideSource.Builder
builder()
Create a new fluent API builder.static ClasspathOverrideSource
create(Config config)
Create a new classpath override source from meta configuration, containingresource
key and other options.Optional<ConfigContent.OverrideContent>
load()
Load override data from the underlying source.protected String
uid()
Returns universal id of source to be used to constructAbstractSource.description()
.-
Methods inherited from class io.helidon.config.AbstractSource
changeWatcher, description, optional, pollingStrategy, retryPolicy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.config.spi.OverrideSource
get
-
Methods inherited from interface io.helidon.config.spi.Source
description, exists, optional, retryPolicy
-
-
-
-
Method Detail
-
uid
protected String uid()
Description copied from class:AbstractSource
Returns universal id of source to be used to constructAbstractSource.description()
.- Overrides:
uid
in classAbstractSource
- Returns:
- universal id of source
-
load
public Optional<ConfigContent.OverrideContent> load() throws ConfigException
Description copied from interface:OverrideSource
Load override data from the underlying source.- Specified by:
load
in interfaceOverrideSource
- Returns:
- override data if present, empty otherwise
- Throws:
ConfigException
- in case the loading of data failed
-
create
public static ClasspathOverrideSource create(Config config)
Create a new classpath override source from meta configuration, containingresource
key and other options.- Parameters:
config
- meta configuration- Returns:
- a new classpath override source
-
builder
public static ClasspathOverrideSource.Builder builder()
Create a new fluent API builder.- Returns:
- a new builder
-
-