com.atlassian.jira.web.action.admin.importer.project
Class ProjectImportBean

java.lang.Object
  extended by com.atlassian.jira.web.action.admin.importer.project.ProjectImportBean

public class ProjectImportBean
extends Object

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

Since:
v3.13

Method Summary
protected  void finalize()
          We want to try to make sure the temporary XML files are deleted, even if the session times out.
 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.
 com.atlassian.jira.web.action.admin.importer.project.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.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProjectImportOptions

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

setProjectImportOptions

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

getBackupOverview

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.

setBackupOverview

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.

getProjectImportData

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

setProjectImportData

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.

getMappingResult

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

setMappingResult

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

getProjectImportResults

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

setProjectImportResults

public void setProjectImportResults(ProjectImportResults projectImportResults)
This should be set once the import has completed.

Parameters:
projectImportResults - the results of how the import when

getTaskProgressInformation

public com.atlassian.jira.web.action.admin.importer.project.ProjectImportBean.TaskProgressInformation getTaskProgressInformation()

getSelectedProject

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

finalize

protected void finalize()
                 throws Throwable
We want to try to make sure the temporary XML files are deleted, even if the session times out.

Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2002-2012 Atlassian. All Rights Reserved.