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
Simple xml tag writer holding a fixed tag name and writing the object's toString representation as PCDATA content.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTagWriter(XMLTagWriter parent, String tagName) Creates a new optional simple tag writer.SimpleTagWriter(XMLTagWriter parent, String tagName, boolean mandatory) Creates a new simple tag writer. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns the preset tag name.protected voidwriteContent(org.znerd.xmlenc.XMLOutputter xmlOut, 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 Details
-
SimpleTagWriter
Creates a new optional simple tag writer.- Parameters:
parent- the parent writer, may be nulltagName- the tag name
-
SimpleTagWriter
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 Details
-
writeContent
Outputs 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:
IOException
-
getTagName
Returns the preset tag name.- Specified by:
getTagNamein classXMLTagWriter
-