|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.ajaxtags.xml.BaseXmlBuilder<ValueItem>
net.sourceforge.ajaxtags.xml.AjaxValueListXmlBuilder
net.sourceforge.ajaxtags.xml.AjaxXmlBuilder
public final class AjaxXmlBuilder
Helper class to build valid XML typically returned in a response to the client.
Nested Class Summary | |
---|---|
static class |
AjaxXmlBuilder.AbstractCDataPropertyProvider<T>
Template for CData property provider (all items should be added as CData). |
static class |
AjaxXmlBuilder.AbstractPropertyProvider<T>
Template for text property provider (all items should be added as text, not as CData). |
static interface |
AjaxXmlBuilder.PropertyProvider<T>
Interface for property provider. |
static interface |
AjaxXmlBuilder.PropertyReader
Interface for objects with name/value/cData properties. |
Constructor Summary | |
---|---|
AjaxXmlBuilder()
|
Method Summary | ||
---|---|---|
AjaxXmlBuilder |
addItem(AjaxXmlBuilder.PropertyReader element)
Add item to XML. |
|
AjaxXmlBuilder |
addItem(String name,
String value)
Add item to XML. |
|
AjaxXmlBuilder |
addItem(String name,
String value,
boolean asCData)
Add item to XML. |
|
AjaxXmlBuilder |
addItemAsCData(String name,
String value)
Add item wrapped with inside a CDATA element. |
|
AjaxXmlBuilder |
addItems(Collection<? extends AjaxXmlBuilder.PropertyReader> collection)
Add collection of items to XML. |
|
|
addItems(Collection<? extends T> collection,
AjaxXmlBuilder.PropertyProvider<T> provider)
Add collection of items to XML. |
Methods inherited from class net.sourceforge.ajaxtags.xml.AjaxValueListXmlBuilder |
---|
addItem, addItem, getXMLString |
Methods inherited from class net.sourceforge.ajaxtags.xml.BaseXmlBuilder |
---|
add, clear, get, getEncoding, getItems, getList, isEmpty, setEncoding, setList, size, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AjaxXmlBuilder()
Method Detail |
---|
public AjaxXmlBuilder addItem(String name, String value)
name
- The name of the itemvalue
- The value of the item
public AjaxXmlBuilder addItemAsCData(String name, String value)
name
- The name of the itemvalue
- The value of the item
public AjaxXmlBuilder addItem(String name, String value, boolean asCData)
name
- The name of the itemvalue
- The value of the itemasCData
- add as CData
public AjaxXmlBuilder addItems(Collection<? extends AjaxXmlBuilder.PropertyReader> collection)
collection
- collection of items
public AjaxXmlBuilder addItem(AjaxXmlBuilder.PropertyReader element)
element
- item
public <T> AjaxXmlBuilder addItems(Collection<? extends T> collection, AjaxXmlBuilder.PropertyProvider<T> provider)
T
- class of itemscollection
- collection of itemsprovider
- provider to access properties of items
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |