com.atlassian.jira.imports.project.mapper
Class UserMapper

java.lang.Object
  extended by com.atlassian.jira.imports.project.mapper.AbstractMapper
      extended by com.atlassian.jira.imports.project.mapper.UserMapper
All Implemented Interfaces:
ProjectImportIdMapper

public class UserMapper
extends AbstractMapper

Allows you to map Users. We keep the whole ExternalUser information so we can create Users that don't exist.

Since:
v3.13

Constructor Summary
UserMapper(UserUtil userUtil)
           
 
Method Summary
 void clearMappedValues()
          This will clear any mapped data that may have been entered into the mappers.
 void flagUserAsInUse(String oldUserName)
           
 void flagUserAsMandatory(String oldUserName)
           
 ExternalUser getExternalUser(String userName)
           
 String getMappedId(String oldId)
          Retrieves a String that corresponds to the id in the target JIRA system, null if none has been mapped.
 Collection getOptionalOldIds()
           
 Collection getUnmappedMandatoryUsers()
           
 List getUnmappedMandatoryUsersWithNoRegisteredOldValue()
           
 Collection getUnmappedUsersInUse()
           
 List getUnmappedUsersInUseWithNoRegisteredOldValue()
           
 Collection getUsersToAutoCreate()
          Returns a List of users that can be automatically created by the import.
 void registerOldValue(ExternalUser externalUser)
           
 boolean userExists(String userName)
           
 
Methods inherited from class com.atlassian.jira.imports.project.mapper.AbstractMapper
flagValueAsRequired, getAllMappedIds, getDisplayName, getKey, getRegisteredOldIds, getRequiredOldIds, getValuesFromImport, mapValue, registerOldValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserMapper

public UserMapper(UserUtil userUtil)
Method Detail

registerOldValue

public void registerOldValue(ExternalUser externalUser)

getExternalUser

public ExternalUser getExternalUser(String userName)

getMappedId

public String getMappedId(String oldId)
Description copied from interface: ProjectImportIdMapper
Retrieves a String that corresponds to the id in the target JIRA system, null if none has been mapped.

Specified by:
getMappedId in interface ProjectImportIdMapper
Overrides:
getMappedId in class AbstractMapper
Parameters:
oldId - identifies the mapping we are looking for.
Returns:
String that corresponds to the id in the target JIRA system, null if none has been mapped.

flagUserAsMandatory

public void flagUserAsMandatory(String oldUserName)

flagUserAsInUse

public void flagUserAsInUse(String oldUserName)

getUnmappedMandatoryUsers

public Collection getUnmappedMandatoryUsers()

getUnmappedMandatoryUsersWithNoRegisteredOldValue

public List getUnmappedMandatoryUsersWithNoRegisteredOldValue()

getUnmappedUsersInUseWithNoRegisteredOldValue

public List getUnmappedUsersInUseWithNoRegisteredOldValue()

getUnmappedUsersInUse

public Collection getUnmappedUsersInUse()

getUsersToAutoCreate

public Collection getUsersToAutoCreate()
Returns a List of users that can be automatically created by the import.

This includes all optional and mandatory users that aren't in the current system, and the import file has the user details for.

Note that this method only makes sense if External User Management is off.

Returns:
a List of users that can be automatically created by the import.

getOptionalOldIds

public Collection getOptionalOldIds()

userExists

public boolean userExists(String userName)

clearMappedValues

public void clearMappedValues()
Description copied from interface: ProjectImportIdMapper
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 ProjectImportIdMapper
Overrides:
clearMappedValues in class AbstractMapper


Copyright © 2002-2008 Atlassian. All Rights Reserved.