public class IssuePersisterHandler extends AbstractPersisterHandler implements ImportOfBizEntityHandler
Constructor and Description |
---|
IssuePersisterHandler(ProjectImportPersister projectImportPersister,
ProjectImportMapper projectImportMapper,
ApplicationUser importAuthor,
ProjectImportResults projectImportResults,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
Provides the implementation an opportunity to perform some action when the document is finished being read.
|
long |
getLargestIssueKeyNumber()
While running through all the issues this handler keeps track of what the largest issue key number it has
encountered.
|
void |
handleEntity(String entityName,
Map<String,String> attributes)
Will read the issue, transform it, save it, and keep the new mapped value.
|
void |
startDocument()
Provides the implementation an opportunity to perform some action when the document is starting to
be read.
|
execute
public IssuePersisterHandler(ProjectImportPersister projectImportPersister, ProjectImportMapper projectImportMapper, ApplicationUser importAuthor, ProjectImportResults projectImportResults, Executor executor)
public void handleEntity(String entityName, Map<String,String> attributes) throws ParseException, AbortImportException
handleEntity
in interface ImportOfBizEntityHandler
entityName
- the entity that is being processedattributes
- the map containing all the attributesParseException
- if something goes wrong interpreting the attributes into an objecAbortImportException
- to indicate to project import that it should abort its SAX parsing.public long getLargestIssueKeyNumber()
The issue key number is the numeric part of the key after the '-' of an issue key (e.g. TST-7, 7 is the issue key number).
public void startDocument()
ImportOfBizEntityHandler
startDocument
in interface ImportOfBizEntityHandler
public void endDocument()
ImportOfBizEntityHandler
endDocument
in interface ImportOfBizEntityHandler
Copyright © 2002-2019 Atlassian. All Rights Reserved.