Class ReferenceAoPreImport
java.lang.Object
com.atlassian.jira.dev.reference.plugin.imports.project.ReferenceAoPreImport
- All Implemented Interfaces:
AoEntityHandler,PluggableImportAoEntityHandler,PluggableImportHandler
Reference plugin to observe AO data during the initial stages of a project import.
- Since:
- v7.0
-
Field Summary
Fields inherited from interface com.atlassian.jira.imports.project.ao.handler.PluggableImportAoEntityHandler
WEIGHT_NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProvides the implementation an opportunity to perform some action when the document is finished being read.voidProvides the implementation an opportunity to perform some action once all rows of a table are processed.getEntityWeight(String entityName) Return the weight for this entity.voidhandleEntity(String entityName, Map<String, Object> attributes) This is the main method to implement when using this ImportEntityHandler.booleanhandlesEntity(String entityName) Return true if the handler should handle this entity.booleanbooleanvoidsetBackupProject(BackupProject backupProject) Set the backup project.voidsetBackupSystemInformation(BackupSystemInformation backupSystemInformation) Set the backup system information.voidsetProjectImportMapper(ProjectImportMapper projectImportMapper) Set the project import mapper.voidsetProjectImportResults(ProjectImportResults projectImportResults) Set the project import results.voidProvides the implementation an opportunity to perform some action when the document is starting to be read.
-
Constructor Details
-
ReferenceAoPreImport
public ReferenceAoPreImport()
-
-
Method Details
-
handleEntity
public void handleEntity(String entityName, Map<String, Object> attributes) throws ParseException, AbortImportExceptionDescription copied from interface:AoEntityHandlerThis 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.- Specified by:
handleEntityin interfaceAoEntityHandler- 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.AbortImportException- to indicate to Project Import that it should abort its SAX parsing.
-
handlesEntity
Description copied from interface:AoEntityHandlerReturn true if the handler should handle this entity.- Specified by:
handlesEntityin interfaceAoEntityHandler- Returns:
- true if the handler should handle this entity.
-
getEntityWeight
Description copied from interface:PluggableImportAoEntityHandlerReturn the weight for this entity. If this handler is does not handle the entity or care about it's ordering returnPluggableImportAoEntityHandler.WEIGHT_NONE.This is ignored (not called) during the pre-import stage where the entities are supplied in the backup XML order.
- Specified by:
getEntityWeightin interfacePluggableImportAoEntityHandler- Returns:
- the weight by which to order this entity when importing.
-
startDocument
public void startDocument()Description copied from interface:AoEntityHandlerProvides the implementation an opportunity to perform some action when the document is starting to be read.- Specified by:
startDocumentin interfaceAoEntityHandler
-
endDocument
public void endDocument()Description copied from interface:AoEntityHandlerProvides the implementation an opportunity to perform some action when the document is finished being read.- Specified by:
endDocumentin interfaceAoEntityHandler
-
endTable
Description copied from interface:AoEntityHandlerProvides the implementation an opportunity to perform some action once all rows of a table are processed.- Specified by:
endTablein interfaceAoEntityHandler
-
setBackupProject
Description copied from interface:PluggableImportHandlerSet the backup project. This will be injected after the handler is constructed, before any entities are processed.- Specified by:
setBackupProjectin interfacePluggableImportHandler- Parameters:
backupProject- The backup project
-
setBackupSystemInformation
Description copied from interface:PluggableImportHandlerSet the backup system information. This will be injected after the handler is constructed, before any entities are processed.- Specified by:
setBackupSystemInformationin interfacePluggableImportHandler- Parameters:
backupSystemInformation- The backup system information
-
setProjectImportMapper
Description copied from interface:PluggableImportHandlerSet the project import mapper. This will be injected after the handler is constructed, before any entities are processed.- Specified by:
setProjectImportMapperin interfacePluggableImportHandler- Parameters:
projectImportMapper- The project import mapper
-
setProjectImportResults
Description copied from interface:PluggableImportHandlerSet the project import results. This will be injected after the handler is constructed, before any entities are processed. For pre-import handlers this will be null.- Specified by:
setProjectImportResultsin interfacePluggableImportHandler- Parameters:
projectImportResults- The project import results
-
isDocStarted
public boolean isDocStarted() -
isDocEnded
public boolean isDocEnded() -
getTables
-
getBackupProject
-
getBackupSystemInformation
-
getProjectImportMapper
-
getProjectImportResults
-