public class ConfigurationServiceImpl extends DefaultComponent implements ConfigurationService
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CONFIGURATION_EP  | 
protected Map<String,ConfigurationPropertyDescriptor> | 
descriptors
XXX remove once we are able to get such a cached map from DefaultComponent 
 | 
protected static org.apache.commons.logging.Log | 
log  | 
protected static com.fasterxml.jackson.databind.ObjectMapper | 
OBJECT_MAPPER  | 
protected static com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper | 
PROPERTIES_MAPPER  | 
lastModified, nameLIST_SEPARATOR| Constructor and Description | 
|---|
ConfigurationServiceImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected Map<String,ConfigurationPropertyDescriptor> | 
getDescriptors()
XXX remove once we are able to get such a cached map from DefaultComponent. 
 | 
Map<String,Serializable> | 
getProperties(String namespace)
Returns the properties with key starting with the given namespace. 
 | 
String | 
getPropertiesAsJson(String namespace)
Returns the json string representing the properties with key starting with the given namespace. 
 | 
String | 
getProperty(String key)
Returns the given property value if any, otherwise null. 
 | 
String | 
getProperty(String key,
           String defaultValue)
Returns the given property value if any, otherwise returns the given default value. 
 | 
boolean | 
isBooleanPropertyFalse(String key)
Returns true if given property is false when compared to a boolean value. 
 | 
boolean | 
isBooleanPropertyTrue(String key)
Returns true if given property 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)  | 
activate, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderprotected static final org.apache.commons.logging.Log log
public static final String CONFIGURATION_EP
protected static final com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper PROPERTIES_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
protected volatile Map<String,ConfigurationPropertyDescriptor> descriptors
public ConfigurationServiceImpl()
protected Map<String,ConfigurationPropertyDescriptor> getDescriptors()
 We'd ideally need a 
public String getProperty(String key)
ConfigurationServicegetProperty in interface ConfigurationServicekey - the property keypublic String getProperty(String key, String defaultValue)
ConfigurationServicegetProperty in interface ConfigurationServicekey - the property keydefaultValue - the default value for this keypublic boolean isBooleanPropertyTrue(String key)
ConfigurationServiceisBooleanPropertyTrue in interface ConfigurationServicepublic boolean isBooleanPropertyFalse(String key)
ConfigurationServiceisBooleanPropertyFalse in interface ConfigurationServicepublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic Map<String,Serializable> getProperties(String namespace)
ConfigurationServicegetProperties in interface ConfigurationServicenamespace - the namespacepublic String getPropertiesAsJson(String namespace) throws IOException
ConfigurationServicegetPropertiesAsJson in interface ConfigurationServicenamespace - the namespace of the propertiesIOExceptionprotected static boolean startsWithNamespace(String string, String namespace)
string - a stringnamespace - Copyright © 2019 Nuxeo. All rights reserved.