public class


extends Object
implements UserKeyStore
   ↳ com.atlassian.jira.user.util.MockUserKeyStore


Public Constructors
Public Methods
String ensureUniqueKeyForNewUser(String username)
Long getIdForUserKey(String name)
String getKeyForUsername(String username)
Optional<ApplicationUserEntity> getUserForId(Long id)
Optional<ApplicationUserEntity> getUserForKey(String key)
Optional<ApplicationUserEntity> getUserForUsername(String username)
String getUsernameForKey(String key)
String removeByKey(String key)
It is dangerous to use this method.
void renameUser(String oldUsername, String newUsername)
void setMapping(String key, String username)
void useDefaultMapping(boolean useDefaultMapping)
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.user.util.UserKeyStore

Public Constructors

public MockUserKeyStore ()

Public Methods

public String ensureUniqueKeyForNewUser (String username)

public Long getIdForUserKey (String name)

public String getKeyForUsername (String username)

public Optional<ApplicationUserEntity> getUserForId (Long id)

public Optional<ApplicationUserEntity> getUserForKey (String key)

public Optional<ApplicationUserEntity> getUserForUsername (String username)

public String getUsernameForKey (String key)

public String removeByKey (String key)

It is dangerous to use this method. In general operation JIRA needs to keep the userName -> key mapping around even if the user is deleted. This is so that it can show something in the UI after the user is deleted.

This method is used by cloud for import where all the users are deleted anyways (see JiraUserServiceImpl).

key the key to remove.
  • the name of the user deleted.

public void renameUser (String oldUsername, String newUsername)

public void setMapping (String key, String username)

public void useDefaultMapping (boolean useDefaultMapping)