Package com.tailf.ncs.template
Class TemplateVariables
Object
Dictionary<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
TemplateVariables
holds a set of defined XPath variables- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Constructor Details
-
TemplateVariables
public TemplateVariables()
-
-
Method Details
-
putQuoted
Assigns a string value to an XPath variable. The assigned value is enclosed by single quotes or duoble quotes and set usingProperties.setProperty(String, String)
. In XPath there is no quoting mechanism. Strings are enclosed by either single quotes or double quotes. If value contains both single and double quotes the double quotes are replaced by single quotes and the string is enclosed by double quotes. If this is not the desired behavior use the methodProperties.setProperty(String, String)
instead. Neither key nor the value can benull
.- Parameters:
key
- the name of the XPath variable. The variable can be used in XPath expressions as $keyvalue
- key will be assigned the value enclosed in single quotes thus represented as an XPath string.- Returns:
- value
- Throws:
NullPointerException
- if the key or value isnull
-