Package tigase.conf
Class ConfigHolder
java.lang.Object
tigase.conf.ConfigHolder
Created by andrzej on 18.09.2016.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path
backupOldConfigFile
(Path initPropsFile) loadConfiguration
(String[] args) static void
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
void
setProperties
(Map<String, Object> props) protected static boolean
upgradeDSL
(Map<String, Object> props)
-
Field Details
-
PROPERTIES_CONFIG_FILE_DEF
- See Also:
-
PROPERTIES_CONFIG_FILE_KEY
- See Also:
-
TDSL_CONFIG_FILE_DEF
-
TDSL_CONFIG_FILE_KEY
- See Also:
-
-
Constructor Details
-
ConfigHolder
public ConfigHolder()
-
-
Method Details
-
backupOldConfigFile
- Throws:
IOException
-
main
- Throws:
Exception
-
removeIfExistsAnd
public static void removeIfExistsAnd(Map<String, Object> props, String oldKey, BiConsumer<BiConsumer<String, Object>, Object> consumer) -
renameIfExists
-
upgradeDSL
-
loadConfiguration
public Optional<String[]> loadConfiguration(String[] args) throws IOException, ConfigReader.ConfigException -
getProperties
-
setProperties
-
saveToDSLFile
- Throws:
IOException
-
getConfigFilePath
-