public class

RendererAttachmentManager

extends Object
implements ImagePathHelper RendererAttachmentManager
java.lang.Object
   ↳ com.atlassian.confluence.renderer.attachments.RendererAttachmentManager

Class Overview

Implemenation of the RendererAttachmentManager that converts thumbnails and attachments into useable objects for the wiki renderer.

Summary

Public Constructors
RendererAttachmentManager()
Public Methods
RendererAttachment getAttachment(RenderContext renderContext, EmbeddedResource embeddedResource)
String getImagePath(Attachment attachment, boolean isThumbnail)
Return the path used to access the specified image.
RendererAttachment getThumbnail(RendererAttachment rendererAttachment, RenderContext renderContext, EmbeddedImage embeddedImage)
void setPermissionManager(PermissionManager permissionManager)
void setThumbnailManager(ThumbnailManager thumbnailManager)
boolean systemSupportsThumbnailing()
Protected Methods
boolean isPermittedToViewAttachment(Attachment attachment)
Checks whether the user is able to view the attachment
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.renderer.embedded.ImagePathHelper
From interface com.atlassian.renderer.attachments.RendererAttachmentManager

Public Constructors

public RendererAttachmentManager ()

Public Methods

public RendererAttachment getAttachment (RenderContext renderContext, EmbeddedResource embeddedResource)

public String getImagePath (Attachment attachment, boolean isThumbnail)

Return the path used to access the specified image. Note: it is expected that the attachment references an image.

public RendererAttachment getThumbnail (RendererAttachment rendererAttachment, RenderContext renderContext, EmbeddedImage embeddedImage)

public void setPermissionManager (PermissionManager permissionManager)

public void setThumbnailManager (ThumbnailManager thumbnailManager)

public boolean systemSupportsThumbnailing ()

Protected Methods

protected boolean isPermittedToViewAttachment (Attachment attachment)

Checks whether the user is able to view the attachment

Parameters
attachment the Attachment object
Returns
  • true if the user is a SuperUser or has VIEW permission