org.apache.tapestry5.services
Interface DataTypeAnalyzer

All Known Implementing Classes:
AnnotationDataTypeAnalyzer, DefaultDataTypeAnalyzer, KaptchaDataTypeAnalyzer

@UsesOrderedConfiguration(value=DataTypeAnalyzer.class)
@UsesMappedConfiguration(key=java.lang.Class.class,
                         value=java.lang.String.class)
public interface DataTypeAnalyzer

Used by BeanModelSource to identify the type of data associated with a particular property (represented as a PropertyAdapter). The data type is a string used to determine what kind of interface to use for displaying the value of the property, or what kind of interface to use for editing the value of the property. Common property types are "text", "enum", "checkbox", but the list is extensible.

Different strategies for identifying the data type are encapsulated in the DataTypeAnalyzer service, forming a chain of command.

The DefaultDataTypeAnalyzer service maps property types to data type names.

The DataTypeAnalyzer service is an extensible chain of command), that (by default) includes AnnotationDataTypeAnalyzer and the DefaultDataTypeAnalyzer service (ordered last). It uses an ordered configuration.

See Also:
Grid, BeanEditForm, BeanBlockSource

Method Summary
 String identifyDataType(PropertyAdapter adapter)
          Identifies the data type, if known, or returns null if not known.
 

Method Detail

identifyDataType

String identifyDataType(PropertyAdapter adapter)
Identifies the data type, if known, or returns null if not known.



Copyright © 2003-2012 The Apache Software Foundation.