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
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<String,ConfigurationPropertyDescriptor> XXX remove once we are able to get such a cached map from DefaultComponentprotected static final org.apache.logging.log4j.Loggerprotected static final com.fasterxml.jackson.databind.ObjectMapperprotected static final com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapperFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, nameFields inherited from interface org.nuxeo.runtime.services.config.ConfigurationService
LIST_SEPARATOR -
Constructor Summary
Constructors -
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.intgetInteger(String key, int defaultValue) Returns the given property value if any, otherwise returns the given default value.Returns the given property value if any.longReturns 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.booleanisBooleanFalse(String key) Returns true if given property exists and is false when compared to a boolean value.booleanDeprecated.booleanDeprecated.booleanisBooleanTrue(String key) Returns true if given property exists and is true when compared to a boolean value.voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) protected static booleanstartsWithNamespace(String string, String namespace) Returns true if a string starts with a namespace.voidunregisterContribution(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, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ConfigurationServiceReturns the given property value if any, otherwise null.- Specified by:
getPropertyin interfaceConfigurationService- Parameters:
key- the property key
-
getProperty
Deprecated.Description copied from interface:ConfigurationServiceReturns the given property value if any, otherwise returns the given default value.- Specified by:
getPropertyin interfaceConfigurationService- Parameters:
key- the property keydefaultValue- the default value for this key
-
isBooleanPropertyTrue
Deprecated.Description copied from interface:ConfigurationServiceReturns true if given property is true when compared to a boolean value.- Specified by:
isBooleanPropertyTruein interfaceConfigurationService
-
isBooleanPropertyFalse
Deprecated.Description copied from interface:ConfigurationServiceReturns 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:
isBooleanPropertyFalsein interfaceConfigurationService
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContributionin classDefaultComponent
-
getProperties
Description copied from interface:ConfigurationServiceReturns the properties with key starting with the given namespace.- Specified by:
getPropertiesin interfaceConfigurationService- Parameters:
namespace- the namespace- Returns:
- a map of properties with trimmed keys (namespace removed)
-
getProperties
Description copied from interface:ConfigurationServiceReturns all the properties.- Specified by:
getPropertiesin interfaceConfigurationService- Returns:
- a map of properties
-
getPropertiesAsJson
Description copied from interface:ConfigurationServiceReturns the json string representing the properties with key starting with the given namespace.- Specified by:
getPropertiesAsJsonin 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:ConfigurationServiceReturns the given property value if any.- Specified by:
getStringin interfaceConfigurationService- Parameters:
key- the property key- Since:
- 11.1
-
getString
Description copied from interface:ConfigurationServiceReturns the given property value if any, otherwise returns the given default value.- Specified by:
getStringin interfaceConfigurationService- Parameters:
key- the property keydefaultValue- the default value for this key- Since:
- 11.1
-
getInteger
Description copied from interface:ConfigurationServiceReturns the given property value if any.- Specified by:
getIntegerin interfaceConfigurationService- Parameters:
key- the property key- Since:
- 11.1
-
getInteger
Description copied from interface:ConfigurationServiceReturns the given property value if any, otherwise returns the given default value.- Specified by:
getIntegerin interfaceConfigurationService- Parameters:
key- the property keydefaultValue- the default value for this key- Since:
- 11.1
-
getLong
Description copied from interface:ConfigurationServiceReturns the given property value if any.- Specified by:
getLongin interfaceConfigurationService- Parameters:
key- the property key- Since:
- 11.1
-
getLong
Description copied from interface:ConfigurationServiceReturns the given property value if any, otherwise returns the given default value.- Specified by:
getLongin interfaceConfigurationService- Parameters:
key- the property keydefaultValue- the default value for this key- Since:
- 11.1
-
getBoolean
Description copied from interface:ConfigurationServiceReturns the given property value if any.- Specified by:
getBooleanin interfaceConfigurationService- Parameters:
key- the property key- Since:
- 11.1
-
isBooleanTrue
Description copied from interface:ConfigurationServiceReturns 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:
isBooleanTruein interfaceConfigurationService- Since:
- 11.1
-
isBooleanFalse
Description copied from interface:ConfigurationServiceReturns 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:
isBooleanFalsein interfaceConfigurationService- Since:
- 11.1
-
getDuration
Description copied from interface:ConfigurationServiceReturns the given property value if any.- Specified by:
getDurationin interfaceConfigurationService- Parameters:
key- the property key- Since:
- 11.1
-
getDuration
Description copied from interface:ConfigurationServiceReturns the given property value if any, otherwise returns the given default value.- Specified by:
getDurationin interfaceConfigurationService- Parameters:
key- the property keydefaultValue- the default value for this key- Since:
- 11.1
-