Coverage Report - org.apache.tapestry.record.PropertyChangeObserver
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertyChangeObserver
N/A
N/A
1
 
 1  
 // Copyright 2004, 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  
 package org.apache.tapestry.record;
 15  
 
 16  
 import org.apache.tapestry.IComponent;
 17  
 import org.apache.tapestry.Tapestry;
 18  
 
 19  
 
 20  
 /**
 21  
  * Core service that is consulted anytime a specified component property is set. This service
 22  
  * is intended to be used as a means of intercepting component property state objects so that 
 23  
  * their individual properties can be observed independently from basic set/get operations 
 24  
  * done on page/component properties.
 25  
  * 
 26  
  */
 27  
 public interface PropertyChangeObserver
 28  
 {
 29  
 
 30  
     /**
 31  
      * Invoked by the enhanced property workers any time a {@link IComponent} property is set, either
 32  
      * by an initial value binding or explicitly through an abstract setter.
 33  
      * 
 34  
      * @param component
 35  
      *          The component that this property is attached to.
 36  
      * @param property 
 37  
      *          The object to observe changes on, may be null.
 38  
      * @param propertyName
 39  
      *          The name of the property being observed - needed for doing things like calling
 40  
      *          {@link Tapestry#fireObservedChange(IComponent, String, Object)}.
 41  
      * @return Expected to return either the same exact instance passed in or one that is proxied but still
 42  
      *         maintains the original state of the object.
 43  
      */
 44  
     Object observePropertyChanges(IComponent component, Object property, String propertyName);
 45  
 }