com.nordija.tapestry.bayeux.downloads
Interface DownloadResourceSource


public interface DownloadResourceSource

A source for resources that can be downloaded by the bayeux downloads service.

An implementation of this interface must be configured in the application using the bayeux downloads service as an extension. The downloads service will ask the defined implementation for a resource based on an id when links are clicked.

Version:
$Id: DownloadResourceSource.java 72 2007-05-13 13:10:58Z jeyben $
Author:
Per Olesen www.nordija.com
See Also:
DownloadService

Method Summary
 DownloadResource getDownloadResource(org.apache.tapestry.IRequestCycle cycle, java.lang.String resourceId)
          Called by downloads service when a download link has been clicked and the resource to be downloaded is to be obtained from somewhere.
 

Method Detail

getDownloadResource

DownloadResource getDownloadResource(org.apache.tapestry.IRequestCycle cycle,
                                     java.lang.String resourceId)
                                     throws java.io.IOException
Called by downloads service when a download link has been clicked and the resource to be downloaded is to be obtained from somewhere.

Parameters:
cycle - the request cycle which originated the incoming request for a download resource
resourceId - the id from the download link
Returns:
an instance of the resource identified by the given id or null if resource not found
Throws:
java.io.IOException - if obtaining the resource fails with an exception (no resource on id should not result in this exception!)


Copyright © 2004-2007 Nordija A/S. All Rights Reserved.