com.atlassian.confluence.importexport.resource
Class WebImagesDownloadResourceManager

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

public class WebImagesDownloadResourceManager
extends Object
implements DownloadResourceManager


Constructor Summary
WebImagesDownloadResourceManager()
           
 
Method Summary
 DownloadResourceReader getResourceReader(String userName, String resourcePath, Map parameters)
          Returns a WebImagesDownloadResourceReader for retrieving web application images.
 boolean matches(String resourcePath)
          Returns a boolean to indicate whether the current DownloadResourceManager will know how to handle the given resourcePath.
 void setBootstrapManager(BootstrapManager bootstrapManager)
           
 void setResourceAccessor(ResourceAccessor resourceAccessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebImagesDownloadResourceManager

public WebImagesDownloadResourceManager()
Method Detail

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 WebImagesDownloadResourceReader for retrieving web application images. Username and parameters are ignored.

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:
UnauthorizedDownloadResourceException - if the user requesting the downloadable resource does not have the permissions to get it
DownloadResourceNotFoundException - if the downloadable resource associated with the resourcePath cannot be found

setResourceAccessor

public void setResourceAccessor(ResourceAccessor resourceAccessor)

setBootstrapManager

public void setBootstrapManager(BootstrapManager bootstrapManager)


Copyright © 2003-2012 Atlassian. All Rights Reserved.