com.atlassian.confluence.importexport.resource
Class ThumbnailDownloadResourceManager

java.lang.Object
  extended by com.atlassian.confluence.importexport.resource.AttachmentDownloadResourceManager
      extended by com.atlassian.confluence.importexport.resource.ThumbnailDownloadResourceManager
All Implemented Interfaces:
DownloadResourceManager

public class ThumbnailDownloadResourceManager
extends AttachmentDownloadResourceManager


Constructor Summary
ThumbnailDownloadResourceManager()
           
 
Method Summary
 DownloadResourceReader getResourceReader(java.lang.String userName, java.lang.String resourcePath, java.util.Map parameters)
          Returns a ThumbnailDownloadResourceReader for retrieving thumbnail content.
 boolean matches(java.lang.String resourcePath)
          Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the given resourcePath.
 void setThumbnailManager(ThumbnailManager thumbnailManager)
           
 
Methods inherited from class com.atlassian.confluence.importexport.resource.AttachmentDownloadResourceManager
getAttachment, setAttachmentManager, setAttachmentUrlParser, setPermissionManager, setUserAccessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThumbnailDownloadResourceManager

public ThumbnailDownloadResourceManager()
Method Detail

matches

public boolean matches(java.lang.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
Overrides:
matches in class AttachmentDownloadResourceManager
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(java.lang.String userName,
                                                java.lang.String resourcePath,
                                                java.util.Map parameters)
                                         throws UnauthorizedDownloadResourceException,
                                                DownloadResourceNotFoundException
Returns a ThumbnailDownloadResourceReader for retrieving thumbnail content. Typically used by HTML/PDF export and thumbnail downloads.

Specified by:
getResourceReader in interface DownloadResourceManager
Overrides:
getResourceReader in class AttachmentDownloadResourceManager
Parameters:
userName - the user who is retrieving the thumbnail 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 thumbnail content does not have the permissions to view it
DownloadResourceNotFoundException - if the thumbnail content associated with the resourcePath cannot be found

setThumbnailManager

public void setThumbnailManager(ThumbnailManager thumbnailManager)


Copyright © 2003-2014 Atlassian. All Rights Reserved.