Class ProjectImportMapperImpl

java.lang.Object
com.atlassian.jira.imports.project.mapper.ProjectImportMapperImpl
All Implemented Interfaces:
ProjectImportMapper

public class ProjectImportMapperImpl extends Object implements ProjectImportMapper
Implementation of ProjectImportMapper. Constructing this object will create all the sub-mappers.
Since:
v3.13
  • Constructor Details

  • Method Details

    • getIssueMapper

      public SimpleProjectImportIdMapper getIssueMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper that maps the issue id's from the old backup project data to the id's generated when adding the issue data to the new JIRA instance.

      NOTE: This is only populated once the issues have been persisted into the new system.

      Specified by:
      getIssueMapper in interface ProjectImportMapper
      Returns:
      a ProjectImportIdMapper that maps JIRA issue id's from old to new.
    • getProjectMapper

      public SimpleProjectImportIdMapper getProjectMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the projects from the backup file and the mapped projects in the current JIRA instance. The projects are mapped by project key.
      Specified by:
      getProjectMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing project id mappings.
    • getUserMapper

      public UserMapper getUserMapper()
      Description copied from interface: ProjectImportMapper
      Gets a UserMapper which, when fully populated, indicates all the users "in-use" (required) by the backup projects data's issues.
      Specified by:
      getUserMapper in interface ProjectImportMapper
      Returns:
      UserMapper containing user id's that are required.
    • getProjectRoleActorMapper

      public ProjectRoleActorMapper getProjectRoleActorMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectRoleActorMapper which, when fully populated, indicates all the ProjectRoleActors "in-use" (optional) by the backup projects data's issues.
      Specified by:
      getProjectRoleActorMapper in interface ProjectImportMapper
      Returns:
      ProjectRoleActorMapper containing ExternalProjectRoleActors that are in use.
    • getGroupMapper

      public GroupMapper getGroupMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the groups "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "jira-developers", "jira-administrators", etc.) for groups and will indicate which are in-use by the backup data's issues.
      Specified by:
      getGroupMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing user id's that are required.
    • getIssueSecurityLevelMapper

      public SimpleProjectImportIdMapper getIssueSecurityLevelMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue security levels "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Level 1", "Level 2", etc.) for all issue security levels that are valid for the backup project as defined by the backup projects issue security scheme. The mapper will indicate which are in-use by the backup data's issues.
      Specified by:
      getIssueSecurityLevelMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing issue security level information.
    • getVersionMapper

      public SimpleProjectImportIdMapper getVersionMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the project versions "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Version 3.1.2", "Version 3.2.1", etc.) for all affects and fix versions and will indicate which are in-use by the backup data's issues.
      Specified by:
      getVersionMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing issue fix and affects version information.
    • getComponentMapper

      public SimpleProjectImportIdMapper getComponentMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the project components "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Comp 1", "Comp 2", etc.) for all components and will indicate which are in-use by the backup data's issues.
      Specified by:
      getComponentMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing project components information.
    • getProjectRoleMapper

      public SimpleProjectImportIdMapper getProjectRoleMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the project roles "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Developer", "Administrator", etc.) for all project roles and will indicate which are in-use by the backup data's comments and worklogs.
      Specified by:
      getProjectRoleMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing project role information.
    • getCustomFieldMapper

      public CustomFieldMapper getCustomFieldMapper()
      Description copied from interface: ProjectImportMapper
      Gets a CustomFieldMapper which, when fully populated, indicates all the custom fields "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "My Text CF", "Extra Reporter CF", etc.) for custom fields that are valid for the backup project as defined by the custom fields configuration. The mapper will indicate which are in-use by the backup data's issues. The mapper will also indicate which issue types are in use for a given custom field.
      Specified by:
      getCustomFieldMapper in interface ProjectImportMapper
      Returns:
      CustomFieldMapper containing custom field information.
    • getCustomFieldOptionMapper

      public CustomFieldOptionMapper getCustomFieldOptionMapper()
      Description copied from interface: ProjectImportMapper
      Gets a CustomFieldOptionMapper which, when fully populated, indicates how to map the IDs of the Custom Field Options in the Import file, to the equivalent Option in the current JIRA.
      Specified by:
      getCustomFieldOptionMapper in interface ProjectImportMapper
      Returns:
      CustomFieldOptionMapper containing custom field option mapping information.
    • getIssueTypeMapper

      public IssueTypeMapper getIssueTypeMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue issue types "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Bug", "Task", etc.) for all issue types and will indicate which are in-use by the backup data's issues.
      Specified by:
      getIssueTypeMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing issue issue type information.
    • getPriorityMapper

      public SimpleProjectImportIdMapper getPriorityMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue priorities "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Blocker", "Critical", etc.) for all priorities and will indicate which are in-use by the backup data's issues.
      Specified by:
      getPriorityMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing issue priority information.
    • getResolutionMapper

      public SimpleProjectImportIdMapper getResolutionMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue resolutions "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "Fixed", "Won't Fix", etc.) for all resolutions and will indicate which are in-use by the backup data's issues.
      Specified by:
      getResolutionMapper in interface ProjectImportMapper
      Returns:
      ProjectImportIdMapper containing issue resolution information.
    • getStatusMapper

      public StatusMapper getStatusMapper()
      Description copied from interface: ProjectImportMapper
      Gets a StatusMapper which, when fully populated, indicates all the issue statuses "in-use" (required) by the backup projects data. The mapper will contain the id and key (e.g. "In Progress", "Open", etc.) for all statuses and will indicate which are in-use by the backup data's issues.
      Specified by:
      getStatusMapper in interface ProjectImportMapper
      Returns:
      StatusMapper containing issue status information.
    • getIssueLinkTypeMapper

      public IssueLinkTypeMapper getIssueLinkTypeMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper that maps the IssueLinkType id's from the old backup project data to the id's in the current system.
      Specified by:
      getIssueLinkTypeMapper in interface ProjectImportMapper
      Returns:
      a ProjectImportIdMapper that maps IssueLinkType id's from old to new.
    • getChangeGroupMapper

      public SimpleProjectImportIdMapper getChangeGroupMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper that maps the change group id's from the old backup project data to the id's generated when adding the change group data to the new JIRA instance.

      NOTE: This is only populated once the change groups have been persisted into the new system.

      Specified by:
      getChangeGroupMapper in interface ProjectImportMapper
      Returns:
      a ProjectImportIdMapper that maps JIRA change group id's from old to new.
    • getCommentMapper

      public SimpleProjectImportIdMapper getCommentMapper()
      Description copied from interface: ProjectImportMapper
      Gets a ProjectImportIdMapper that maps the Comment id's from the old backup project data to the id's in the current system.
      Specified by:
      getCommentMapper in interface ProjectImportMapper
      Returns:
      a ProjectImportIdMapper that maps JIRA comment id's from old to new.
    • clearMappedValues

      public void clearMappedValues()
      Description copied from interface: ProjectImportMapper
      This will clear any mapped data that may have been entered into the mappers. All registered values and values that have been flagged as required will not be changed. This method only affects the mapped data. It is used to re-map and re-validate the data after the user has made changes to the current configuration.
      Specified by:
      clearMappedValues in interface ProjectImportMapper
    • putNamedIdMapper

      public ProjectImportIdMapper putNamedIdMapper(String name, ProjectImportIdMapper mapper)
      Description copied from interface: ProjectImportMapper
      Add a mapper to the list of mappers. This can be used by plugins to register their id mappers.
      Specified by:
      putNamedIdMapper in interface ProjectImportMapper
      Parameters:
      name - The name for this mapper. Plugins should namespace their mappers to avoid conflicts.
      mapper - A ProjectImportIdMapper
      Returns:
      The mapper.
    • getNamedIdMapper

      public <T extends ProjectImportIdMapper> T getNamedIdMapper(String name)
      Description copied from interface: ProjectImportMapper
      Get a mapper from the list of mappers. This can be used by plugins to retrieve their id mappers.
      Specified by:
      getNamedIdMapper in interface ProjectImportMapper
      Parameters:
      name - The name for this mapper. Plugins should namespace their mappers to avoid conflicts.
      Returns:
      The mapper.
    • toString

      public String toString()
      Overrides:
      toString in class Object