001 // Copyright 2005 The Apache Software Foundation
002 //
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 at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // 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 and
013 // limitations under the License.
014
015 package org.apache.tapestry.describe;
016
017 /**
018 * Extended version of {@link org.apache.tapestry.describe.DescriptionReceiver}
019 * that adds the ability to describe the root object, and to finish the
020 * description of an object (allowing the same receiver to be used to describe
021 * several objects).
022 *
023 * @author Howard M. Lewis Ship
024 */
025 public interface RootDescriptionReciever extends DescriptionReceiver
026 {
027
028 /**
029 * Describes the object, using a {@link DescribableStrategy}, or just the
030 * object's toString() if there is no strategy for the object. Automatically
031 * invokes {@link #finishUp()} when done.
032 *
033 * @param object
034 * to be described, which may be null
035 */
036 void describe(Object object);
037
038 /**
039 * Invoked after one object has been fully described. Ends a <table>,
040 * if one has been started, and resets the receiver to begin a new object.
041 */
042 void finishUp();
043
044 }