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 Details

    • SimpleTagWriter

      public SimpleTagWriter(XMLTagWriter parent, String tagName)
      Creates a new optional simple tag writer.
      Parameters:
      parent - the parent writer, may be null
      tagName - the tag name
    • SimpleTagWriter

      public SimpleTagWriter(XMLTagWriter parent, String tagName, boolean mandatory)
      Creates a new simple tag writer.
      Parameters:
      parent - the parent writer, may be null
      tagName - the tag name
      mandatory - tells whether or not this tag requires a non-null value or not
  • Method Details

    • writeContent

      protected void writeContent(org.znerd.xmlenc.XMLOutputter xmlOut, Object object) throws IOException
      Outputs the given objects by calling its Object.toString() method.
      Specified by:
      writeContent in class XMLTagWriter
      Parameters:
      xmlOut - the XMLOutputter to write to
      object - the data object provided by the parent tag writer, may be null
      Throws:
      IOException
    • getTagName

      protected String getTagName()
      Returns the preset tag name.
      Specified by:
      getTagName in class XMLTagWriter