Class AttachmentPrefetcher

    • Constructor Detail

    • Method Detail

      • prefetch

        public void prefetch​(Set<AttachmentResourceIdentifier> attachmentIdentifiers,
                             ConversionContext conversionContext)
        Fetch the attachments for the given set of identifiers, and store them in the given conversion context.

        It is possible and valid that some of the attachment identifiers refer to attachments on pages other than the page being rendered. However, this is expected to be a relatively unusual case. In the interests of simplicity, and given that this stuff is just an optimization, we only pre-fetch attachments for the current page. Any attachments from other pages will therefore need to be fetched on-demand by the renderer as usual.

        Specified by:
        prefetch in interface ResourcePrefetcher<AttachmentResourceIdentifier>
        Parameters:
        attachmentIdentifiers - The set of attachment identifiers that should be prefetched if possible