Reports: Code Example
The report plug-in code example is split into several pages based on Java interfaces.
A custom report consists of at least the following three, mandatory Java classes which implement specific interfaces:
Report Plug-In
Access API documentation: ReportPlugin<T>
- defines the data type (one or several Java classes) that this report plug-in and lower-level classes operate on
Data Provider
Access API documentation: DataProvider<T>
- assembles and supplies a list of objects (according to the data type(s) specified in the report plug-in) that will be listed in the report
- provides an initial list of objects and, on-demand, incremental lists of further results
Data Renderer
Access API documentation: DataRenderer<T>
- provides text and thumbnail data for an individual snippet's display in the report
Several optional features may also be implemented:
Transfer Handler
Access API documentation: TransferHandler<T>
- provides data about a single report entry
- enables drag-and-drop of report entries within the SiteArchitect and ContentCreator user interfaces
Report Item
Access API documentation:
Executable report item
- SiteArchitect: JavaClientExecutableReportItem<T>
- ContentCreator: WebeditExecutableReportItem<T>
JavaScript report item
- ContentCreator: ClientScriptProvidingReportItem<T>
- an executable action associated with a single report entry
- both an executable format as well as a ContentCreator-specific JavaScript format are available
The report plug-in and all of its associated classes are parameterized with the type ExampleReportObject. This implies that data for individual "report entries" is stored in single objects of this type (or its sub-classes). For the purposes of the annotated code examples in this chapter, a class ExampleReportObject has the following properties:
|