public class

DefaultImportResultHandler

extends Object
implements ImportResultHandler
java.lang.Object
   ↳ com.atlassian.jira.web.action.util.DefaultImportResultHandler

Class Overview

An error handler to be used both by SetupImport and ImportAll for some consistent error handling.

Summary

Public Constructors
DefaultImportResultHandler(JiraLicenseService jiraLicenseService, LicenseJohnsonEventRaiser licenseJohnsonEventRaiser, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo)
Public Methods
boolean handleErrorResult(ServletContext context, DataImportService.ImportResult lastResult, I18nHelper i18n, ErrorCollection errorCollection)
Given an import result this method will take the appropriate actions to deal with errors such as throwing up JohnsonEvents or populating the passed in errorcollection with the appropriate errors.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.web.action.util.ImportResultHandler

Public Constructors

public DefaultImportResultHandler (JiraLicenseService jiraLicenseService, LicenseJohnsonEventRaiser licenseJohnsonEventRaiser, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo)

Public Methods

public boolean handleErrorResult (ServletContext context, DataImportService.ImportResult lastResult, I18nHelper i18n, ErrorCollection errorCollection)

Given an import result this method will take the appropriate actions to deal with errors such as throwing up JohnsonEvents or populating the passed in errorcollection with the appropriate errors.

Parameters
context The servlet context needed to throw up a JohnsonEvent.
lastResult The import result with validation errors.
i18n I18n bean needed to i18nize any error messages
errorCollection The error collection to populate with specific error messages
Returns
  • true if a JohnsonEvent was created meaning callers should probably redirect to a generic error page to see the JohnsonEvent.