org.apache.tapestry.asset
Interface ResourceDigestSource
- All Known Implementing Classes:
- ResourceDigestSourceImpl
- public interface ResourceDigestSource
Calculates the digest 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 digest value).
- Since:
- 4.0
- Author:
- Howard M. Lewis Ship
Method Summary |
java.lang.String |
getDigestForResource(java.lang.String resourcePath)
Calculates the DIGEST checksum for a classpath resource. |
getDigestForResource
public java.lang.String getDigestForResource(java.lang.String resourcePath)
- Calculates the DIGEST checksum for a classpath resource. Because this is expensive, the value
may be cached.
- Parameters:
resourcePath
- the classpath resource, which should start with a leading slash.
- Returns:
- A string representation of the digest for the provided resource path.
- Throws:
ApplicationRuntimeException
- if the resource does not exist, or there is an error calculating the checksum.