Package org.nuxeo.launcher.config
Class ConfigurationMarshaller
java.lang.Object
org.nuxeo.launcher.config.ConfigurationMarshaller
Class used to read/write the
nuxeo.conf
file.- Since:
- 11.5
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected final Properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteTemplateFiles
(ConfigurationHolder configHolder) Delete files previously deployed by templates.void
dumpConfiguration
(ConfigurationHolder configHolder) protected void
dumpProperties
(ConfigurationHolder configHolder) protected void
editConfiguratorConf
(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) protected void
editUserConf
(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) protected boolean
isConfigurationValueEquals
(String userValue, String valueToSet) This method checks the equality of the two given values by taking care that backslash escaping hasn't been performed onuserValue
.protected void
parseAndCopy
(ConfigurationHolder configHolder) Generate configuration files from templates and given configuration parametersvoid
persistNuxeoConf
(ConfigurationHolder configHolder) persistNuxeoDefaults
(Path nuxeoDefaultsPath, Map<String, String> newParametersToSave) protected ConfigurationMarshaller.NuxeoConfContent
readConfiguration
(Path nuxeoConfPath) protected void
storeNewFilesList
(ConfigurationHolder configHolder, List<String> newFilesList) Store intoNEW_FILES
the list of new files deployed by the templates.protected void
writeConfiguration
(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder)
-
Field Details
-
BOUNDARY_BEGIN
- See Also:
-
BOUNDARY_END
- See Also:
-
PROTECTION_COMMENT
- See Also:
-
NEW_FILES
- See Also:
-
NUXEO_SYSTEM_PROPERTIES
-
systemProperties
-
-
Constructor Details
-
ConfigurationMarshaller
-
-
Method Details
-
persistNuxeoConf
- Throws:
ConfigurationException
-
persistNuxeoDefaults
public Map<String,String> persistNuxeoDefaults(Path nuxeoDefaultsPath, Map<String, String> newParametersToSave) throws ConfigurationException- Throws:
ConfigurationException
-
readConfiguration
protected ConfigurationMarshaller.NuxeoConfContent readConfiguration(Path nuxeoConfPath) throws ConfigurationException - Throws:
ConfigurationException
-
editUserConf
protected void editUserConf(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) -
editConfiguratorConf
protected void editConfiguratorConf(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) -
writeConfiguration
protected void writeConfiguration(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) throws ConfigurationException - Throws:
ConfigurationException
-
isConfigurationValueEquals
This method checks the equality of the two given values by taking care that backslash escaping hasn't been performed onuserValue
.- Parameters:
userValue
- the value as it is written innuxeo.conf
valueToSet
- the value coming fromConfigurationHolder
- Returns:
- whether both values are equals regarding the method description.
-
dumpConfiguration
- Parameters:
configHolder
- configuration to dump intoconfig
directory- Throws:
ConfigurationException
-
parseAndCopy
protected void parseAndCopy(ConfigurationHolder configHolder) throws IOException, freemarker.template.TemplateException, ConfigurationException Generate configuration files from templates and given configuration parameters- Throws:
IOException
freemarker.template.TemplateException
ConfigurationException
-
deleteTemplateFiles
protected void deleteTemplateFiles(ConfigurationHolder configHolder) throws IOException, ConfigurationException Delete files previously deployed by templates. If a file had been overwritten by a template, it will be restored. Helps the server returning to the state before any template was applied.- Throws:
IOException
ConfigurationException
-
storeNewFilesList
protected void storeNewFilesList(ConfigurationHolder configHolder, List<String> newFilesList) throws IOException Store intoNEW_FILES
the list of new files deployed by the templates. For later use bydeleteTemplateFiles(ConfigurationHolder)
.- Throws:
IOException
-
dumpProperties
- Parameters:
configHolder
- configuration to dump intoconfig
directory
-