com.atlassian.confluence.renderer.attachments
Class RendererAttachmentManager

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

public class RendererAttachmentManager
extends Object
implements com.atlassian.renderer.attachments.RendererAttachmentManager, ImagePathHelper

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


Constructor Summary
RendererAttachmentManager()
           
 
Method Summary
 com.atlassian.renderer.attachments.RendererAttachment getAttachment(com.atlassian.renderer.RenderContext renderContext, com.atlassian.renderer.embedded.EmbeddedResource embeddedResource)
           
 String getImagePath(Attachment attachment, boolean isThumbnail)
          Return the path used to access the specified image.
 com.atlassian.renderer.attachments.RendererAttachment getThumbnail(com.atlassian.renderer.attachments.RendererAttachment rendererAttachment, com.atlassian.renderer.RenderContext renderContext, com.atlassian.renderer.embedded.EmbeddedImage embeddedImage)
           
protected  boolean isPermittedToViewAttachment(Attachment attachment)
          Checks whether the user is able to view the attachment
 void setPermissionManager(PermissionManager permissionManager)
           
 void setThumbnailManager(ThumbnailManager thumbnailManager)
           
 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 com.atlassian.renderer.attachments.RendererAttachment getAttachment(com.atlassian.renderer.RenderContext renderContext,
                                                                           com.atlassian.renderer.embedded.EmbeddedResource embeddedResource)
Specified by:
getAttachment in interface com.atlassian.renderer.attachments.RendererAttachmentManager

getThumbnail

public com.atlassian.renderer.attachments.RendererAttachment getThumbnail(com.atlassian.renderer.attachments.RendererAttachment rendererAttachment,
                                                                          com.atlassian.renderer.RenderContext renderContext,
                                                                          com.atlassian.renderer.embedded.EmbeddedImage embeddedImage)
Specified by:
getThumbnail in interface com.atlassian.renderer.attachments.RendererAttachmentManager

systemSupportsThumbnailing

public boolean systemSupportsThumbnailing()
Specified by:
systemSupportsThumbnailing in interface com.atlassian.renderer.attachments.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

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)

setThumbnailManager

public void setThumbnailManager(ThumbnailManager thumbnailManager)


Copyright © 2003-2013 Atlassian. All Rights Reserved.