org.apache.tapestry.asset
Interface ResourceChecksumSource

All Known Implementing Classes:
ResourceChecksumSourceImpl

public interface ResourceChecksumSource

Calculates the checksum value, as a string, for a particular classpath resource. This is primarily used by the AssetService to authenticate requests (you are not allowed access to a resource unless you can provide the correct checksum value). This code is based on code from Howard Lewis Ship from the upcoming 3.1 release.

Since:
3.0.3
Author:
Paul Ferraro

Method Summary
 String getChecksum(URL resourceURL)
          Returns the checksum value for the given resource.
 void reset()
          Clears the internal cache.
 

Method Detail

getChecksum

String getChecksum(URL resourceURL)
Returns the checksum value for the given resource.

Parameters:
resourceURL - the url of a resource
Returns:
the checksum value of the specified resource

reset

void reset()
Clears the internal cache.