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
Modifier and TypeFieldDescriptionprotected final Properties
Properties representing concatenation oftemplates/nuxeo.defaults
,System.getProperties()
andnuxeo.defaults
from each template.protected final Path
Path representing the Nuxeo Server home directory.protected static final Path
protected final Path
Path representing the Nuxeo Server configuration file.protected static final Path
Templates included in this configuration.protected static final Path
protected final CryptoProperties
Properties representingnuxeo.conf
with a fallback ondefaultConfig
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clear()
getDefaultProperty
(String key) Returns the property value associated with the givenkey
from the default configuration.getOptProperty
(String key) Returns the property value associated with the givenkey
from the user configuration.protected Path
getProperty
(String key) Returns the property value associated with the givenkey
from the user configuration.getProperty
(String key, String defaultValue) Returns the property value associated with the givenkey
from the user configuration.boolean
Returns the property value as a boolean associated with the givenkey
from the user configuration.int
getPropertyAsInteger
(String key, int defaultValue) Returns the property value as an int associated with the givenkey
from the user configuration.getPropertyAsPath
(String key) Returns the property value as aPath
associated with the givenkey
from the user configuration.getRawProperty
(String key) Returns the raw property value associated with the givenkey
from the user configuration.Returns the Home of NuxeoRuntime (same asFramework.getRuntime().getHome()
).boolean
boolean
boolean
isLoaded()
keySet()
Returns the user configuration key set.protected String
makePathAbsolute
(String key, String value) protected Properties
makePathAbsolute
(Properties properties) Puts the given property into user configuration.void
putAll
(Properties properties) Puts all givenproperties
into user configuration.putDefault
(String key, String value) Puts the given property into default configuration.void
putDefaultAll
(Properties properties) Puts all givenproperties
into default configuration.void
putTemplateAll
(Path template, Properties properties) Puts all givenproperties
into 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.defaults
from each template. -
userConfig
Properties representingnuxeo.conf
with 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 givenkey
from the default configuration. -
getProperty
Returns the property value associated with the givenkey
from 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 givenkey
from 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 givendefaultValue
if the default configuration doesn't contain a property value associated with thenkey
. -
getOptProperty
Returns the property value associated with the givenkey
from the user configuration. -
getPropertyAsBoolean
Returns the property value as a boolean associated with the givenkey
from the user configuration. -
getPropertyAsInteger
Returns the property value as an int associated with the givenkey
from the user configuration.- Throws:
NumberFormatException
- – if the string does not contain a parsable integer
-
getPropertyAsPath
Returns the property value as aPath
associated with the givenkey
from the user configuration.- Throws:
InvalidPathException
- – if the path string cannot be converted to a Path
-
getRawProperty
Returns the raw property value associated with the givenkey
from 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 givenproperties
into default configuration. -
put
Puts the given property into user configuration. -
putAll
Puts all givenproperties
into user configuration. -
putTemplateAll
Puts all givenproperties
into default configuration for the given template. -
makePathAbsolute
-
makePathAbsolute
-
getIncludedTemplates
- Returns:
- the absolute
Path
s 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()
-