org.apache.tapestry.asset
Class ResourceDigestSourceImpl

java.lang.Object
  extended byorg.apache.tapestry.asset.ResourceDigestSourceImpl
All Implemented Interfaces:
java.util.EventListener, ResetEventListener, ResourceDigestSource

public class ResourceDigestSourceImpl
extends java.lang.Object
implements ResourceDigestSource, ResetEventListener

Implementation of ResourceDigestSource that calculates an DIGEST checksum digest and converts it to a string of hex digits.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
ResourceDigestSourceImpl()
           
 
Method Summary
 java.lang.String getDigestForResource(java.lang.String resourcePath)
          Calculates the DIGEST checksum for a classpath resource.
 void resetEventDidOccur()
           
 void setClassResolver(org.apache.hivemind.ClassResolver classResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDigestSourceImpl

public ResourceDigestSourceImpl()
Method Detail

getDigestForResource

public java.lang.String getDigestForResource(java.lang.String resourcePath)
Description copied from interface: ResourceDigestSource
Calculates the DIGEST checksum for a classpath resource. Because this is expensive, the value may be cached.

Specified by:
getDigestForResource in interface ResourceDigestSource
Parameters:
resourcePath - the classpath resource, which should start with a leading slash.
Returns:
A string representation of the digest for the provided resource path.

resetEventDidOccur

public void resetEventDidOccur()
Specified by:
resetEventDidOccur in interface ResetEventListener

setClassResolver

public void setClassResolver(org.apache.hivemind.ClassResolver classResolver)