Interface DownloadResourceManager
-
- All Known Subinterfaces:
PartialDownloadResourceManager,WritableDownloadResourceManager
- All Known Implementing Classes:
AttachmentDownloadResourceManager,DelegatorDownloadResourceManager,ExportDownloadResourceManager,IconDownloadResourceManager,PackageResourceManager,ThumbnailDownloadResourceManager,WebImagesDownloadResourceManager
public interface DownloadResourceManagerAn interface for managers that support reading of downloadable resources. Managers that also support writing, should implement theWritableDownloadResourceManagerinterface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DownloadResourceReadergetResourceReader(String userName, String resourcePath, Map parameters)Returns aDownloadResourceReaderfor a downloadable resource.booleanmatches(String resourcePath)Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the given resourcePath.
-
-
-
Method Detail
-
matches
boolean matches(String resourcePath)
Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the given resourcePath.- 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
DownloadResourceReader getResourceReader(String userName, String resourcePath, Map parameters) throws UnauthorizedDownloadResourceException, DownloadResourceNotFoundException
Returns aDownloadResourceReaderfor a downloadable resource. Typically used by HTML/PDF export and resource content downloads.Use this method only if
matches(String)returns true.- Parameters:
userName- the user who is retrieving the downloadable resource.resourcePath- the relative URL of the resource including the application context path. For example, "/confluence/download/attachments/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 downloadable resource does not have the permissions to get itDownloadResourceNotFoundException- if the downloadable resource associated with the resourcePath cannot be found
-
-