public class UserKeyStoreImpl extends Object implements UserKeyStore
Constructor and Description |
---|
UserKeyStoreImpl(EntityEngine entityEngine,
OfBizDelegator ofBizDelegator,
org.ofbiz.core.entity.DelegatorInterface delegatorInterface,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
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 userKey) |
void |
onClearCache(ClearCacheEvent event) |
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) |
public UserKeyStoreImpl(EntityEngine entityEngine, OfBizDelegator ofBizDelegator, org.ofbiz.core.entity.DelegatorInterface delegatorInterface, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.cache.CacheManager cacheManager)
public String getUsernameForKey(String userKey)
getUsernameForKey
in interface UserKeyStore
public String getKeyForUsername(String username)
getKeyForUsername
in interface UserKeyStore
public Long getIdForUserKey(String userKey)
getIdForUserKey
in interface UserKeyStore
public Optional<ApplicationUserEntity> getUserForId(Long id)
getUserForId
in interface UserKeyStore
public Optional<ApplicationUserEntity> getUserForKey(String key)
getUserForKey
in interface UserKeyStore
public Optional<ApplicationUserEntity> getUserForUsername(String username)
getUserForUsername
in interface UserKeyStore
public void renameUser(String oldUsername, String newUsername)
renameUser
in interface UserKeyStore
public String ensureUniqueKeyForNewUser(String username)
ensureUniqueKeyForNewUser
in interface UserKeyStore
public String removeByKey(String key)
UserKeyStore
This method is used by cloud for import where all the users are deleted anyways (see JiraUserServiceImpl).
removeByKey
in interface UserKeyStore
key
- the key to remove.@EventListener public void onClearCache(ClearCacheEvent event)
Copyright © 2002-2017 Atlassian. All Rights Reserved.