|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExportTemplate
A helper interface for the SimpleExport
class to make it
easier to output exported data in different formats.
Method Summary | |
---|---|
void |
beginDocument()
Start writing the document. |
void |
beginItem(int id)
Start writing a new item. |
void |
endDocument()
End writing the document. |
void |
endItem()
End writing an item |
String |
getMimeType()
Get the MIME type to assign to files generated by this template. |
void |
writeAnnotations(ExportedProperty ep,
List<?> values,
String unit)
Write annotation values. |
void |
writeCollection(ExportedProperty ep,
Collection<?> values)
Write the values in a collection |
void |
writeHeaders()
Write headers. |
void |
writeProperty(ExportedProperty ep,
Object data)
Write the specified property values. |
Method Detail |
---|
String getMimeType()
void beginDocument() throws IOException
IOException
- If there is an errorvoid writeHeaders() throws IOException
IOException
- If there is an errorvoid beginItem(int id) throws IOException
id
- Id of the new item.
IOException
- If there is an errorvoid writeAnnotations(ExportedProperty ep, List<?> values, String unit) throws IOException
ep
- Exported property the annotations belongs tovalues
- Annotation values to be written.unit
- The unit of the annotation values, or null
to not display write a unit
IOException
- If there is an errorvoid writeProperty(ExportedProperty ep, Object data) throws IOException
ep
- The exported property the data
belongs to.data
- Data to be written.
IOException
- If there is an errorvoid writeCollection(ExportedProperty ep, Collection<?> values) throws IOException
ep
- Exported property the values belong tovalues
- The values to be written
IOException
void endItem() throws IOException
IOException
- If there is an errorvoid endDocument() throws IOException
IOException
- If there is an error
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |