Package io.helidon.config.git
Class GitConfigSource
- java.lang.Object
-
- io.helidon.config.spi.AbstractSource<ConfigNode.ObjectNode,S>
-
- io.helidon.config.spi.AbstractConfigSource<S>
-
- io.helidon.config.spi.AbstractParsableConfigSource<byte[]>
-
- io.helidon.config.git.GitConfigSource
-
- All Implemented Interfaces:
Changeable<ConfigNode.ObjectNode>
,ConfigSource
,Source<ConfigNode.ObjectNode>
,AutoCloseable
,Supplier<ConfigSource>
public class GitConfigSource extends AbstractParsableConfigSource<byte[]>
A config source which loads a configuration document from Git repository.Config source is initialized by
GitConfigSourceBuilder
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.helidon.config.spi.AbstractParsableConfigSource
AbstractParsableConfigSource.Builder<B extends AbstractParsableConfigSource.Builder<B,T>,T>
-
Nested classes/interfaces inherited from class io.helidon.config.spi.AbstractSource
AbstractSource.Data<D,S>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the @{code Source}, releasing any resources it holds.protected ConfigParser.Content<byte[]>
content()
Returns config source content.static GitConfigSource
create(Config config)
Create an instance from meta configuration.protected Optional<byte[]>
dataStamp()
Returns current stamp of data in config source.protected String
mediaType()
Returns source associated media type ornull
if unknown.protected String
uid()
Returns universal id of source to be used to constructAbstractSource.description()
.-
Methods inherited from class io.helidon.config.spi.AbstractParsableConfigSource
loadData, parser
-
Methods inherited from class io.helidon.config.spi.AbstractConfigSource
changes, configContext, init, processLoadedData
-
Methods inherited from class io.helidon.config.spi.AbstractSource
description, fireChangeEvent, isMandatory, load
-
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.ConfigSource
get
-
Methods inherited from interface io.helidon.config.spi.Source
description, load
-
-
-
-
Method Detail
-
create
public static GitConfigSource create(Config config)
Create an instance from meta configuration.- Parameters:
config
- meta configuration of this source- Returns:
- config source configured from the meta configuration
- See Also:
ConfigSources.load(Supplier[])
,ConfigSources.load(Config)
-
uid
protected String uid()
Description copied from class:AbstractSource
Returns universal id of source to be used to constructAbstractSource.description()
.- Overrides:
uid
in classAbstractSource<ConfigNode.ObjectNode,byte[]>
- Returns:
- universal id of source
-
mediaType
protected String mediaType()
Description copied from class:AbstractParsableConfigSource
Returns source associated media type ornull
if unknown.- Overrides:
mediaType
in classAbstractParsableConfigSource<byte[]>
- Returns:
- source associated media type or
null
if unknown.
-
dataStamp
protected Optional<byte[]> dataStamp()
Description copied from class:AbstractSource
Returns current stamp of data in config source.- Specified by:
dataStamp
in classAbstractSource<ConfigNode.ObjectNode,byte[]>
- Returns:
- current datastamp of data in config source
-
content
protected ConfigParser.Content<byte[]> content() throws ConfigException
Description copied from class:AbstractParsableConfigSource
Returns config source content.- Specified by:
content
in classAbstractParsableConfigSource<byte[]>
- Returns:
- config source content. Never returns
null
. - Throws:
ConfigException
- in case of loading of configuration from config source failed.
-
close
public void close() throws IOException
Description copied from interface:Source
Closes the @{code Source}, releasing any resources it holds.- Throws:
IOException
-
-