Start page / Plug-In Development / Universal Extensions / Reports (Legacy) / Code Example

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

JavaScript report item

  • an executable action associated with a single report entry
  • both an executable format as well as a ContentCreator-specific JavaScript format are available

Important 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:
  • a constructor which accepts a String object as its single parameter
  • a toString() method which returns the String object that was passed during instantiation of the object

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy