Package com.atlassian.jira.user.util
Interface UserKeyStore
- All Known Implementing Classes:
MockUserKeyStore
,UserKeyStoreImpl
@Internal
public interface UserKeyStore
- Since:
- v6.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ensureUniqueKeyForNewUser
(String username) getIdForUserKey
(String name) getKeyForUsername
(String username) getKeyFromId
(long id) Returns key generated from id.getUniqueKeyFromId
(long id) Returns unique key generated from id.getUniqueUsernameFromId
(long id) Returns unique username generated from id.getUserForId
(Long id) getUserForKey
(String key) getUserForUsername
(String username) getUsernameForKey
(String key) boolean
isSystemKey
(String key) Returns true if passedkey
has been generated automatically by Jira.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.void
renameUser
(String oldUsername, String newUsername)
-
Method Details
-
getUsernameForKey
-
getKeyForUsername
-
renameUser
-
ensureUniqueKeyForNewUser
-
getIdForUserKey
-
getUserForId
-
getUserForKey
-
getUserForUsername
-
removeByKey
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.
-
isSystemKey
Returns true if passedkey
has been generated automatically by Jira.- Parameters:
key
-- Returns:
- true if passed key has been generated automatically by Jira, false otherwise.
-
getKeyFromId
Returns key generated from id.- Returns:
- key generated from id.
-
getUniqueKeyFromId
Returns unique key generated from id.- Parameters:
id
-- Returns:
- unique key generated from id.
-
getUniqueUsernameFromId
Returns unique username generated from id.- Parameters:
id
-- Returns:
- unique username generated from id.
-
changeKey
-