Clover coverage report - Code Coverage for tapestry release 4.0-beta-9
Coverage timestamp: Sat Oct 1 2005 08:36:20 EDT
file stats: LOC: 52   Methods: 0
NCLOC: 8   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AssetSource.java - - - -
coverage
 1    // Copyright 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.asset;
 16   
 17    import java.util.Locale;
 18   
 19    import org.apache.hivemind.Location;
 20    import org.apache.hivemind.Resource;
 21    import org.apache.tapestry.IAsset;
 22   
 23    /**
 24    * Used to create an {@link org.apache.tapestry.IAsset} instance for a particular asset path. The
 25    * path may have a prefix that indicates its type, or it may be relative to some existing resource.
 26    *
 27    * @author Howard M. Lewis Ship
 28    * @since 4.0
 29    */
 30    public interface AssetSource
 31    {
 32    /**
 33    * Finds an asset relative to some existing resource (typically, a page, component or library
 34    * specification).
 35    *
 36    * @param base
 37    * the base resource used for resolving the asset
 38    * @param path
 39    * the path relative to the base resource; alternately, the path may include a prefix
 40    * that defines a domain (such as "classpath:" or "context:") in which case the base
 41    * resource is ignored and the resource resolved within that domain
 42    * @param locale
 43    * used to find a localized version of the asset, may be null to indicate no
 44    * localization
 45    * @param location
 46    * used to report errors (such as missing resources)
 47    * @return the asset, possibly localized
 48    * @throws org.apache.hivemind.ApplicationRuntimeException
 49    * if the asset does not exist
 50    */
 51    public IAsset findAsset(Resource base, String path, Locale locale, Location location);
 52    }