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 PatternENV_VALUE_PATTERNCatch values like ${env:PARAM_KEY:defaultValue}protected Map<String,String>environmentprotected booleanhideDeprecationWarningsprotected Map<String,String>parametersMigration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CharsetcheckFileCharset(Path propertiesFile)protected StringgetNuxeoEnvironmentConfName()PropertiesloadNuxeoDefaults(Path directory)Loads thenuxeo.defaultsandnuxeo.NUXEO_ENVIRONMENTfiles.PropertiesloadProperties(Path propsFile)protected PropertiesloadProperties(Properties properties, Path propertiesFile)protected StringreplaceBackslashes(String value)StringreplaceEnvironmentVariables(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.defaultsandnuxeo.NUXEO_ENVIRONMENTfiles.This method assumes
nuxeo.defaultsexists 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
-
-