public class

ReferenceAoPreImport

extends Object
implements PluggableImportAoEntityHandler
java.lang.Object
   ↳ com.atlassian.jira.dev.reference.plugin.imports.project.ReferenceAoPreImport

Class Overview

Reference plugin to observe AO data during the initial stages of a project import.

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.imports.project.ao.handler.PluggableImportAoEntityHandler
Public Constructors
ReferenceAoPreImport()
Public Methods
void endDocument()
Provides the implementation an opportunity to perform some action when the document is finished being read.
void endTable(String tableName)
Provides the implementation an opportunity to perform some action once all rows of a table are processed.
BackupProject getBackupProject()
BackupSystemInformation getBackupSystemInformation()
Long getEntityWeight(String entityName)
Return the weight for this entity.
ProjectImportMapper getProjectImportMapper()
@Nullable ProjectImportResults getProjectImportResults()
List<String> getTables()
void handleEntity(String entityName, Map<StringObject> attributes)
This is the main method to implement when using this ImportEntityHandler.
boolean handlesEntity(String entityName)
Return true if the handler should handle this entity.
boolean isDocEnded()
boolean isDocStarted()
void setBackupProject(BackupProject backupProject)
Set the backup project.
void setBackupSystemInformation(BackupSystemInformation backupSystemInformation)
Set the backup system information.
void setProjectImportMapper(ProjectImportMapper projectImportMapper)
Set the project import mapper.
void setProjectImportResults(ProjectImportResults projectImportResults)
Set the project import results.
void startDocument()
Provides the implementation an opportunity to perform some action when the document is starting to be read.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.imports.project.ao.handler.AoEntityHandler
From interface com.atlassian.jira.imports.project.ao.handler.PluggableImportAoEntityHandler
From interface com.atlassian.jira.imports.project.handler.PluggableImportHandler

Public Constructors

public ReferenceAoPreImport ()

Public Methods

public void endDocument ()

Provides the implementation an opportunity to perform some action when the document is finished being read.

public void endTable (String tableName)

Provides the implementation an opportunity to perform some action once all rows of a table are processed.

public BackupProject getBackupProject ()

public BackupSystemInformation getBackupSystemInformation ()

public Long getEntityWeight (String entityName)

Return the weight for this entity. If this handler is does not handle the entity or care about it's ordering return WEIGHT_NONE.

This is ignored (not called) during the pre-import stage where the entities are supplied in the backup XML order.

Returns
  • the weight by which to order this entity when importing.

public ProjectImportMapper getProjectImportMapper ()

@Nullable public ProjectImportResults getProjectImportResults ()

public List<String> getTables ()

public void handleEntity (String entityName, Map<StringObject> attributes)

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.

public boolean handlesEntity (String entityName)

Return true if the handler should handle this entity.

Returns
  • true if the handler should handle this entity.

public boolean isDocEnded ()

public boolean isDocStarted ()

public void setBackupProject (BackupProject backupProject)

Set the backup project. This will be injected after the handler is constructed, before any entities are processed.

Parameters
backupProject The backup project

public void setBackupSystemInformation (BackupSystemInformation backupSystemInformation)

Set the backup system information. This will be injected after the handler is constructed, before any entities are processed.

Parameters
backupSystemInformation The backup system information

public void setProjectImportMapper (ProjectImportMapper projectImportMapper)

Set the project import mapper. This will be injected after the handler is constructed, before any entities are processed.

Parameters
projectImportMapper The project import mapper

public void setProjectImportResults (ProjectImportResults projectImportResults)

Set 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.

Parameters
projectImportResults The project import results

public void startDocument ()

Provides the implementation an opportunity to perform some action when the document is starting to be read.