org.apache.tapestry.describe
Interface DescriptionReceiver

All Known Subinterfaces:
RootDescriptionReciever
All Known Implementing Classes:
HTMLDescriptionReceiver, ReportStatusEvent

public interface DescriptionReceiver

An object that is provided with a description of another object. The receiver will format this information.

Since:
4.0
Author:
Howard M. Lewis Ship

Method Summary
 void array(String key, Object[] values)
          Emits a list of values for the key.
 void collection(String key, Collection values)
          As with array(String, Object[]), but the values are in a collection (which may be null, to emit nothing).
 void describeAlternate(Object alternate)
          Invoke to describe another object instead of the current object.
 void property(String key, boolean value)
           
 void property(String key, byte value)
           
 void property(String key, char value)
           
 void property(String key, double value)
           
 void property(String key, float value)
           
 void property(String key, int value)
           
 void property(String key, long value)
           
 void property(String key, Object value)
          Emits a key/value pair, describing a property of the object.
 void property(String key, short value)
           
 void section(String section)
          Starts a new sub-section within the description.
 void title(String title)
          Provides a title for the object; usually the object's class name.
 

Method Detail

describeAlternate

void describeAlternate(Object alternate)
Invoke to describe another object instead of the current object.


title

void title(String title)
Provides a title for the object; usually the object's class name.

Throws:
IllegalStateException - if called more than once (for the same object)

section

void section(String section)
Starts a new sub-section within the description. A description may have any number of sections (but sections do not nest). A second title is only emitted when the firstproperty within the section is emitted.

Throws:
IllegalStateException - if called before invoking title(String).

property

void property(String key,
              Object value)
Emits a key/value pair, describing a property of the object. The value will itself be described. This method is overridden for scalar property types.

Throws:
IllegalStateException - if called before invoking title(String)

property

void property(String key,
              boolean value)

property

void property(String key,
              byte value)

property

void property(String key,
              short value)

property

void property(String key,
              int value)

property

void property(String key,
              long value)

property

void property(String key,
              float value)

property

void property(String key,
              double value)

property

void property(String key,
              char value)

array

void array(String key,
           Object[] values)
Emits a list of values for the key. Each value will be described. Emits nothing if the array is null.


collection

void collection(String key,
                Collection values)
As with array(String, Object[]), but the values are in a collection (which may be null, to emit nothing).



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.