Package io.quarkus.registry.config
Class RegistriesConfigImpl.Builder
- java.lang.Object
-
- io.quarkus.registry.config.RegistriesConfigImpl.Builder
-
- All Implemented Interfaces:
RegistriesConfig,RegistriesConfig.Mutable,JsonBuilder<RegistriesConfig>
- Enclosing class:
- RegistriesConfigImpl
public static class RegistriesConfigImpl.Builder extends Object implements RegistriesConfig.Mutable
Builder. set* methods are used for deserialization
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.quarkus.registry.json.JsonBuilder
JsonBuilder.JsonBuilderSerializer<T>
-
Nested classes/interfaces inherited from interface io.quarkus.registry.config.RegistriesConfig
RegistriesConfig.Mutable
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigSourceconfigSourceprotected booleandebugprotected List<RegistryConfig>registries
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRegistry(RegistryConfig config)Add a registry to the configurationbooleanaddRegistry(String registryId)Add a registry to the configurationRegistriesConfigImplbuild()List<RegistryConfig>getRegistries()A list of registries that should queried when generating catalogs of platforms and extensions.ConfigSourcegetSource()booleanisDebug()Enables or disables registry client debug mode.voidpersist()Persist this configuration to the original source (if possible).booleanremoveRegistry(String registryId)Remove a registry from the configurationRegistriesConfigImpl.BuildersetDebug(boolean debug)RegistriesConfigImpl.BuildersetRegistries(List<RegistryConfig> registries)RegistriesConfigImpl.BuildersetRegistry(RegistryConfig config)RegistriesConfigImpl.BuildersetRegistry(String registryId)RegistriesConfigImpl.BuildersetSource(ConfigSource configSource)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.registry.config.RegistriesConfig
mutable
-
Methods inherited from interface io.quarkus.registry.config.RegistriesConfig.Mutable
persist
-
-
-
-
Field Detail
-
debug
protected boolean debug
-
registries
protected final List<RegistryConfig> registries
-
configSource
protected ConfigSource configSource
-
-
Method Detail
-
setRegistry
public RegistriesConfigImpl.Builder setRegistry(String registryId)
- Specified by:
setRegistryin interfaceRegistriesConfig.Mutable- Parameters:
registryId- The id to add (a RegistryConfig object will be created for it)- Returns:
- this. Use for chaining.
-
setRegistry
public RegistriesConfigImpl.Builder setRegistry(RegistryConfig config)
- Specified by:
setRegistryin interfaceRegistriesConfig.Mutable- Parameters:
config- A RegistryConfig object to add to the configuration- Returns:
- this. Use for chaining.
-
addRegistry
public boolean addRegistry(String registryId)
Description copied from interface:RegistriesConfig.MutableAdd a registry to the configuration- Specified by:
addRegistryin interfaceRegistriesConfig.Mutable- Parameters:
registryId- The id to add (a RegistryConfig object will be created for it)- Returns:
- true if the registry was added
-
addRegistry
public boolean addRegistry(RegistryConfig config)
Description copied from interface:RegistriesConfig.MutableAdd a registry to the configuration- Specified by:
addRegistryin interfaceRegistriesConfig.Mutable- Parameters:
config- A RegistryConfig object to add to the configuration- Returns:
- true if the registry was added
-
removeRegistry
public boolean removeRegistry(String registryId)
Description copied from interface:RegistriesConfig.MutableRemove a registry from the configuration- Specified by:
removeRegistryin interfaceRegistriesConfig.Mutable- Parameters:
registryId- The id of the registry to remove- Returns:
- true if the registry was removed
-
isDebug
public boolean isDebug()
Description copied from interface:RegistriesConfigEnables or disables registry client debug mode.- Specified by:
isDebugin interfaceRegistriesConfig- Returns:
- true if the debug mode should be enabled, otherwise - false
-
setDebug
public RegistriesConfigImpl.Builder setDebug(boolean debug)
- Specified by:
setDebugin interfaceRegistriesConfig.Mutable- Parameters:
debug- to enable debugging for this configuration- Returns:
- this. Use for chaining.
-
getRegistries
public List<RegistryConfig> getRegistries()
Description copied from interface:RegistriesConfigA list of registries that should queried when generating catalogs of platforms and extensions.- Specified by:
getRegistriesin interfaceRegistriesConfig- Returns:
- list of registries that should queried when generating catalogs of platforms and extensions
-
setRegistries
public RegistriesConfigImpl.Builder setRegistries(List<RegistryConfig> registries)
- Specified by:
setRegistriesin interfaceRegistriesConfig.Mutable- Parameters:
registries- List of constructed Registry configurations- Returns:
- this. Use for chaining.
-
build
public RegistriesConfigImpl build()
- Specified by:
buildin interfaceJsonBuilder<RegistriesConfig>- Specified by:
buildin interfaceRegistriesConfig.Mutable- Returns:
- an immutable copy of this configuration
-
persist
public void persist() throws IOExceptionDescription copied from interface:RegistriesConfigPersist this configuration to the original source (if possible). Does nothing for configurations read from environment variables.- Specified by:
persistin interfaceRegistriesConfig- Throws:
IOException- if the source file can not be written to.
-
getSource
public ConfigSource getSource()
- Specified by:
getSourcein interfaceRegistriesConfig- Returns:
- ConfigSource that describes origin of this configuration
-
setSource
public RegistriesConfigImpl.Builder setSource(ConfigSource configSource)
-
-