Coverage Report - org.apache.tapestry5.Asset2
 
Classes in this File Line Coverage Branch Coverage Complexity
Asset2
N/A
N/A
1
 
 1  
 // Copyright 2009 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.tapestry5;
 16  
 
 17  
 /**
 18  
  * Extension to {@link org.apache.tapestry5.Asset} that adds a method to determine if the asset is invariant or not.
 19  
  * {@link org.apache.tapestry5.services.AssetFactory} instances should ideally return Asset2 objects, not Asset. This is
 20  
  * only of primary interest to the {@link org.apache.tapestry5.internal.bindings.AssetBindingFactory}, as it determines
 21  
  * the invariance of the binding from the asset (and assumes variant unless the asset object implements this
 22  
  * interface).
 23  
  *
 24  
  * @since 5.1.0.0
 25  
  */
 26  
 public interface Asset2 extends Asset
 27  
 {
 28  
     /**
 29  
      * Returns true if the Asset is invariant (meaning that it returns the same value from {@link Asset#toClientURL()}
 30  
      * at all times}. Assets that are used as binding values will be cached more aggresively by Tapestry as they are
 31  
      * invariant.
 32  
      *
 33  
      * @return true if invariant
 34  
      * @see org.apache.tapestry5.services.AssetPathConverter#isInvariant()
 35  
      * @see Binding#isInvariant()
 36  
      */
 37  
     boolean isInvariant();
 38  
 }