public class DefaultDataImportService extends Object implements DataImportService
for details about what this does.
DataImportService.ImportError, DataImportService.ImportResult, DataImportService.ImportValidationResult
Constructor and Description |
---|
DefaultDataImportService(DataImportProductionDependencies dependencies,
GlobalPermissionManager permissionManager,
JiraHome jiraHome,
JiraLicenseUpdaterService jiraLicenseService,
I18nHelper.BeanFactory beanFactory,
OfBizDelegator ofBizDelegator,
ExternalLinkUtil externalLinkUtil,
ApplicationProperties applicationProperties,
BuildUtilsInfo buildUtilsInfo,
TaskManager taskManager,
ServiceManager serviceManager,
com.atlassian.mail.queue.MailQueue mailQueue,
ComponentFactory factory,
DbConnectionManager dbConnectionManager,
com.atlassian.event.spi.EventExecutorFactory eventExecutorFactory,
JiraProperties jiraSystemProperties,
ReindexRequestManager reindexRequestManager,
ClusterManager clusterManager,
UpgradeConstraints upgradeConstraints,
DataImportPropertiesValidationService propertiesValidationService,
OfbizImportHandlerFactory ofbizImportHandlerFactory,
UpgradeVersionHistoryManager upgradeVersionHistoryManager) |
Modifier and Type | Method and Description |
---|---|
void |
checkClusterNotActive(ErrorCollection errors,
I18nHelper i18n) |
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.
|
public DefaultDataImportService(DataImportProductionDependencies dependencies, GlobalPermissionManager permissionManager, JiraHome jiraHome, JiraLicenseUpdaterService jiraLicenseService, I18nHelper.BeanFactory beanFactory, OfBizDelegator ofBizDelegator, ExternalLinkUtil externalLinkUtil, ApplicationProperties applicationProperties, BuildUtilsInfo buildUtilsInfo, TaskManager taskManager, ServiceManager serviceManager, com.atlassian.mail.queue.MailQueue mailQueue, ComponentFactory factory, DbConnectionManager dbConnectionManager, com.atlassian.event.spi.EventExecutorFactory eventExecutorFactory, JiraProperties jiraSystemProperties, ReindexRequestManager reindexRequestManager, ClusterManager clusterManager, UpgradeConstraints upgradeConstraints, DataImportPropertiesValidationService propertiesValidationService, OfbizImportHandlerFactory ofbizImportHandlerFactory, UpgradeVersionHistoryManager upgradeVersionHistoryManager)
public DataImportService.ImportValidationResult validateImport(ApplicationUser loggedInUser, DataImportParams params)
DataImportService
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).
validateImport
in interface DataImportService
loggedInUser
- The currently logged in user (may be null during setup)params
- The DataImportParams
contain information provided by the user during import or setuppublic void checkClusterNotActive(ErrorCollection errors, I18nHelper i18n)
public DataImportService.ImportResult doImport(ApplicationUser loggedInUser, DataImportService.ImportValidationResult result, TaskProgressSink taskProgressSink)
DataImportService
doImport
in interface DataImportService
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-2018 Atlassian. All Rights Reserved.