public class PlatformConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.nio.file.Path |
configDir |
protected ModuleConfigRepository |
repository |
Modifier | Constructor and Description |
---|---|
|
PlatformConfig(ModuleConfigRepository repository) |
|
PlatformConfig(ModuleConfigRepository repository,
java.nio.file.FileSystem fileSystem) |
protected |
PlatformConfig(ModuleConfigRepository repository,
java.nio.file.Path configDir) |
Modifier and Type | Method and Description |
---|---|
static PlatformConfig |
defaultConfig() |
java.nio.file.Path |
getConfigDir() |
ModuleConfig |
getModuleConfig(java.lang.String name) |
java.util.Optional<ModuleConfig> |
getOptionalModuleConfig(java.lang.String name) |
static ModuleConfigRepository |
loadDefaultModuleRepository()
Loads the default
ModuleConfigRepository . |
boolean |
moduleExists(java.lang.String name) |
static void |
setDefaultConfig(PlatformConfig defaultConfig)
Deprecated.
Directly pass
PlatformConfig instance to the code you want to test. |
protected final java.nio.file.Path configDir
protected final ModuleConfigRepository repository
public PlatformConfig(ModuleConfigRepository repository)
public PlatformConfig(ModuleConfigRepository repository, java.nio.file.FileSystem fileSystem)
protected PlatformConfig(ModuleConfigRepository repository, java.nio.file.Path configDir)
@Deprecated public static void setDefaultConfig(PlatformConfig defaultConfig)
PlatformConfig
instance to the code you want to test.public static ModuleConfigRepository loadDefaultModuleRepository()
ModuleConfigRepository
.
Configuration properties are read from environment variables and from the list of directories
defined by the system properties "powsybl.config.dirs" or "itools.config.dir", or by default from ${HOME}/.itools.
Configuration properties values from environment variables
take precedence over the values defined in config directories.
Configuration properties values encountered first in the list of directories
take precedence over the values defined in subsequent directories.public static PlatformConfig defaultConfig()
public java.nio.file.Path getConfigDir()
public boolean moduleExists(java.lang.String name)
public ModuleConfig getModuleConfig(java.lang.String name)
public java.util.Optional<ModuleConfig> getOptionalModuleConfig(java.lang.String name)