Start page
Start page

Start page / Plug-In Development / Universal Extensions / Reports / 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
Developer 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
Developer 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
Developer 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
Developer 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
Developer 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 - 2015 e-Spirit AG | All rights reserved. | Last change: 2014-05-05