com.atlassian.confluence.importexport.resource
Class AttachmentDownloadResourceManager
java.lang.Object
com.atlassian.confluence.importexport.resource.AttachmentDownloadResourceManager
- All Implemented Interfaces:
- DownloadResourceManager
- Direct Known Subclasses:
- ThumbnailDownloadResourceManager
public class AttachmentDownloadResourceManager
- extends Object
- implements DownloadResourceManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttachmentDownloadResourceManager
public AttachmentDownloadResourceManager()
matches
public boolean matches(String resourcePath)
- Description copied from interface:
DownloadResourceManager
- Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the
given resourcePath.
- Specified by:
matches
in interface DownloadResourceManager
- Parameters:
resourcePath
- the relative URL of the resource including the application context path. For example,
"/confluence/download/attachments/12345/temp.png".
- Returns:
- true if the manager can handle the given resource path
getResourceReader
public DownloadResourceReader getResourceReader(String userName,
String resourcePath,
Map parameters)
throws UnauthorizedDownloadResourceException,
DownloadResourceNotFoundException
- Returns a
AttachmentDownloadResourceReader
for retrieving attachment content. Typically used by HTML/PDF
export and attachment downloads.
- Specified by:
getResourceReader
in interface DownloadResourceManager
- Parameters:
userName
- the user who is retrieving the attachment content.resourcePath
- the relative URL of the resource including the application context path. For example,
"/confluence/download/thumbnails/12345/temp.png".parameters
- a map of url paramaters for the resource
- Returns:
- a DownloadResourceReader to read the resource content from
- Throws:
UnauthorizedDownloadResourceException
- if the user requesting the attachment content does not have the
permissions to view it
DownloadResourceNotFoundException
- if the attachment content associated with the resourcePath cannot be
found
getAttachment
protected Attachment getAttachment(String userName,
String resourcePath,
Map parameters,
String urlPrefix)
throws DownloadResourceNotFoundException,
UnauthorizedDownloadResourceException
- Throws:
DownloadResourceNotFoundException
UnauthorizedDownloadResourceException
setAttachmentUrlParser
public void setAttachmentUrlParser(AttachmentUrlParser attachmentUrlParser)
setAttachmentManager
public void setAttachmentManager(AttachmentManager attachmentManager)
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
setUserAccessor
public void setUserAccessor(UserAccessor userAccessor)
Copyright © 2003-2012 Atlassian. All Rights Reserved.