public class

ProjectImportBean

extends Object
java.lang.Object
   ↳ com.atlassian.jira.web.action.admin.importer.project.ProjectImportBean

Class Overview

Data object that is stored in the HTTP Session and used in various stages of the Project Import Wizard.

Summary

Public Methods
BackupOverview getBackupOverview()
This is the end result of the processing of Step 1.
MappingResult getMappingResult()
This is the result of mapping and validating the ProjectImportData.
ProjectImportData getProjectImportData()
This is the saved result of processing Step 2.
ProjectImportOptionsImpl getProjectImportOptions()
ProjectImportOptions are the very first thing we collect from the users.
ProjectImportResults getProjectImportResults()
This is set once we have performed the actual import.
BackupProject getSelectedProject()
This is a convenience method that looks up the selected project if there is one.
ProjectImportBean.TaskProgressInformation getTaskProgressInformation()
void setBackupOverview(BackupOverview backupOverview)
This is set as the end result of processing Step 1.
void setMappingResult(MappingResult mappingResult)
This is set as the result of mapping and validating the ProjectImportData and should be set every time we show the Step 3 (pre-import summary) screen.
void setProjectImportData(ProjectImportData projectImportData)
This is set as the result of moving from Step 2 to Step 3.
void setProjectImportOptions(ProjectImportOptionsImpl projectImportOptions)
This should be called from the doExecute of Step 1 when we have collected the backup path to the XML backup and the attachments.
void setProjectImportResults(ProjectImportResults projectImportResults)
This should be set once the import has completed.
Protected Methods
void finalize()
We want to try to make sure the temporary XML files are deleted, even if the session times out.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public BackupOverview getBackupOverview ()

This is the end result of the processing of Step 1. This is used to display the project select information on the Step 2 screen (project select). This is how you get hold of a BackupProject which is required to move to the next step in the import.

Returns
  • a BackupOverview containing all the "project" information about the projects that exist in the provided backup file.

public MappingResult getMappingResult ()

This is the result of mapping and validating the ProjectImportData. This is used to display Step 3 (pre-import summary screen). Everytime the pre-import summary screen is shown this object will be recalculated.

Returns
  • contains the results of mapping and validating the ProjectImportData

public ProjectImportData getProjectImportData ()

This is the saved result of processing Step 2. This contains all the registered and required values that are used in the selected project and the paths to the partitioned XML files that contain the projects data.

This object is validated to create a MappingResult which is used to display the validation messages on the summary screen.

This object can be used to create many instances of the MappingResult (which may be different if the user has changed the state of the current instance of JIRA).

This object is the NON-CHANGING data from Step 2.

Returns
  • the projectImportData which can be used to create a mapping result

public ProjectImportOptionsImpl getProjectImportOptions ()

ProjectImportOptions are the very first thing we collect from the users. This holds all the data the the user has input from the screen, from both Step 1 and Step 2 of the import.

Returns
  • the user inputted options

public ProjectImportResults getProjectImportResults ()

This is set once we have performed the actual import. This will let us know if the import was successful or not and how much was created.

Returns
  • results of the import

public BackupProject getSelectedProject ()

This is a convenience method that looks up the selected project if there is one. If the information has not been set this will return null.

Returns
  • the selected project, if there is one, null otherwise

public ProjectImportBean.TaskProgressInformation getTaskProgressInformation ()

public void setBackupOverview (BackupOverview backupOverview)

This is set as the end result of processing Step 1. Once we have processed the backup XML file we store this result here.

NOTE: if this object exists then the user should be able to resume the import at Step 2.

Parameters
backupOverview contains all the project and system information gleaned from the backup XML.

public void setMappingResult (MappingResult mappingResult)

This is set as the result of mapping and validating the ProjectImportData and should be set every time we show the Step 3 (pre-import summary) screen.

Parameters
mappingResult contains the error and warning information that was generated from the mapping and validation

public void setProjectImportData (ProjectImportData projectImportData)

This is set as the result of moving from Step 2 to Step 3.

Parameters
projectImportData the NON-CHANGING data from Step 2.

public void setProjectImportOptions (ProjectImportOptionsImpl projectImportOptions)

This should be called from the doExecute of Step 1 when we have collected the backup path to the XML backup and the attachments.

Parameters
projectImportOptions contains the backup path and the attachments path

public void setProjectImportResults (ProjectImportResults projectImportResults)

This should be set once the import has completed.

Parameters
projectImportResults the results of how the import when

Protected Methods

protected void finalize ()

We want to try to make sure the temporary XML files are deleted, even if the session times out.

Throws
Throwable