com.atlassian.jira.crowd.embedded.ofbiz
Class OfBizUserDao
java.lang.Object
com.atlassian.jira.crowd.embedded.ofbiz.OfBizUserDao
- All Implemented Interfaces:
- com.atlassian.crowd.embedded.spi.UserDao
public class OfBizUserDao
- extends Object
- implements com.atlassian.crowd.embedded.spi.UserDao
Implementation of the user DAO that works with OfBiz
Method Summary |
com.atlassian.crowd.model.user.User |
add(com.atlassian.crowd.model.user.User user,
com.atlassian.crowd.embedded.api.PasswordCredential credential)
|
com.atlassian.crowd.util.BatchResult<com.atlassian.crowd.model.user.User> |
addAll(Set<com.atlassian.crowd.model.user.UserTemplateWithCredentialAndAttributes> users)
|
com.atlassian.crowd.model.user.TimestampedUser |
findByExternalId(long directoryId,
String externalId)
|
com.atlassian.crowd.model.user.TimestampedUser |
findByName(long directoryId,
String userName)
|
com.atlassian.crowd.model.user.UserWithAttributes |
findByNameWithAttributes(long directoryId,
String userName)
|
void |
flushCache()
Invoked by OfBizCacheFlushingManager to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent |
com.atlassian.crowd.embedded.api.PasswordCredential |
getCredential(long directoryId,
String userName)
|
List<com.atlassian.crowd.embedded.api.PasswordCredential> |
getCredentialHistory(long directoryId,
String userName)
|
boolean |
isCacheInitialized()
We check if the cache is initialized or not. |
void |
remove(com.atlassian.crowd.model.user.User user)
|
com.atlassian.crowd.util.BatchResult<String> |
removeAllUsers(long directoryId,
Set<String> userNames)
|
void |
removeAttribute(com.atlassian.crowd.model.user.User user,
String attributeName)
|
com.atlassian.crowd.model.user.User |
rename(com.atlassian.crowd.model.user.User oldUser,
String newName)
|
|
search(long directoryId,
com.atlassian.crowd.search.query.entity.EntityQuery<T> query)
|
void |
storeAttributes(com.atlassian.crowd.model.user.User user,
Map<String,Set<String>> attributes)
|
com.atlassian.crowd.model.user.User |
update(com.atlassian.crowd.model.user.User user)
|
void |
updateCredential(com.atlassian.crowd.model.user.User user,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
int credentialHistory)
|
protected void |
updateGroupMembership(long directoryId,
String oldName,
String newName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OfBizUserDao
public OfBizUserDao(OfBizDelegator ofBizDelegator,
com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao,
InternalMembershipDao membershipDao,
UserKeyStore userKeyStore,
UserDeleteVeto userDeleteVeto,
com.atlassian.cache.CacheManager cacheManager,
com.atlassian.beehive.ClusterLockService clusterLockService)
findByName
@Nonnull
public com.atlassian.crowd.model.user.TimestampedUser findByName(long directoryId,
String userName)
throws UserNotFoundException
- Specified by:
findByName
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
findByExternalId
@Nonnull
public com.atlassian.crowd.model.user.TimestampedUser findByExternalId(long directoryId,
String externalId)
throws UserNotFoundException
- Specified by:
findByExternalId
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
findByNameWithAttributes
@Nonnull
public com.atlassian.crowd.model.user.UserWithAttributes findByNameWithAttributes(long directoryId,
String userName)
throws UserNotFoundException
- Specified by:
findByNameWithAttributes
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
getCredential
@Nullable
public com.atlassian.crowd.embedded.api.PasswordCredential getCredential(long directoryId,
String userName)
throws UserNotFoundException
- Specified by:
getCredential
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
getCredentialHistory
public List<com.atlassian.crowd.embedded.api.PasswordCredential> getCredentialHistory(long directoryId,
String userName)
throws UserNotFoundException
- Specified by:
getCredentialHistory
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
add
public com.atlassian.crowd.model.user.User add(com.atlassian.crowd.model.user.User user,
com.atlassian.crowd.embedded.api.PasswordCredential credential)
throws com.atlassian.crowd.exception.UserAlreadyExistsException
- Specified by:
add
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
com.atlassian.crowd.exception.UserAlreadyExistsException
addAll
@Nonnull
public com.atlassian.crowd.util.BatchResult<com.atlassian.crowd.model.user.User> addAll(Set<com.atlassian.crowd.model.user.UserTemplateWithCredentialAndAttributes> users)
- Specified by:
addAll
in interface com.atlassian.crowd.embedded.spi.UserDao
storeAttributes
public void storeAttributes(com.atlassian.crowd.model.user.User user,
Map<String,Set<String>> attributes)
throws UserNotFoundException
- Specified by:
storeAttributes
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
update
public com.atlassian.crowd.model.user.User update(com.atlassian.crowd.model.user.User user)
throws UserNotFoundException
- Specified by:
update
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
updateCredential
public void updateCredential(com.atlassian.crowd.model.user.User user,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
int credentialHistory)
throws UserNotFoundException
- Specified by:
updateCredential
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
rename
public com.atlassian.crowd.model.user.User rename(com.atlassian.crowd.model.user.User oldUser,
String newName)
throws UserNotFoundException
- Specified by:
rename
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
isCacheInitialized
public boolean isCacheInitialized()
- We check if the cache is initialized or not.
This is an important cache to see if jira is available or not for the users to login.
- Returns:
- true if the cache is initialized, false if not.
updateGroupMembership
protected void updateGroupMembership(long directoryId,
String oldName,
String newName)
removeAllUsers
public com.atlassian.crowd.util.BatchResult<String> removeAllUsers(long directoryId,
Set<String> userNames)
- Specified by:
removeAllUsers
in interface com.atlassian.crowd.embedded.spi.UserDao
removeAttribute
public void removeAttribute(com.atlassian.crowd.model.user.User user,
String attributeName)
throws UserNotFoundException
- Specified by:
removeAttribute
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
remove
public void remove(com.atlassian.crowd.model.user.User user)
throws UserNotFoundException
- Specified by:
remove
in interface com.atlassian.crowd.embedded.spi.UserDao
- Throws:
UserNotFoundException
search
public <T> List<T> search(long directoryId,
com.atlassian.crowd.search.query.entity.EntityQuery<T> query)
- Specified by:
search
in interface com.atlassian.crowd.embedded.spi.UserDao
flushCache
public void flushCache()
- Invoked by
OfBizCacheFlushingManager
to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent
Copyright © 2002-2014 Atlassian. All Rights Reserved.