Class Properties
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,String>
-
- org.nuxeo.ecm.automation.core.util.Properties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,String>
- Direct Known Subclasses:
DataModelProperties
public class Properties extends HashMap<String,String>
Inline properties file content. This class exists to have a real type for parameters accepting properties content.- Author:
- Bogdan Stefanescu
- See Also:
Constants
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static String
IS_PROPERTY_VALUE_TRIMMED_KEY
Spaces may be legitimate part of the value, there is no reason to trim them.protected static String
multiLineEscape
static String
PROPERTIES_MULTILINE_ESCAPE
-
Constructor Summary
Constructors Constructor Description Properties()
Properties(int size)
Properties(com.fasterxml.jackson.databind.JsonNode node)
Constructs a Properties map based on a Json node.Properties(String content)
Properties(Map<String,String> props)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static boolean
isPropertyValueTrimmed()
Default value isfalse
.static Map<String,String>
loadProperties(Reader reader)
static void
loadProperties(Reader reader, Map<String,String> map)
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Field Detail
-
IS_PROPERTY_VALUE_TRIMMED_KEY
public static final String IS_PROPERTY_VALUE_TRIMMED_KEY
Spaces may be legitimate part of the value, there is no reason to trim them. But before NXP-19050, the behavior was to trim the values. We have put in place a contribution, which is overridden before Nuxeo 8 series, for backward compatibility. See NXP-19170.- Since:
- 8.2
- See Also:
- Constant Field Values
-
PROPERTIES_MULTILINE_ESCAPE
public static final String PROPERTIES_MULTILINE_ESCAPE
- See Also:
- Constant Field Values
-
multiLineEscape
protected static final String multiLineEscape
-
-
Constructor Detail
-
Properties
public Properties()
-
Properties
public Properties(int size)
-
Properties
public Properties(String content) throws IOException
- Throws:
IOException
-
Properties
public Properties(com.fasterxml.jackson.databind.JsonNode node) throws IOException
Constructs a Properties map based on a Json node.- Throws:
IOException
- Since:
- 5.7.3
-
-
Method Detail
-
isPropertyValueTrimmed
protected static boolean isPropertyValueTrimmed()
Default value isfalse
.- Since:
- 8.2
-
loadProperties
public static Map<String,String> loadProperties(Reader reader) throws IOException
- Throws:
IOException
-
loadProperties
public static void loadProperties(Reader reader, Map<String,String> map) throws IOException
- Throws:
IOException
-
-