Package org.nuxeo.launcher.config
Class ConfigurationLoader
- java.lang.Object
-
- org.nuxeo.launcher.config.ConfigurationLoader
-
public class ConfigurationLoader extends Object
Class used to load the configuration for Nuxeo.- Since:
- 11.5
-
-
Field Summary
Fields Modifier and Type Field Description protected static Pattern
ENV_VALUE_PATTERN
Catch values like ${env:PARAM_KEY:defaultValue}protected Map<String,String>
environment
protected boolean
hideDeprecationWarnings
protected Map<String,String>
parametersMigration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Charset
checkFileCharset(Path propertiesFile)
protected String
getNuxeoEnvironmentConfName()
Properties
loadNuxeoDefaults(Path directory)
Loads thenuxeo.defaults
andnuxeo.NUXEO_ENVIRONMENT
files.Properties
loadProperties(Path propsFile)
protected Properties
loadProperties(Properties properties, Path propertiesFile)
protected String
replaceBackslashes(String value)
String
replaceEnvironmentVariables(String value)
-
-
-
Field Detail
-
ENV_VALUE_PATTERN
protected static final Pattern ENV_VALUE_PATTERN
Catch values like ${env:PARAM_KEY:defaultValue}- Since:
- 9.1
-
hideDeprecationWarnings
protected final boolean hideDeprecationWarnings
-
-
Method Detail
-
loadNuxeoDefaults
public Properties loadNuxeoDefaults(Path directory) throws ConfigurationException
Loads thenuxeo.defaults
andnuxeo.NUXEO_ENVIRONMENT
files.This method assumes
nuxeo.defaults
exists and is readable.- Throws:
ConfigurationException
-
loadProperties
public Properties loadProperties(Path propsFile) throws ConfigurationException
- Parameters:
propsFile
- Properties file- Returns:
- new Properties containing trimmed keys and values read in
propsFile
- Throws:
ConfigurationException
-
loadProperties
protected Properties loadProperties(Properties properties, Path propertiesFile) throws ConfigurationException
- Throws:
ConfigurationException
-
checkFileCharset
protected Charset checkFileCharset(Path propertiesFile) throws ConfigurationException
- Returns:
- The charset encoding for this file
- Throws:
ConfigurationException
-
getNuxeoEnvironmentConfName
protected String getNuxeoEnvironmentConfName()
- Returns:
- the nuxeo.defaults file for current
NUXEO_ENVIRONMENT
-
-