Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.services
Interface ResourceDigestGenerator

All Known Implementing Classes:
  ResourceDigestGeneratorImpl

    @UsesConfiguration(value=java.lang.String.class)
    public interface ResourceDigestGenerator

Responsible for determining which classpath resources require checksums, and for generating checksums for such resources.

The service's configuration identifies which file extensions will be secured using an checksum. The default list is "class" and "tml".

See Also:
  `ClasspathResource`, `ClasspathAssetFactory`

Method Summary
`java.lang.String` | `generateDigest(java.net.URL url)` Reads the content of a URL (presumably, for a resource on the classpath) and generates a digest of its content.
`boolean` | `requiresDigest(java.lang.String path)` Examines the path (typically, the file name extension at the end of the path) to determine if a checksum is required for the path.

Method Detail

### requiresDigest

    boolean requiresDigest(java.lang.String path)

  Examines the path (typically, the file name extension at the end of the path) to determine if a checksum is required for the path. The path is `Resource` style, without a leading slash.

### generateDigest

    java.lang.String generateDigest(java.net.URL url)

  Reads the content of a URL (presumably, for a resource on the classpath) and generates a digest of its content. This digest will be incorporated into the URL provided to the client, to verify that the client has been "granted" access to this resource. This is only used for resources where `requiresDigest(String)` is true.

  Parameters:
    `url` -
  Returns:
    the digest for the resource

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.