com.atlassian.confluence.renderer.attachments
Class RendererAttachmentManager
java.lang.Object
com.atlassian.confluence.renderer.attachments.RendererAttachmentManager
- All Implemented Interfaces:
- ImagePathHelper, com.atlassian.renderer.attachments.RendererAttachmentManager
public class RendererAttachmentManager
- extends java.lang.Object
- implements com.atlassian.renderer.attachments.RendererAttachmentManager, ImagePathHelper
Implemenation of the RendererAttachmentManager that converts thumbnails and attachments into useable objects
for the wiki renderer.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RendererAttachmentManager
public RendererAttachmentManager()
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 java.lang.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-2014 Atlassian. All Rights Reserved.