Class ErrorCollectionTransformerImpl

java.lang.Object
com.atlassian.greenhopper.model.validation.ErrorCollectionTransformerImpl
All Implemented Interfaces:
ErrorCollectionTransformer

public class ErrorCollectionTransformerImpl extends Object implements ErrorCollectionTransformer
  • Constructor Details

    • ErrorCollectionTransformerImpl

      public ErrorCollectionTransformerImpl(I18nFactoryService i18nFactoryService, com.atlassian.jira.security.JiraAuthenticationContext jiraAuthenticationContext)
  • Method Details

    • toJiraErrorCollection

      public com.atlassian.jira.util.ErrorCollection toJiraErrorCollection(ErrorCollection errorCollection, com.atlassian.jira.user.ApplicationUser user)
      Description copied from interface: ErrorCollectionTransformer
      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.
      Specified by:
      toJiraErrorCollection in interface ErrorCollectionTransformer
      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

      public com.atlassian.jira.util.ErrorCollection toJiraErrorCollection(ErrorCollection errorCollection)
      Description copied from interface: ErrorCollectionTransformer
      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.
      Specified by:
      toJiraErrorCollection in interface ErrorCollectionTransformer
      Parameters:
      errorCollection - GreenHopper's ErrorCollection which be transformed to JIRA's ErrorCollection
      Returns:
      JIRA's ErrorCollection