|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.imports.project.mapper.AbstractMapper
public abstract class AbstractMapper
Abstract mapper that will manage most of the generic data for mappers. Complicated mappers can extend this abstract class and provide public methods with required method signatures, which then maintain their special data and pass standard data to this mapper with the protected methods.
Constructor Summary | |
---|---|
AbstractMapper()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMapper()
Method Detail |
---|
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.
- Specified by:
getValuesFromImport
in interface ProjectImportIdMapper
- Returns:
- a collection of
IdKeyPair representing objects from the import file.- See Also:
IdKeyPair
public void clearMappedValues()
ProjectImportIdMapper
clearMappedValues
in interface ProjectImportIdMapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |