public class

UserKeyStoreImpl

extends Object
implements UserKeyStore
java.lang.Object
   ↳ com.atlassian.jira.user.util.UserKeyStoreImpl

Summary

Public Constructors
UserKeyStoreImpl(EntityEngine entityEngine, OfBizDelegator ofBizDelegator, DelegatorInterface delegatorInterface, EventPublisher eventPublisher, CacheManager cacheManager)
Public Methods
String ensureUniqueKeyForNewUser(String username)
Long getIdForUserKey(String userkey)
String getKeyForUsername(String username)
Optional<ApplicationUserEntity> getUserForId(Long id)
Optional<ApplicationUserEntity> getUserForKey(String key)
Optional<ApplicationUserEntity> getUserForUsername(String username)
String getUsernameForKey(String key)
@EventListener void onClearCache(ClearCacheEvent event)
String removeByKey(String key)
It is dangerous to use this method.
void renameUser(String oldUsername, String newUsername)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.user.util.UserKeyStore

Public Constructors

public UserKeyStoreImpl (EntityEngine entityEngine, OfBizDelegator ofBizDelegator, DelegatorInterface delegatorInterface, EventPublisher eventPublisher, CacheManager cacheManager)

Public Methods

public String ensureUniqueKeyForNewUser (String username)

public Long getIdForUserKey (String userkey)

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)

@EventListener public void onClearCache (ClearCacheEvent event)

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

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

public void renameUser (String oldUsername, String newUsername)