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 Object
implements EntitiesExporter


Field Summary
static int DEFAULT_BUFFER_SIZE
           
static int DEFAULT_FETCH_SIZE
           
 
Constructor Summary
DefaultSaxEntitiesExporter(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo)
           
DefaultSaxEntitiesExporter(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo, DatabaseConfigurationManager databaseConfigurationManager)
           
 
Method Summary
 long exportEntities(OutputStream outputStream, SortedSet<String> entityNames, EntityXmlWriter entityWriter, com.atlassian.crowd.embedded.api.User exportingUser)
          Exports the entities in the TreeSet to the outputStream.
protected  PrintWriter getWriter(OutputStream outputStream)
           
protected  void writeFooter(PrintWriter printWriter, com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.EntityCounter entityCounter)
          This closes out the XML documment.
protected  void writeHeader(PrintWriter printWriter, com.atlassian.crowd.embedded.api.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

DEFAULT_FETCH_SIZE

public static final int DEFAULT_FETCH_SIZE
See Also:
Constant Field Values
Constructor Detail

DefaultSaxEntitiesExporter

public DefaultSaxEntitiesExporter(OfBizDelegator delegator,
                                  ApplicationProperties applicationProperties,
                                  BuildUtilsInfo buildUtilsInfo)

DefaultSaxEntitiesExporter

public DefaultSaxEntitiesExporter(OfBizDelegator delegator,
                                  ApplicationProperties applicationProperties,
                                  BuildUtilsInfo buildUtilsInfo,
                                  DatabaseConfigurationManager databaseConfigurationManager)
Method Detail

exportEntities

public long exportEntities(OutputStream outputStream,
                           SortedSet<String> entityNames,
                           EntityXmlWriter entityWriter,
                           com.atlassian.crowd.embedded.api.User 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,
                           com.atlassian.crowd.embedded.api.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-2014 Atlassian. All Rights Reserved.