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
015package org.apache.tapestry.describe;
016
017/**
018 * Extended version of {@link org.apache.tapestry.describe.DescriptionReceiver} that adds the
019 * ability to describe the root object, and to finish the description of an object (allowing the
020 * same receiver to be used to describe several objects).
021 * 
022 * @author Howard M. Lewis Ship
023 */
024public interface RootDescriptionReciever extends DescriptionReceiver
025{
026
027    /**
028     * Describes the object, using a {@link DescribableStrategy}, or just the object's toString()
029     * if there is no strategy for the object. Automatically invokes {@link #finishUp()} when done.
030     * 
031     * @param object
032     *            to be described, which may be null
033     */
034    void describe(Object object);
035
036    /**
037     * Invoked after one object has been fully described. Ends a <table>, if one has been
038     * started, and resets the receiver to begin a new object.
039     */
040    void finishUp();
041
042}