Class DefaultSaxEntitiesExporter
java.lang.Object
com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter
- All Implemented Interfaces:
EntitiesExporter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSaxEntitiesExporter
(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo) DefaultSaxEntitiesExporter
(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo, DatabaseConfigurationManager databaseConfigurationManager) -
Method Summary
Modifier and TypeMethodDescriptionlong
exportEntities
(OutputStream outputStream, SortedSet<String> entityNames, EntityXmlWriter entityWriter, ApplicationUser 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, ApplicationUser exportingUser) This will write the start of the exported XML file out.
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
DEFAULT_FETCH_SIZE
public static final int DEFAULT_FETCH_SIZE- See Also:
-
-
Constructor Details
-
DefaultSaxEntitiesExporter
public DefaultSaxEntitiesExporter(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo) -
DefaultSaxEntitiesExporter
public DefaultSaxEntitiesExporter(OfBizDelegator delegator, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo, DatabaseConfigurationManager databaseConfigurationManager)
-
-
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 interfaceEntitiesExporter
- Parameters:
outputStream
- - the stream to write toentityNames
- - the entities names to write outentityWriter
- - an XML output helper that can write generic values to XMLexportingUser
- - the user performing the export operation- Returns:
- the number of individual entities written
- Throws:
IOException
org.ofbiz.core.entity.GenericEntityException
-
getWriter
- Throws:
UnsupportedEncodingException
-
writeHeader
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 toexportingUser
- the user doing the export
-