Package de.hybris.bootstrap.xml
Class SimpleTagWriter
- java.lang.Object
-
- de.hybris.bootstrap.xml.XMLTagWriter
-
- de.hybris.bootstrap.xml.SimpleTagWriter
-
- Direct Known Subclasses:
DateTagWriter,NumberTagWriter
public class SimpleTagWriter extends XMLTagWriter
Simple xml tag writer holding a fixed tag name and writing the object's toString representation as PCDATA content.
-
-
Constructor Summary
Constructors Constructor Description SimpleTagWriter(XMLTagWriter parent, java.lang.String tagName)Creates a new optional simple tag writer.SimpleTagWriter(XMLTagWriter parent, java.lang.String tagName, boolean mandatory)Creates a new simple tag writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetTagName()Returns the preset tag name.protected voidwriteContent(org.znerd.xmlenc.XMLOutputter xmlOut, java.lang.Object object)Outputs the given objects by calling itsObject.toString()method.-
Methods inherited from class de.hybris.bootstrap.xml.XMLTagWriter
addSubTagWriter, addSubTagWriter, addSubTagWriter, debug, error, getAllSubTagWriter, getAttributesMap, getEnclosingWriter, getParent, getSubTagWriter, getSubTagWriter, getSubTagWriterMap, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isMandatory, isWarnEnabled, warn, write
-
-
-
-
Constructor Detail
-
SimpleTagWriter
public SimpleTagWriter(XMLTagWriter parent, java.lang.String tagName)
Creates a new optional simple tag writer.- Parameters:
parent- the parent writer, may be nulltagName- the tag name
-
SimpleTagWriter
public SimpleTagWriter(XMLTagWriter parent, java.lang.String tagName, boolean mandatory)
Creates a new simple tag writer.- Parameters:
parent- the parent writer, may be nulltagName- the tag namemandatory- tells whether or not this tag requires a non-null value or not
-
-
Method Detail
-
writeContent
protected void writeContent(org.znerd.xmlenc.XMLOutputter xmlOut, java.lang.Object object) throws java.io.IOExceptionOutputs the given objects by calling itsObject.toString()method.- Specified by:
writeContentin classXMLTagWriter- Parameters:
xmlOut- theXMLOutputterto write toobject- the data object provided by the parent tag writer, may be null- Throws:
java.io.IOException
-
getTagName
protected java.lang.String getTagName()
Returns the preset tag name.- Specified by:
getTagNamein classXMLTagWriter
-
-