Class AttachmentResourceIdentifierResolver
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.AttachmentResourceIdentifierResolver
-
- All Implemented Interfaces:
ResourceIdentifierResolver<AttachmentResourceIdentifier,Attachment>
public class AttachmentResourceIdentifierResolver extends Object implements ResourceIdentifierResolver<AttachmentResourceIdentifier,Attachment>
AResourceIdentifierResolver
which resolvesAttachmentResourceIdentifier
s intoAttachment
s. It will first attempt to resolve the attachment against any prefetched attachments stored in theConversionContext
byAttachmentPrefetcher
, and will fall back to fetching them fromAttachmentManager
if that fails.
-
-
Constructor Summary
Constructors Constructor Description AttachmentResourceIdentifierResolver(AttachmentManager attachmentManager, AttachmentOwningContentResolver attachmentOwningContentResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attachment
resolve(AttachmentResourceIdentifier attachmentResourceIdentifier, ConversionContext conversionContext)
-
-
-
Constructor Detail
-
AttachmentResourceIdentifierResolver
public AttachmentResourceIdentifierResolver(AttachmentManager attachmentManager, AttachmentOwningContentResolver attachmentOwningContentResolver)
-
-
Method Detail
-
resolve
public Attachment resolve(AttachmentResourceIdentifier attachmentResourceIdentifier, ConversionContext conversionContext) throws CannotResolveResourceIdentifierException
- Specified by:
resolve
in interfaceResourceIdentifierResolver<AttachmentResourceIdentifier,Attachment>
- Parameters:
attachmentResourceIdentifier
- resource identifierconversionContext
- the conversion context- Returns:
- the resource associated with the specified resource identifier (cannot be null)
- Throws:
CannotResolveResourceIdentifierException
- if the specified resource identifier cannot be resolved (this shouldn't typically happen unless someone has removed the resource)
-
-