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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final Properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteTemplateFiles(ConfigurationHolder configHolder) Delete files previously deployed by templates.voiddumpConfiguration(ConfigurationHolder configHolder) protected voiddumpProperties(ConfigurationHolder configHolder) protected voideditConfiguratorConf(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) protected voideditUserConf(ConfigurationMarshaller.NuxeoConfContent content, ConfigurationHolder configHolder) protected booleanisConfigurationValueEquals(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 voidparseAndCopy(ConfigurationHolder configHolder) Generate configuration files from templates and given configuration parametersvoidpersistNuxeoConf(ConfigurationHolder configHolder) persistNuxeoDefaults(Path nuxeoDefaultsPath, Map<String, String> newParametersToSave) protected ConfigurationMarshaller.NuxeoConfContentreadConfiguration(Path nuxeoConfPath) protected voidstoreNewFilesList(ConfigurationHolder configHolder, List<String> newFilesList) Store intoNEW_FILESthe list of new files deployed by the templates.protected voidwriteConfiguration(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.confvalueToSet- the value coming fromConfigurationHolder- Returns:
- whether both values are equals regarding the method description.
-
dumpConfiguration
- Parameters:
configHolder- configuration to dump intoconfigdirectory- Throws:
ConfigurationException
-
parseAndCopy
protected void parseAndCopy(ConfigurationHolder configHolder) throws IOException, freemarker.template.TemplateException, ConfigurationException Generate configuration files from templates and given configuration parameters- Throws:
IOExceptionfreemarker.template.TemplateExceptionConfigurationException
-
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:
IOExceptionConfigurationException
-
storeNewFilesList
protected void storeNewFilesList(ConfigurationHolder configHolder, List<String> newFilesList) throws IOException Store intoNEW_FILESthe list of new files deployed by the templates. For later use bydeleteTemplateFiles(ConfigurationHolder).- Throws:
IOException
-
dumpProperties
- Parameters:
configHolder- configuration to dump intoconfigdirectory
-