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

@PublicApi
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 flagUserAsInUse(String oldUserKey)
           
 void flagUserAsMandatory(String oldUserKey)
           
 ExternalUser getExternalUser(String userKey)
           
 String getMappedId(String oldId)
          Retrieves a String that corresponds to the id in the target JIRA system, null if none has been mapped.
 String getMappedUserKey(String oldUserKey)
           
 Collection<String> getOptionalOldIds()
           
 Collection<ExternalUser> getUnmappedMandatoryUsers()
           
 List<ExternalUser> getUnmappedMandatoryUsersWithNoRegisteredOldValue()
           
 Collection<ExternalUser> getUnmappedUsersInUse()
           
 List<ExternalUser> getUnmappedUsersInUseWithNoRegisteredOldValue()
           
 Collection<ExternalUser> getUsersToAutoCreate()
          Returns a List of users that can be automatically created by the import.
 void registerOldValue(ExternalUser externalUser)
           
 boolean userExists(String userKey)
           
 
Methods inherited from class com.atlassian.jira.imports.project.mapper.AbstractMapper
clearMappedValues, 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 userKey)

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 oldUserKey)

flagUserAsInUse

public void flagUserAsInUse(String oldUserKey)

getUnmappedMandatoryUsers

public Collection<ExternalUser> getUnmappedMandatoryUsers()

getUnmappedMandatoryUsersWithNoRegisteredOldValue

public List<ExternalUser> getUnmappedMandatoryUsersWithNoRegisteredOldValue()

getUnmappedUsersInUseWithNoRegisteredOldValue

public List<ExternalUser> getUnmappedUsersInUseWithNoRegisteredOldValue()

getUnmappedUsersInUse

public Collection<ExternalUser> getUnmappedUsersInUse()

getUsersToAutoCreate

public Collection<ExternalUser> 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<String> getOptionalOldIds()

userExists

public boolean userExists(String userKey)

getMappedUserKey

public String getMappedUserKey(String oldUserKey)


Copyright © 2002-2014 Atlassian. All Rights Reserved.