Package io.quarkus.registry.config
Class RegistriesConfigLocator
java.lang.Object
io.quarkus.registry.config.RegistriesConfigLocator
A helper class set utility methods to locate the registry client configuration file
in the default locations (e.g. user home
.quarkus dir, or the project dir) or in
at the location specified by the caller.
Also includes methods to parse the registry client configuration file.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegistryConfigReturns the default registry client configuration which should be used in case no configuration file was found in the user's environment.static RegistriesConfigload(InputStream configYaml) Deserializes registry client configuration from an input stream.static RegistriesConfigDeserializes registry client configuration from a reader.static RegistriesConfigDeserializes a given configuration file.static PathReturns the registry client configuration file or null, if the file could not be found.static PathlocateConfigYaml(Path configYaml) Returns the registry client configuration file or null if the file could not be found.static RegistriesConfigLocate the registry client configuration file and deserialize it.
-
Field Details
-
CONFIG_RELATIVE_PATH
- See Also:
-
CONFIG_FILE_PATH_PROPERTY
- See Also:
-
-
Constructor Details
-
RegistriesConfigLocator
public RegistriesConfigLocator()
-
-
Method Details
-
resolveConfig
Locate the registry client configuration file and deserialize it. The method will look for the file in the following locations in this order:- if
quarkus.config.rootsystem property is set, its value will be used as the location of the configuration file - current user directory (which usually would be the project dir)
.quarkus/config.yamlin the user home directory
- Returns:
- registry client configuration, never null
- if
-
load
Deserializes a given configuration file.- Parameters:
configYaml- configuration file- Returns:
- deserialized registry client configuration
-
load
Deserializes registry client configuration from an input stream.- Parameters:
configYaml- input stream- Returns:
- deserialized registry client configuration
-
load
Deserializes registry client configuration from a reader.- Parameters:
configYaml- reader- Returns:
- deserialized registry client configuration
-
locateConfigYaml
Returns the registry client configuration file or null, if the file could not be found.- Returns:
- the registry client configuration file or null, if the file could not be found
-
locateConfigYaml
Returns the registry client configuration file or null if the file could not be found.- Parameters:
configYaml- Path to a pre-specified config file (e.g. a command line argument)- Returns:
- the registry client configuration file or null if the file could not be found.
-
getDefaultRegistry
Returns the default registry client configuration which should be used in case no configuration file was found in the user's environment.- Returns:
- default registry client configuration
-