public class UserPrefetcher extends Object implements ResourcePrefetcher<UserResourceIdentifier>
ResourcePrefetcher for UserResourceIdentifiers. This will attempt to pre-fetch
any ConfluenceUser objects by their UserKey.
Note that any UserResourceIdentifiers with a null UserKey will not be pre-fetched. Such a condition
is possible (e.g. with unmigrated, pre-userkey data), but not expected to happen in normal usage.
| Modifier and Type | Class and Description |
|---|---|
static interface |
UserPrefetcher.PrefetchDao
Rather than use something like
InternalUserDao.findByNames(long, Collection)
to perform bulk load and pre-caching we define a more narrow interface that returns only the user count, rather than the
user collection. |
| Constructor and Description |
|---|
UserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory,
UserPrefetcher.PrefetchDao crowdUserDao) |
| Modifier and Type | Method and Description |
|---|---|
Class<UserResourceIdentifier> |
getResourceItentifierType() |
void |
prefetch(Set<UserResourceIdentifier> resourceIdentifiers,
ConversionContext conversionContext)
Attempts to pre-fetch and pre-cache the given resource identifiers.
|
public UserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory, UserPrefetcher.PrefetchDao crowdUserDao)
public Class<UserResourceIdentifier> getResourceItentifierType()
getResourceItentifierType in interface ResourcePrefetcher<UserResourceIdentifier>public void prefetch(Set<UserResourceIdentifier> resourceIdentifiers, ConversionContext conversionContext)
ResourcePrefetcherprefetch in interface ResourcePrefetcher<UserResourceIdentifier>Copyright © 2003–2023 Atlassian. All rights reserved.