@Internal public abstract class AbstractMapper extends Object implements ProjectImportIdMapper
Constructor and Description |
---|
AbstractMapper() |
Modifier and Type | Method and Description |
---|---|
void |
clearMappedValues()
This will clear any mapped data that may have been entered into the mappers.
|
protected void |
flagValueAsRequired(String oldId)
This is an internal method for use by Mappers extending AbstractMapper and should not be called from other classes.
|
Collection<String> |
getAllMappedIds()
Returns a Collection of all the new IDs that are mapped to.
|
String |
getDisplayName(String oldId)
Returns a display name for the given old ID.
|
String |
getKey(String oldId)
Returns the registered "key" for the given old ID, or
null if none is registered. |
String |
getMappedId(String oldId)
Retrieves a String that corresponds to the id in the target JIRA system, null if none has been mapped.
|
Collection<String> |
getRegisteredOldIds()
Returns a collection of ID's as String objects identifying all objects of the appropriate type found in the import file.
|
Collection<String> |
getRequiredOldIds()
Returns a collection of ID's as String objects identifying objects from the import file that are required for the import.
|
Collection<IdKeyPair> |
getValuesFromImport()
Deprecated.
Use getRegisteredOldIds(). Since 5.0
|
void |
mapValue(String oldId,
String newId)
This method maps a value from the backup system to a valid value in the target system.
|
protected void |
registerOldValue(String oldId,
String oldKey)
This is an internal method for use by Mappers extending AbstractMapper and should not be called from other classes.
|
public Collection<String> getRequiredOldIds()
ProjectImportIdMapper
getRequiredOldIds
in interface ProjectImportIdMapper
public Collection<String> getRegisteredOldIds()
ProjectImportIdMapper
ProjectImportIdMapper.getKey(String)
method to extract this key.getRegisteredOldIds
in interface ProjectImportIdMapper
ProjectImportIdMapper.getRequiredOldIds()
,
ProjectImportIdMapper.getKey(String)
protected void flagValueAsRequired(String oldId)
oldId
- The ID of the required object from the import file.public void mapValue(String oldId, String newId)
ProjectImportIdMapper
mapValue
in interface ProjectImportIdMapper
oldId
- the string representation of the id of the backup value.newId
- the string representation of the id of the valid mapped value in the target system.public String getMappedId(String oldId)
ProjectImportIdMapper
getMappedId
in interface ProjectImportIdMapper
oldId
- identifies the mapping we are looking for.public Collection<String> getAllMappedIds()
ProjectImportIdMapper
getAllMappedIds
in interface ProjectImportIdMapper
protected void registerOldValue(String oldId, String oldKey)
oldId
- The ID of the required object from the import file.oldKey
- The unique key of the required object from the import file.public String getDisplayName(String oldId)
ProjectImportIdMapper
getDisplayName
in interface ProjectImportIdMapper
oldId
- The old ID.ProjectImportIdMapper.getKey(String)
public String getKey(String oldId)
ProjectImportIdMapper
null
if none is registered.
This is the unique "name" that will be used for automatic mapping of objects in the import file to the objects in
the current JIRA system.getKey
in interface ProjectImportIdMapper
oldId
- The old ID.null
if none is registered.ProjectImportIdMapper.getDisplayName(String)
,
ProjectImportIdMapper.getRegisteredOldIds()
@Deprecated public Collection<IdKeyPair> getValuesFromImport()
IdKeyPair representing objects from the import file.
getValuesFromImport
in interface ProjectImportIdMapper
IdKeyPair representing objects from the import file.
IdKeyPair
public void clearMappedValues()
ProjectImportIdMapper
clearMappedValues
in interface ProjectImportIdMapper
Copyright © 2002-2024 Atlassian. All Rights Reserved.