public interface DataImportService
This service is responsible for performing some basic validation of the input as well as more advanced validation of the actual data provided. An import consists of the following steps:
validateImport(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.dataimport.DataImportParams)
)Modifier and Type | Interface and Description |
---|---|
static class |
DataImportService.ImportError
Returned by the
DataImportService.ImportResult from a call to DataImportService#doImport(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.dataimport.DataImportService.ImportValidationResult, TaskProgressSink) |
static class |
DataImportService.ImportResult
Represents the result of performing an import.
|
static class |
DataImportService.ImportValidationResult
An import validation result returned by the
DataImportService#validateImport(com.atlassian.crowd.embedded.api.User,
DataImportParams) method. |
Modifier and Type | Method and Description |
---|---|
DataImportService.ImportResult |
doImport(ApplicationUser loggedInUser,
DataImportService.ImportValidationResult result,
TaskProgressSink taskProgressSink)
Performs the actual import given a valid validation result.
|
DataImportService.ImportValidationResult |
validateImport(ApplicationUser loggedInUser,
DataImportParams params)
Given the currently loggedInUser and import params this method does some basic validation of the input.
|
DataImportService.ImportValidationResult validateImport(ApplicationUser loggedInUser, DataImportParams params)
In particular this method checks if the user has sysadmin permission. If this method is called from Setup (as indicated by the DataImportParams) the permission check is skipped. Further it will validate that the import xml file exists and verify that the pasted license is valid (if one was provided).
loggedInUser
- The currently logged in user (may be null during setup)params
- The DataImportParams
contain information provided by the user during import or setupDataImportService.ImportResult doImport(ApplicationUser loggedInUser, DataImportService.ImportValidationResult result, TaskProgressSink taskProgressSink)
loggedInUser
- The currently logged in user (may be null during setup)result
- A valid validation result containing the DataImportParams
providedtaskProgressSink
- A task progress counter that can be used to indicate how much longer the import has to go.
if no progress needs to be recorded simply provide a TaskProgressSink.NULL_SINK
Copyright © 2002-2019 Atlassian. All Rights Reserved.