public class MockUserKeyStore extends Object implements UserKeyStore
| Constructor and Description |
|---|
MockUserKeyStore() |
| Modifier and Type | Method and Description |
|---|---|
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. In general operation JIRA needs to keep the userName -> key
mapping around even if the user is deleted.
|
void |
renameUser(String oldUsername,
String newUsername) |
void |
setMapping(String key,
String username) |
void |
useDefaultMapping(boolean useDefaultMapping) |
public String getUsernameForKey(String key)
getUsernameForKey in interface UserKeyStorepublic String getKeyForUsername(String username)
getKeyForUsername in interface UserKeyStorepublic void renameUser(String oldUsername, String newUsername)
renameUser in interface UserKeyStorepublic String ensureUniqueKeyForNewUser(String username)
ensureUniqueKeyForNewUser in interface UserKeyStorepublic String removeByKey(String key)
UserKeyStoreThis method is used by cloud for import where all the users are deleted anyways (see JiraUserServiceImpl).
removeByKey in interface UserKeyStorekey - the key to remove.public Long getIdForUserKey(String name)
getIdForUserKey in interface UserKeyStorepublic Optional<ApplicationUserEntity> getUserForId(Long id)
getUserForId in interface UserKeyStorepublic Optional<ApplicationUserEntity> getUserForKey(String key)
getUserForKey in interface UserKeyStorepublic Optional<ApplicationUserEntity> getUserForUsername(String username)
getUserForUsername in interface UserKeyStorepublic void useDefaultMapping(boolean useDefaultMapping)
Copyright © 2002-2015 Atlassian. All Rights Reserved.