Package 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
-
Method Summary
Modifier and TypeMethodDescriptionformat
(Content content, ContentTransformer<InternalType> transformer) Formats raw data and returns it in aDataType
that's supported by the back-end stores.
-
Method Details
-
format
DataType format(Content content, ContentTransformer<InternalType> transformer) throws FormatException Formats raw data and returns it in aDataType
that's supported by the back-end stores.- Parameters:
content
- aContent
instance that contains the raw data with additional information that describes the storage and formatting of the processed datatransformer
- a transformer that will be used to modify raw data after it has been loaded; ornull
if the data shouldn't be transformed- Returns:
- the result of the formatting of the raw data
- Throws:
FormatException
- Since:
- 1.0
-