Class DefaultSaxEntitiesExporter

java.lang.Object
com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter
All Implemented Interfaces:
EntitiesExporter

public class DefaultSaxEntitiesExporter extends Object implements EntitiesExporter
  • Field Details

  • Constructor Details

  • Method Details

    • exportEntities

      public long exportEntities(OutputStream outputStream, SortedSet<String> entityNames, EntityXmlWriter entityWriter, ApplicationUser exportingUser) throws IOException, org.ofbiz.core.entity.GenericEntityException
      Description copied from interface: EntitiesExporter
      Exports the entities in the TreeSet to the outputStream.
      Specified by:
      exportEntities in interface EntitiesExporter
      Parameters:
      outputStream - - the stream to write to
      entityNames - - the entities names to write out
      entityWriter - - an XML output helper that can write generic values to XML
      exportingUser - - the user performing the export operation
      Returns:
      the number of individual entities written
      Throws:
      IOException
      org.ofbiz.core.entity.GenericEntityException
    • getWriter

      protected PrintWriter getWriter(OutputStream outputStream) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • writeFooter

      protected void writeFooter(PrintWriter printWriter, com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.EntityCounter entityCounter)
      This closes out the XML documment.
      Parameters:
      printWriter - a PrintWriter to write to
      entityCounter - a count of entities written
    • writeHeader

      protected void writeHeader(PrintWriter printWriter, ApplicationUser exportingUser)
      This will write the start of the exported XML file out. This includes the XML declaration and the top level root element
      Parameters:
      printWriter - a PrintWriter to write to
      exportingUser - the user doing the export