Class ConfigurationServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.services.config.ConfigurationServiceImpl
- All Implemented Interfaces:
Adaptable
,Component
,Extensible
,TimestampedService
,ConfigurationService
- Since:
- 7.4
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected Map<String,
ConfigurationPropertyDescriptor> XXX remove once we are able to get such a cached map from DefaultComponentprotected static final org.apache.logging.log4j.Logger
protected static final com.fasterxml.jackson.databind.ObjectMapper
protected static final com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
Fields inherited from interface org.nuxeo.runtime.services.config.ConfigurationService
LIST_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBoolean
(String key) Returns the given property value if any.protected Map<String,
ConfigurationPropertyDescriptor> XXX remove once we are able to get such a cached map from DefaultComponent.getDuration
(String key) Returns the given property value if any.getDuration
(String key, Duration defaultValue) Returns the given property value if any, otherwise returns the given default value.getInteger
(String key) Returns the given property value if any.int
getInteger
(String key, int defaultValue) Returns the given property value if any, otherwise returns the given default value.Returns the given property value if any.long
Returns the given property value if any, otherwise returns the given default value.Returns all the properties.getProperties
(String namespace) Returns the properties with key starting with the given namespace.getPropertiesAsJson
(String namespace) Returns the json string representing the properties with key starting with the given namespace.getProperty
(String key) Deprecated.getProperty
(String key, String defaultValue) Deprecated.Returns the given property value if any.Returns the given property value if any, otherwise returns the given default value.boolean
isBooleanFalse
(String key) Returns true if given property exists and is false when compared to a boolean value.boolean
Deprecated.boolean
Deprecated.boolean
isBooleanTrue
(String key) Returns true if given property exists and is true when compared to a boolean value.void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) protected static boolean
startsWithNamespace
(String string, String namespace) Returns true if a string starts with a namespace.void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
log
protected static final org.apache.logging.log4j.Logger log -
CONFIGURATION_EP
- See Also:
-
PROPERTIES_MAPPER
protected static final com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper PROPERTIES_MAPPER -
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER -
descriptors
XXX remove once we are able to get such a cached map from DefaultComponent- Since:
- 10.3
-
-
Constructor Details
-
ConfigurationServiceImpl
public ConfigurationServiceImpl()
-
-
Method Details
-
getDescriptors
XXX remove once we are able to get such a cached map from DefaultComponent.We'd ideally need a <T extends Descriptor> Map<String, T> getDescriptors(String xp) with cache method.
- Since:
- 10.3
-
getProperty
Deprecated.Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise null.- Specified by:
getProperty
in interfaceConfigurationService
- Parameters:
key
- the property key
-
getProperty
Deprecated.Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise returns the given default value.- Specified by:
getProperty
in interfaceConfigurationService
- Parameters:
key
- the property keydefaultValue
- the default value for this key
-
isBooleanPropertyTrue
Deprecated.Description copied from interface:ConfigurationService
Returns true if given property is true when compared to a boolean value.- Specified by:
isBooleanPropertyTrue
in interfaceConfigurationService
-
isBooleanPropertyFalse
Deprecated.Description copied from interface:ConfigurationService
Returns true if given property is false when compared to a boolean value.Returns also true if property is not blank and is not equals to true.
- Specified by:
isBooleanPropertyFalse
in interfaceConfigurationService
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
getProperties
Description copied from interface:ConfigurationService
Returns the properties with key starting with the given namespace.- Specified by:
getProperties
in interfaceConfigurationService
- Parameters:
namespace
- the namespace- Returns:
- a map of properties with trimmed keys (namespace removed)
-
getProperties
Description copied from interface:ConfigurationService
Returns all the properties.- Specified by:
getProperties
in interfaceConfigurationService
- Returns:
- a map of properties
-
getPropertiesAsJson
Description copied from interface:ConfigurationService
Returns the json string representing the properties with key starting with the given namespace.- Specified by:
getPropertiesAsJson
in interfaceConfigurationService
- Parameters:
namespace
- the namespace of the properties- Throws:
IOException
-
startsWithNamespace
Returns true if a string starts with a namespace.- Parameters:
string
- a string- Since:
- 10.3
-
getString
Description copied from interface:ConfigurationService
Returns the given property value if any.- Specified by:
getString
in interfaceConfigurationService
- Parameters:
key
- the property key- Since:
- 11.1
-
getString
Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise returns the given default value.- Specified by:
getString
in interfaceConfigurationService
- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getInteger
Description copied from interface:ConfigurationService
Returns the given property value if any.- Specified by:
getInteger
in interfaceConfigurationService
- Parameters:
key
- the property key- Since:
- 11.1
-
getInteger
Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise returns the given default value.- Specified by:
getInteger
in interfaceConfigurationService
- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getLong
Description copied from interface:ConfigurationService
Returns the given property value if any.- Specified by:
getLong
in interfaceConfigurationService
- Parameters:
key
- the property key- Since:
- 11.1
-
getLong
Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise returns the given default value.- Specified by:
getLong
in interfaceConfigurationService
- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getBoolean
Description copied from interface:ConfigurationService
Returns the given property value if any.- Specified by:
getBoolean
in interfaceConfigurationService
- Parameters:
key
- the property key- Since:
- 11.1
-
isBooleanTrue
Description copied from interface:ConfigurationService
Returns true if given property exists and is true when compared to a boolean value.prop=true | isBooleanTrue("prop") = true prop=trUe | isBooleanTrue("prop") = true prop=false | isBooleanTrue("prop") = false prop=any | isBooleanTrue("prop") = false prop= | isBooleanTrue("prop") = false
- Specified by:
isBooleanTrue
in interfaceConfigurationService
- Since:
- 11.1
-
isBooleanFalse
Description copied from interface:ConfigurationService
Returns true if given property exists and is false when compared to a boolean value.prop=false | isBooleanFalse("prop") = true prop=fAlse | isBooleanFalse("prop") = true prop=true | isBooleanFalse("prop") = false prop=any | isBooleanFalse("prop") = false prop= | isBooleanFalse("prop") = false
- Specified by:
isBooleanFalse
in interfaceConfigurationService
- Since:
- 11.1
-
getDuration
Description copied from interface:ConfigurationService
Returns the given property value if any.- Specified by:
getDuration
in interfaceConfigurationService
- Parameters:
key
- the property key- Since:
- 11.1
-
getDuration
Description copied from interface:ConfigurationService
Returns the given property value if any, otherwise returns the given default value.- Specified by:
getDuration
in interfaceConfigurationService
- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-