@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()
ProjectImportIdMappergetRequiredOldIds in interface ProjectImportIdMapperpublic Collection<String> getRegisteredOldIds()
ProjectImportIdMapperProjectImportIdMapper.getKey(String) method to extract this key.getRegisteredOldIds in interface ProjectImportIdMapperProjectImportIdMapper.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)
ProjectImportIdMappermapValue in interface ProjectImportIdMapperoldId - 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)
ProjectImportIdMappergetMappedId in interface ProjectImportIdMapperoldId - identifies the mapping we are looking for.public Collection<String> getAllMappedIds()
ProjectImportIdMappergetAllMappedIds in interface ProjectImportIdMapperprotected 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)
ProjectImportIdMappergetDisplayName in interface ProjectImportIdMapperoldId - The old ID.ProjectImportIdMapper.getKey(String)public String getKey(String oldId)
ProjectImportIdMappernull 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 ProjectImportIdMapperoldId - 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 ProjectImportIdMapperIdKeyPair representing objects from the import file.IdKeyPairpublic void clearMappedValues()
ProjectImportIdMapperclearMappedValues in interface ProjectImportIdMapperCopyright © 2002-2017 Atlassian. All Rights Reserved.