com.atlassian.confluence.renderer.attachments
Class RendererAttachmentManager
java.lang.Object
com.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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RendererAttachmentManager
public RendererAttachmentManager()
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()