com.uwyn.rife.cmf.format
Interface Formatter<DataType,InternalType>

All Known Implementing Classes:
ImageFormatter, PlainTextFormatter, RawFormatter, XhtmlFormatter

public interface Formatter<DataType,InternalType>

Formats raw data according to the information that's provided by a Content instance. The raw data will be loaded, optionally transformed and eventually returned.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Method Summary
 DataType format(Content content, ContentTransformer<InternalType> transformer)
          Formats raw data and returns it in a DataType that's supported by the back-end stores.
 

Method Detail

format

DataType format(Content content,
                ContentTransformer<InternalType> transformer)
                throws FormatException
Formats raw data and returns it in a DataType that's supported by the back-end stores.

Parameters:
content - a Content instance that contains the raw data with additional information that describes the storage and formatting of the processed data
transformer - a transformer that will be used to modify raw data after it has been loaded; or

null if the data shouldn't be transformed

Returns:
the result of the formatting of the raw data
Throws:
FormatException
Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.