public class JDOMExternalizerUtil
extends java.lang.Object
Constructor and Description |
---|
JDOMExternalizerUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addChildren(Element parent,
java.lang.String childElementName,
java.util.Collection<? extends JDOMExternalizable> children) |
static void |
addChildrenWithValueAttribute(Element parent,
java.lang.String childTagName,
java.util.List<java.lang.String> attrValues) |
static Element |
addElementWithValueAttribute(Element parent,
java.lang.String childTagName,
java.lang.String attrValue)
Deprecated.
|
static java.util.List<java.lang.String> |
getChildrenValueAttributes(Element parent,
java.lang.String childTagName) |
static java.lang.String |
getFirstChildValueAttribute(Element parent,
java.lang.String childTagName)
Deprecated.
|
static java.lang.String |
readCustomField(Element parent,
java.lang.String tagName) |
static java.lang.String |
readField(Element parent,
java.lang.String fieldName) |
static java.lang.String |
readField(Element parent,
java.lang.String fieldName,
java.lang.String defaultValue) |
static Element |
readOption(Element parent,
java.lang.String fieldName) |
static void |
writeCustomField(Element parent,
java.lang.String tagName,
java.lang.String value)
Adds the
<{tagName} value="{value}"/> element to the parent (or just <{tagName}"/> if the value is null ). |
static void |
writeField(Element parent,
java.lang.String fieldName,
java.lang.String value)
Adds the
<option name="{fieldName}" value="{value}"/> element to the parent. |
static void |
writeField(Element parent,
java.lang.String fieldName,
java.lang.String value,
java.lang.String defaultValue)
Adds the
<option name="{fieldName}" value="{value}"/> element to the parent when the value differs from the default. |
static Element |
writeOption(Element parent,
java.lang.String fieldName)
Adds the
<option name="{fieldName}"/> element to the parent and returns the created element. |
public static void writeField(Element parent, java.lang.String fieldName, java.lang.String value)
<option name="{fieldName}" value="{value}"/>
element to the parent.public static void writeField(Element parent, java.lang.String fieldName, java.lang.String value, java.lang.String defaultValue)
<option name="{fieldName}" value="{value}"/>
element to the parent when the value differs from the default.public static java.lang.String readField(Element parent, java.lang.String fieldName, java.lang.String defaultValue)
public static java.lang.String readField(Element parent, java.lang.String fieldName)
public static Element writeOption(Element parent, java.lang.String fieldName)
<option name="{fieldName}"/>
element to the parent and returns the created element.public static Element readOption(Element parent, java.lang.String fieldName)
public static void writeCustomField(Element parent, java.lang.String tagName, java.lang.String value)
<{tagName} value="{value}"/>
element to the parent (or just <{tagName}"/>
if the value is null
).public static java.lang.String readCustomField(Element parent, java.lang.String tagName)
public static java.util.List<java.lang.String> getChildrenValueAttributes(Element parent, java.lang.String childTagName)
public static void addChildrenWithValueAttribute(Element parent, java.lang.String childTagName, java.util.List<java.lang.String> attrValues)
public static void addChildren(Element parent, java.lang.String childElementName, java.util.Collection<? extends JDOMExternalizable> children) throws WriteExternalException
WriteExternalException
@Deprecated public static Element addElementWithValueAttribute(Element parent, java.lang.String childTagName, java.lang.String attrValue)
writeCustomField(Element, String, String)
@Deprecated public static java.lang.String getFirstChildValueAttribute(Element parent, java.lang.String childTagName)
readCustomField(Element, String)