com.atlassian.confluence.renderer.attachments
Class RendererAttachmentManager

java.lang.Object
  extended bycom.atlassian.confluence.renderer.attachments.RendererAttachmentManager
All Implemented Interfaces:
ImagePathHelper, RendererAttachmentManager

public class RendererAttachmentManager
extends Object
implements RendererAttachmentManager, ImagePathHelper

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


Constructor Summary
RendererAttachmentManager()
           
 
Method Summary
 RendererAttachment getAttachment(RenderContext renderContext, EmbeddedResource embeddedResource)
           
 String getImagePath(Attachment attachment, boolean isThumbnail)
          Return the path used to access the specified image.
 PermissionManager getPermissionManager()
           
 RendererAttachment getThumbnail(RendererAttachment rendererAttachment, RenderContext renderContext, EmbeddedImage embeddedImage)
           
protected  boolean isPermittedToViewAttachment(Attachment attachment)
          Checks whether the user is able to view the attachment
 void setPermissionManager(PermissionManager permissionManager)
           
 boolean systemSupportsThumbnailing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererAttachmentManager

public RendererAttachmentManager()
Method Detail

getAttachment

public RendererAttachment getAttachment(RenderContext renderContext,
                                        EmbeddedResource embeddedResource)
Specified by:
getAttachment in interface RendererAttachmentManager

getThumbnail

public RendererAttachment getThumbnail(RendererAttachment rendererAttachment,
                                       RenderContext renderContext,
                                       EmbeddedImage embeddedImage)
Specified by:
getThumbnail in interface RendererAttachmentManager

systemSupportsThumbnailing

public boolean systemSupportsThumbnailing()
Specified by:
systemSupportsThumbnailing in interface RendererAttachmentManager

getImagePath

public String getImagePath(Attachment attachment,
                           boolean isThumbnail)
Description copied from interface: ImagePathHelper
Return the path used to access the specified image. Note: it is expected that the attachment references an image.

Specified by:
getImagePath in interface ImagePathHelper
Parameters:
attachment -
isThumbnail -
Returns:

isPermittedToViewAttachment

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

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)

getPermissionManager

public PermissionManager getPermissionManager()


Confluence is developed by Atlassian.