Package org.nuxeo.launcher.config
Class ConfigurationHolder
java.lang.Object
org.nuxeo.launcher.config.ConfigurationHolder
Class used to hold the configuration for Nuxeo.
- Since:
- 11.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PropertiesProperties representing concatenation oftemplates/nuxeo.defaults,System.getProperties()andnuxeo.defaultsfrom each template.protected final PathPath representing the Nuxeo Server home directory.protected static final Pathprotected final PathPath representing the Nuxeo Server configuration file.protected static final PathTemplates included in this configuration.protected static final Pathprotected final CryptoPropertiesProperties representingnuxeo.confwith a fallback ondefaultConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclear()getDefaultProperty(String key) Returns the property value associated with the givenkeyfrom the default configuration.getOptProperty(String key) Returns the property value associated with the givenkeyfrom the user configuration.protected PathgetProperty(String key) Returns the property value associated with the givenkeyfrom the user configuration.getProperty(String key, String defaultValue) Returns the property value associated with the givenkeyfrom the user configuration.booleanReturns the property value as a boolean associated with the givenkeyfrom the user configuration.intgetPropertyAsInteger(String key, int defaultValue) Returns the property value as an int associated with the givenkeyfrom the user configuration.getPropertyAsPath(String key) Returns the property value as aPathassociated with the givenkeyfrom the user configuration.getRawProperty(String key) Returns the raw property value associated with the givenkeyfrom the user configuration.Returns the Home of NuxeoRuntime (same asFramework.getRuntime().getHome()).booleanbooleanbooleanisLoaded()keySet()Returns the user configuration key set.protected StringmakePathAbsolute(String key, String value) protected PropertiesmakePathAbsolute(Properties properties) Puts the given property into user configuration.voidputAll(Properties properties) Puts all givenpropertiesinto user configuration.putDefault(String key, String value) Puts the given property into default configuration.voidputDefaultAll(Properties properties) Puts all givenpropertiesinto default configuration.voidputTemplateAll(Path template, Properties properties) Puts all givenpropertiesinto default configuration for the given template.Returns the user configuration property names.
-
Field Details
-
DB_LIST
-
DIRECTORY_PARAMETERS
-
LOG4J2_CONF
-
NXSERVER
-
TEMPLATES
-
home
Path representing the Nuxeo Server home directory. Usually/opt/nuxeo/server. -
nuxeoConf
Path representing the Nuxeo Server configuration file. Usually/opt/nuxeo/server/bin/nuxeo.conf. -
defaultConfig
Properties representing concatenation oftemplates/nuxeo.defaults,System.getProperties()andnuxeo.defaultsfrom each template. -
userConfig
Properties representingnuxeo.confwith a fallback ondefaultConfig. -
templates
Templates included in this configuration.
-
-
Constructor Details
-
ConfigurationHolder
-
-
Method Details
-
getHomePath
-
getNuxeoConfPath
-
getTemplatesPath
-
getRuntimeHomePath
Returns the Home of NuxeoRuntime (same asFramework.getRuntime().getHome()). -
getConfigurationPath
-
getDataPath
-
getDumpedConfigurationPath
-
getLogPath
-
getLogConfigPath
-
getPackagesPath
-
getPidDirPath
-
getTmpPath
-
isLoaded
public boolean isLoaded() -
getDefaultProperty
Returns the property value associated with the givenkeyfrom the default configuration. -
getProperty
Returns the property value associated with the givenkeyfrom the user configuration.The method falls back on the default configuration if the user configuration doesn't contain a property value associated with the given
key. -
getProperty
Returns the property value associated with the givenkeyfrom the user configuration.The method falls back on the default configuration if the user configuration doesn't contain a property value associated with the given
key, then falls back on the givendefaultValueif the default configuration doesn't contain a property value associated with thenkey. -
getOptProperty
Returns the property value associated with the givenkeyfrom the user configuration. -
getPropertyAsBoolean
Returns the property value as a boolean associated with the givenkeyfrom the user configuration. -
getPropertyAsInteger
Returns the property value as an int associated with the givenkeyfrom the user configuration.- Throws:
NumberFormatException- – if the string does not contain a parsable integer
-
getPropertyAsPath
Returns the property value as aPathassociated with the givenkeyfrom the user configuration.- Throws:
InvalidPathException- – if the path string cannot be converted to a Path
-
getRawProperty
Returns the raw property value associated with the givenkeyfrom the user configuration. -
keySet
Returns the user configuration key set.- See Also:
-
stringPropertyNames
Returns the user configuration property names.- See Also:
-
isForceGenerationOnce
public boolean isForceGenerationOnce() -
isForceGeneration
public boolean isForceGeneration() -
putDefault
Puts the given property into default configuration. -
putDefaultAll
Puts all givenpropertiesinto default configuration. -
put
Puts the given property into user configuration. -
putAll
Puts all givenpropertiesinto user configuration. -
putTemplateAll
Puts all givenpropertiesinto default configuration for the given template. -
makePathAbsolute
-
makePathAbsolute
-
getIncludedTemplates
- Returns:
- the absolute
Paths of the included templates
-
getIncludedTemplateNames
- Returns:
- the names of the included templates (ie: name of template directory)
-
getIncludedDBTemplateName
- Returns:
- the name of the included DB template
-
instantiateTemplateParser
- Since:
- 2021.14
-
clear
protected void clear()
-