com.atlassian.confluence.importexport.resource
Class DelegatorDownloadResourceManager
java.lang.Object
com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager
- All Implemented Interfaces:
- DownloadResourceManager
public class DelegatorDownloadResourceManager
- extends java.lang.Object
- implements DownloadResourceManager
Delegates to the appropriate download resource manager for resource retrievals.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatorDownloadResourceManager
public DelegatorDownloadResourceManager()
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
- 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 DownloadResourceNotFoundException,
UnauthorizedDownloadResourceException
- Description copied from interface:
DownloadResourceManager
- Returns a
DownloadResourceReader
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 interface DownloadResourceManager
- 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:
DownloadResourceNotFoundException
- if the downloadable resource associated with the resourcePath cannot be
found
UnauthorizedDownloadResourceException
- if the user requesting the downloadable resource does not have the
permissions to get it
setDownloadResourceManagers
public void setDownloadResourceManagers(java.util.List downloadResourceManagers)
Copyright © 2003-2013 Atlassian. All Rights Reserved.