Class ProjectImportMapperImpl
java.lang.Object
com.atlassian.jira.imports.project.mapper.ProjectImportMapperImpl
- All Implemented Interfaces:
ProjectImportMapper
Implementation of ProjectImportMapper. Constructing this object will create all the sub-mappers.
- Since:
- v3.13
-
Constructor Summary
ConstructorsConstructorDescriptionProjectImportMapperImpl
(UserUtil userUtil, UserManager userManager, GroupManager groupManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
This will clear any mapped data that may have been entered into the mappers.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.Gets a ProjectImportIdMapper that maps the Comment id's from the old backup project data to the id's in the current system.Gets a ProjectImportIdMapper which, when fully populated, indicates all the project components "in-use" (required) by the backup projects data.Gets a CustomFieldMapper which, when fully populated, indicates all the custom fields "in-use" (required) by the backup projects data.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.Gets a ProjectImportIdMapper which, when fully populated, indicates all the groups "in-use" (required) by the backup projects data.Gets a ProjectImportIdMapper that maps the IssueLinkType id's from the old backup project data to the id's in the current system.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.Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue security levels "in-use" (required) by the backup projects data.Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue issue types "in-use" (required) by the backup projects data.<T extends ProjectImportIdMapper>
TgetNamedIdMapper
(String name) Get a mapper from the list of mappers.Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue priorities "in-use" (required) by the backup projects data.Gets a ProjectImportIdMapper which, when fully populated, indicates all the projects from the backup file and the mapped projects in the current JIRA instance.Gets a ProjectRoleActorMapper which, when fully populated, indicates all the ProjectRoleActors "in-use" (optional) by the backup projects data's issues.Gets a ProjectImportIdMapper which, when fully populated, indicates all the project roles "in-use" (required) by the backup projects data.Gets a ProjectImportIdMapper which, when fully populated, indicates all the issue resolutions "in-use" (required) by the backup projects data.Gets a StatusMapper which, when fully populated, indicates all the issue statuses "in-use" (required) by the backup projects data.Gets a UserMapper which, when fully populated, indicates all the users "in-use" (required) by the backup projects data's issues.Gets a ProjectImportIdMapper which, when fully populated, indicates all the project versions "in-use" (required) by the backup projects data.putNamedIdMapper
(String name, ProjectImportIdMapper mapper) Add a mapper to the list of mappers.toString()
-
Constructor Details
-
ProjectImportMapperImpl
public ProjectImportMapperImpl(UserUtil userUtil, UserManager userManager, GroupManager groupManager)
-
-
Method Details
-
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 interfaceProjectImportMapper
- Returns:
- a ProjectImportIdMapper that maps JIRA issue id's from old to new.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing project id mappings.
-
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 interfaceProjectImportMapper
- Returns:
- UserMapper containing user id's that are required.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectRoleActorMapper containing ExternalProjectRoleActors that are in use.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing user id's that are required.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing issue security level information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing issue fix and affects version information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing project components information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing project role information.
-
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 interfaceProjectImportMapper
- Returns:
- CustomFieldMapper containing custom field information.
-
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 interfaceProjectImportMapper
- Returns:
- CustomFieldOptionMapper containing custom field option mapping information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing issue issue type information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing issue priority information.
-
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 interfaceProjectImportMapper
- Returns:
- ProjectImportIdMapper containing issue resolution information.
-
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 interfaceProjectImportMapper
- Returns:
- StatusMapper containing issue status information.
-
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 interfaceProjectImportMapper
- Returns:
- a ProjectImportIdMapper that maps IssueLinkType id's from old to new.
-
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 interfaceProjectImportMapper
- Returns:
- a ProjectImportIdMapper that maps JIRA change group id's from old to new.
-
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 interfaceProjectImportMapper
- 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 interfaceProjectImportMapper
-
putNamedIdMapper
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 interfaceProjectImportMapper
- Parameters:
name
- The name for this mapper. Plugins should namespace their mappers to avoid conflicts.mapper
- AProjectImportIdMapper
- Returns:
- The mapper.
-
getNamedIdMapper
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 interfaceProjectImportMapper
- Parameters:
name
- The name for this mapper. Plugins should namespace their mappers to avoid conflicts.- Returns:
- The mapper.
-
toString
-