com.atlassian.jira.action.admin.export
Class DefaultSaxEntitiesExporter

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

public class DefaultSaxEntitiesExporter
extends java.lang.Object
implements EntitiesExporter


Field Summary
static int DEFAULT_BUFFER_SIZE
           
protected static java.lang.String NL
           
 
Constructor Summary
DefaultSaxEntitiesExporter(org.ofbiz.core.entity.GenericDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo)
           
 
Method Summary
 long exportEntities(java.io.OutputStream outputStream, java.util.SortedSet<java.lang.String> entityNames, EntityXmlWriter entityWriter, com.opensymphony.user.User exportingUser)
          Exports the entities in the TreeSet to the outputStream.
protected  java.io.PrintWriter getWriter(java.io.OutputStream outputStream)
           
protected  void writeFooter(java.io.PrintWriter printWriter, com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.EntityCounter entityCounter)
          This closes out the XML documment.
protected  void writeHeader(java.io.PrintWriter printWriter, com.opensymphony.user.User exportingUser)
          This will write the start of the exported XML file out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

NL

protected static final java.lang.String NL
Constructor Detail

DefaultSaxEntitiesExporter

public DefaultSaxEntitiesExporter(org.ofbiz.core.entity.GenericDelegator delegator,
                                  ApplicationProperties applicationProperties,
                                  BuildUtilsInfo buildUtilsInfo)
Method Detail

exportEntities

public long exportEntities(java.io.OutputStream outputStream,
                           java.util.SortedSet<java.lang.String> entityNames,
                           EntityXmlWriter entityWriter,
                           com.opensymphony.user.User exportingUser)
                    throws java.io.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:
java.io.IOException
org.ofbiz.core.entity.GenericEntityException

getWriter

protected java.io.PrintWriter getWriter(java.io.OutputStream outputStream)
                                 throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

writeFooter

protected void writeFooter(java.io.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(java.io.PrintWriter printWriter,
                           com.opensymphony.user.User 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


Copyright © 2002-2010 Atlassian. All Rights Reserved.