Class Overview
A caching decorator for an InternalUserDao.
Summary
Public Constructors |
|
CachedCrowdUserDao(InternalUserDao delegate, CacheFactory cacheFactory)
|
Public Methods |
User
|
add(User user, PasswordCredential credential)
|
BatchResult<User>
|
addAll(Set<UserTemplateWithCredentialAndAttributes> users)
Removes all the adding users from the cache if they exist and delegates to the addAll method of the delegate DAO.
|
void
|
afterPropertiesSet()
|
TimestampedUser
|
findByName(long directoryId, String userName)
|
UserWithAttributes
|
findByNameWithAttributes(long directoryId, String userName)
|
Collection<InternalUser>
|
findByNames(long directoryId, Collection<String> userNames)
|
PasswordCredential
|
getCredential(long directoryId, String userName)
|
List<PasswordCredential>
|
getCredentialHistory(long directoryId, String userName)
|
InternalUser
|
internalFindByName(long directoryId, String userName)
|
InternalUser
|
internalFindByUser(User user)
|
void
|
remove(User user)
|
void
|
removeAllUsers(long directoryId, Set<String> userNames)
|
void
|
removeAllUsers(long directoryId)
|
void
|
removeAttribute(User user, String attributeName)
|
User
|
rename(User user, String newName)
|
<T>
List<T>
|
search(long directoryId, EntityQuery<T> query)
|
void
|
storeAttributes(User user, Map<String, Set<String>> attributes)
|
User
|
update(User user)
|
void
|
updateCredential(User user, PasswordCredential credential, int maxCredentialHistory)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
com.atlassian.crowd.embedded.hibernate2.InternalUserDao
Collection<InternalUser>
|
findByNames(long arg0, Collection<String> arg1)
|
InternalUser
|
internalFindByName(long arg0, String arg1)
|
InternalUser
|
internalFindByUser(User arg0)
|
void
|
removeAllUsers(long arg0)
|
|
From interface
com.atlassian.crowd.embedded.spi.UserDao
User
|
add(User arg0, PasswordCredential arg1)
|
BatchResult<User>
|
addAll(Set<UserTemplateWithCredentialAndAttributes> arg0)
|
TimestampedUser
|
findByName(long arg0, String arg1)
|
UserWithAttributes
|
findByNameWithAttributes(long arg0, String arg1)
|
PasswordCredential
|
getCredential(long arg0, String arg1)
|
List<PasswordCredential>
|
getCredentialHistory(long arg0, String arg1)
|
void
|
remove(User arg0)
|
void
|
removeAllUsers(long arg0, Set<String> arg1)
|
void
|
removeAttribute(User arg0, String arg1)
|
User
|
rename(User arg0, String arg1)
|
<T>
List<T>
|
search(long arg0, EntityQuery<T> arg1)
|
void
|
storeAttributes(User arg0, Map<String, Set<String>> arg1)
|
User
|
update(User arg0)
|
void
|
updateCredential(User arg0, PasswordCredential arg1, int arg2)
|
|
From interface
org.springframework.beans.factory.InitializingBean
void
|
afterPropertiesSet()
|
|
Public Constructors
public
CachedCrowdUserDao
(InternalUserDao delegate, CacheFactory cacheFactory)
Public Methods
public
BatchResult<User>
addAll
(Set<UserTemplateWithCredentialAndAttributes> users)
Removes all the adding users from the cache if they exist and delegates to the addAll method of the delegate DAO.
This method will not try and update the cache like add(User, PasswordCredential)
because:
- We want to delegate to the "addAll" method on the delegate as its the fastest way to add
a large number of users, we can't just delegate to add method
- Unlike the add method, we don't get a reference to the added user so we can't reliably
update the cache, so we just remove it.
Returns
- a BatchResult describing the result
public
void
afterPropertiesSet
()
public
TimestampedUser
findByName
(long directoryId, String userName)
public
UserWithAttributes
findByNameWithAttributes
(long directoryId, String userName)
public
InternalUser
internalFindByName
(long directoryId, String userName)
public
InternalUser
internalFindByUser
(User user)
public
void
remove
(User user)
public
void
removeAllUsers
(long directoryId, Set<String> userNames)
public
void
removeAllUsers
(long directoryId)
public
void
removeAttribute
(User user, String attributeName)
public
User
rename
(User user, String newName)
public
List<T>
search
(long directoryId, EntityQuery<T> query)
public
User
update
(User user)
public
void
updateCredential
(User user, PasswordCredential credential, int maxCredentialHistory)