public class ConfigHolder extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTIES_CONFIG_FILE_DEF |
static String |
PROPERTIES_CONFIG_FILE_KEY |
static String |
TDSL_CONFIG_FILE_DEF |
static String |
TDSL_CONFIG_FILE_KEY |
Constructor and Description |
---|
ConfigHolder() |
Modifier and Type | Method and Description |
---|---|
static Path |
backupOldConfigFile(Path initPropsFile) |
Path |
getConfigFilePath() |
Map<String,Object> |
getProperties() |
Optional<String[]> |
loadConfiguration(String[] args) |
static void |
main(String[] args) |
static void |
removeIfExistsAnd(Map<String,Object> props,
String oldKey,
BiConsumer<BiConsumer<String,Object>,Object> consumer) |
static Optional |
renameIfExists(Map<String,Object> props,
String oldKey,
String newKey,
Function<Object,Object> converter) |
void |
saveToDSLFile(File f) |
void |
setProperties(Map<String,Object> props) |
protected static boolean |
upgradeDSL(Map<String,Object> props) |
public static final String PROPERTIES_CONFIG_FILE_DEF
public static final String PROPERTIES_CONFIG_FILE_KEY
public static final String TDSL_CONFIG_FILE_DEF
public static final String TDSL_CONFIG_FILE_KEY
public static Path backupOldConfigFile(Path initPropsFile) throws IOException
IOException
public static void removeIfExistsAnd(Map<String,Object> props, String oldKey, BiConsumer<BiConsumer<String,Object>,Object> consumer)
public static Optional renameIfExists(Map<String,Object> props, String oldKey, String newKey, Function<Object,Object> converter)
public Optional<String[]> loadConfiguration(String[] args) throws IOException, ConfigReader.ConfigException
public void saveToDSLFile(File f) throws IOException
IOException
public Path getConfigFilePath()
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.