Package gaiasky.util
Class SettingsMorph
java.lang.Object
gaiasky.util.SettingsMorph
This class converts settings from the old Java properties file to the
new YAML-based configuration. This should happen whenever Gaia Sky detects
that there exists a
global.properties file in the configuration
folder, but no config.yaml is found. In such a case, the way
to proceed is to load the global.properties file into
memory, create and fill up a Settings instance manually and
save it in to the config.yaml file in the configuration
folder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidmorphSettings(Path propertiesFile, Path yamlFile)This method loads the given properties file into aProperties, creates aSettingsand fills it up with the contents of the properties file.
-
Constructor Details
-
SettingsMorph
public SettingsMorph()
-
-
Method Details
-
morphSettings
public static void morphSettings(Path propertiesFile, Path yamlFile) throws FileNotFoundException, IOExceptionThis method loads the given properties file into aProperties, creates aSettingsand fills it up with the contents of the properties file. Finally, it writes theSettingsinstance to disk in the YAML format to the givenyamlFile.- Parameters:
propertiesFile- The location of the properties file.yamlFile- The location to save the YAML settings file.- Throws:
FileNotFoundExceptionIOException
-