public class ConversionHelp extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ATT_CLASS |
static String |
ATT_ELEMENT_TYPE |
static String |
ATT_NAME |
| Constructor and Description |
|---|
ConversionHelp() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cdata(byte[] chars,
String encoding) |
static String |
decode(String p) |
static String |
encode(String p)
Encode a string (if necessary) for output to a JTL file.
|
static String |
getPropertyName(HierarchicalStreamReader reader,
UnmarshallingContext context)
Get the property name, updating it if necessary using
NameUpdater. |
static String |
getPropertyValue(HierarchicalStreamReader reader,
UnmarshallingContext context,
String name)
Get the property value, updating it if necessary using
NameUpdater. |
static String |
getUpgradePropertyName(String name,
UnmarshallingContext context)
Update a property name using
NameUpdater. |
static String |
getUpgradePropertyValue(String name,
String value,
UnmarshallingContext context)
Update a property value using
NameUpdater.getCurrentName(String, String, String). |
static boolean |
isSpecialProperty(String name) |
static void |
restoreSpecialProperties(TestElement testElement,
HierarchicalStreamReader reader)
Restore the special properties:
TestElement.GUI_CLASS
TestElement.TEST_CLASS
TestElement.NAME
TestElement.ENABLED
|
static void |
saveSpecialProperties(TestElement testElement,
HierarchicalStreamWriter writer)
Save the special properties:
TestElement.GUI_CLASS
TestElement.TEST_CLASS
TestElement.NAME
TestElement.ENABLED
|
static void |
setInVersion(String v) |
static void |
setOutVersion(String v) |
public static final String ATT_CLASS
public static final String ATT_NAME
public static final String ATT_ELEMENT_TYPE
public static void setInVersion(String v)
public static void setOutVersion(String v)
public static String encode(String p)
p - string to encodepublic static String cdata(byte[] chars, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static boolean isSpecialProperty(String name)
public static String getPropertyName(HierarchicalStreamReader reader, UnmarshallingContext context)
NameUpdater.reader - where to read the name attributecontext - the unmarshalling contextgetUpgradePropertyName(String, UnmarshallingContext)public static String getPropertyValue(HierarchicalStreamReader reader, UnmarshallingContext context, String name)
NameUpdater.
Do not use for GUI_CLASS or TEST_CLASS.reader - where to read the valuecontext - the unmarshalling contextgetUpgradePropertyValue(String, String, UnmarshallingContext)public static String getUpgradePropertyName(String name, UnmarshallingContext context)
NameUpdater.name - the original property namecontext - the unmarshalling contextpublic static String getUpgradePropertyValue(String name, String value, UnmarshallingContext context)
NameUpdater.getCurrentName(String, String, String).
Do not use for GUI_CLASS or TEST_CLASS.name - the original property namevalue - the original property valuecontext - the unmarshalling contextpublic static void saveSpecialProperties(TestElement testElement, HierarchicalStreamWriter writer)
testElement - writer - public static void restoreSpecialProperties(TestElement testElement, HierarchicalStreamReader reader)
testElement - reader - Copyright © 1998-2015 Apache Software Foundation. All Rights Reserved.