com.atlassian.jira.imports.project.handler
Class IssuePartitonHandler

java.lang.Object
  extended by com.atlassian.jira.imports.project.handler.AbstractImportPartitionHandler
      extended by com.atlassian.jira.imports.project.handler.IssuePartitonHandler
All Implemented Interfaces:
ImportEntityHandler

public class IssuePartitonHandler
extends AbstractImportPartitionHandler

Parses an XML import file and creates a reduced XML file with just the Issues for the given project.

Since:
v3.13

Field Summary
 
Fields inherited from class com.atlassian.jira.imports.project.handler.AbstractImportPartitionHandler
delegator
 
Constructor Summary
IssuePartitonHandler(BackupProject backupProject, PrintWriter printWriter, org.ofbiz.core.entity.model.ModelEntity modelEntity, String encoding, org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
           
 
Method Summary
 int getEntityCount()
           
 void handleEntity(String entityName, Map<String,String> attributes)
          This is the main method to implement when using this ImportEntityHandler.
 
Methods inherited from class com.atlassian.jira.imports.project.handler.AbstractImportPartitionHandler
assertModelEntityForName, endDocument, getEncoding, startDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssuePartitonHandler

public IssuePartitonHandler(BackupProject backupProject,
                            PrintWriter printWriter,
                            org.ofbiz.core.entity.model.ModelEntity modelEntity,
                            String encoding,
                            org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
Parameters:
backupProject - contains the issue id's that we are interested in partitioning.
printWriter - the partitioned writer that should be written to if the entity being processed should be written.
modelEntity - is the ModelEntity for the "Issue" entity
encoding - is the encoding that the partitioned files are going to writen in.
delegatorInterface - required for persistence
Method Detail

handleEntity

public void handleEntity(String entityName,
                         Map<String,String> attributes)
                  throws ParseException
Description copied from interface: ImportEntityHandler
This is the main method to implement when using this ImportEntityHandler. This method will provide the entity name and a complete map of attribute key/value pairs. This includes any nested element tags that will have CDATA bodies.

Parameters:
entityName - identifies the entity (i.e. Issue)
attributes - complete list of the attributes listed in the XML element including the nested elements.
Throws:
ParseException - if the entity is invalid a ParseException will be thrown.

getEntityCount

public int getEntityCount()


Copyright © 2002-2015 Atlassian. All Rights Reserved.