Class UserPrefetcher
java.lang.Object
com.atlassian.confluence.impl.content.render.prefetch.UserPrefetcher
- All Implemented Interfaces:
ResourcePrefetcher<UserResourceIdentifier>
An implementation of
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.
- Since:
- 5.10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRather than use something likeInternalUserDao.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 Summary
ConstructorsConstructorDescriptionUserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory, UserPrefetcher.PrefetchDao crowdUserDao) -
Method Summary
Modifier and TypeMethodDescriptionvoidprefetch(Set<UserResourceIdentifier> resourceIdentifiers, ConversionContext conversionContext) Attempts to pre-fetch and pre-cache the given resource identifiers.
-
Constructor Details
-
UserPrefetcher
public UserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory, UserPrefetcher.PrefetchDao crowdUserDao)
-
-
Method Details
-
getResourceItentifierType
- Specified by:
getResourceItentifierTypein interfaceResourcePrefetcher<UserResourceIdentifier>- Returns:
- The type of resource identifier which this prefetcher can handle
-
prefetch
public void prefetch(Set<UserResourceIdentifier> resourceIdentifiers, ConversionContext conversionContext) Description copied from interface:ResourcePrefetcherAttempts to pre-fetch and pre-cache the given resource identifiers. May in practice pre-fetch/pre-cache fewer or more than this particular set.- Specified by:
prefetchin interfaceResourcePrefetcher<UserResourceIdentifier>
-