Class PackageResourceManager
java.lang.Object
com.atlassian.confluence.importexport.resource.PackageResourceManager
- All Implemented Interfaces:
DownloadResourceManager
Allow plugin to get bundle plugin from others folder inside WEB-INF
- Since:
- 6.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetResourceReader
(String userName, String resourcePath, Map parameters) Returns aDownloadResourceReader
for a downloadable resource.boolean
Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the given resourcePath.
-
Constructor Details
-
PackageResourceManager
-
-
Method Details
-
matches
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 interfaceDownloadResourceManager
- 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 Description copied from interface:DownloadResourceManager
Returns aDownloadResourceReader
for a downloadable resource. Typically used by HTML/PDF export and resource content downloads.Use this method only if
DownloadResourceManager.matches(String)
returns true.- Specified by:
getResourceReader
in interfaceDownloadResourceManager
- 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
-