Package com.powsybl.config.classic
Class ClassicPlatformConfigProvider
- java.lang.Object
-
- com.powsybl.config.classic.ClassicPlatformConfigProvider
-
- All Implemented Interfaces:
PlatformConfigProvider
@AutoService(PlatformConfigProvider.class) public class ClassicPlatformConfigProvider extends Object implements PlatformConfigProvider
The classic powsybl PlatformConfig provider. It uses System Properties to get config dirs (powsybl.config.dirs, itools.config.dir; defaults to $HOME/.itools) and reads configuration from yaml, xml or java properties files. The config dir names can use the keywords fromPlatformEnv
(e.g. app.root, user.home). It also usesEnvironmentModuleConfigRepository
to read configuration from environment variables.- Author:
- Geoffroy Jamgotchian
, Jon Harper
-
-
Constructor Summary
Constructors Constructor Description ClassicPlatformConfigProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Path[]
getDefaultConfigDirs(FileSystem fileSystem, String directories, String userHome, String pathSeparator)
Returns the list of default config directories: they are defined by the system properties "powsybl.config.dirs" or "itools.config.dir".String
getName()
PlatformConfig
getPlatformConfig()
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfacePlatformConfigProvider
-
getDefaultConfigDirs
public static Path[] getDefaultConfigDirs(FileSystem fileSystem, String directories, String userHome, String pathSeparator)
Returns the list of default config directories: they are defined by the system properties "powsybl.config.dirs" or "itools.config.dir". If none is defined, it defaults to the single directory ${HOME}/.itools.
-
getPlatformConfig
public PlatformConfig getPlatformConfig()
- Specified by:
getPlatformConfig
in interfacePlatformConfigProvider
-
-