Interface ErrorCollectionTransformer

All Known Implementing Classes:
ErrorCollectionTransformerImpl

@ExperimentalApi public interface ErrorCollectionTransformer
Transforms GreenHopper's ErrorCollection to JIRA's ErrorCollection.
Since:
v6.7
  • Method Details

    • toJiraErrorCollection

      com.atlassian.jira.util.ErrorCollection toJiraErrorCollection(ErrorCollection errorCollection, @Nullable com.atlassian.jira.user.ApplicationUser user)
      Transforms GreenHopper's ErrorCollection to JIRA's ErrorCollection. GreenHopper's ErrorCollection contains keys of errors opposite to the ErrorCollection which contains already translated errors. During transformation errors keys are translated to error messages.
      Parameters:
      errorCollection - GreenHopper's ErrorCollection which be transformed to JIRA's ErrorCollection
      user - user which performed operation. Errors will be translated to his language. If it is null then errors will be translated in JIRA's default language.
      Returns:
      JIRA's ErrorCollection
    • toJiraErrorCollection

      com.atlassian.jira.util.ErrorCollection toJiraErrorCollection(ErrorCollection errorCollection)
      Transforms GreenHopper's ErrorCollection to JIRA's ErrorCollection. GreenHopper's ErrorCollection contains keys of errors opposite to the ErrorCollection which contains already translated errors. During transformation errors keys are translated to error messages. Errors will be translated to currently logged user's language.
      Parameters:
      errorCollection - GreenHopper's ErrorCollection which be transformed to JIRA's ErrorCollection
      Returns:
      JIRA's ErrorCollection