001 // Copyright 2009, 2010 The Apache Software Foundation002 //003 // Licensed under the Apache License, Version 2.0 (the "License");004 // you may not use this file except in compliance with the License.005 // You may obtain a copy of the License at006 //007 // http://www.apache.org/licenses/LICENSE-2.0008 //009 // Unless required by applicable law or agreed to in writing, software010 // distributed under the License is distributed on an "AS IS" BASIS,011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.012 // See the License for the specific language governing permissions and013 // limitations under the License.014015 package org.apache.tapestry5.internal.services;016017 import java.io.IOException;018019 import org.apache.tapestry5.ioc.Resource;020021 /**022 * Responsible for converting a path into a {@link org.apache.tapestry5.ioc.Resource} that can be023 * {@linkplain org.apache.tapestry5.internal.services.ResourceStreamer024 * streamed to the client}. The path is on the classpath, but may have been changed to include a checksum (in025 * certain cases).026 * 027 * @since 5.1.0.2028 */029 public interface AssetResourceLocator030 {031 /**032 * For a complete classpath path, returns the Resource for the path. This include checking for a033 * digest for protected files.034 * 035 * @return036 * resource corresponding to path (may be for a non-existent resource), or null if path is invalid (i.e.,037 * incorrect digest)038 */039 Resource findClasspathResourceForPath(String path) throws IOException;040 }