Interface ReportDataSource

All Known Implementing Classes:
QueryReportDataSource, ScriptReportDataSource, StaticReportDataSource

public interface ReportDataSource
This is the interface that module authors who wish to add a new report data source must implement and register in the Gateway scope. You must register your implementation of this interface with the GatewayDataSourceRegistry
Since:
7.8.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    gatherData(ReportExecutionContext execContext, Serializable configObject, Map<String,Object> extraConfigs)
    Called when a report is being executed to gather the data represented by this data source.
    Return the unique ID for this data source.
  • Method Details

    • getId

      String getId()
      Return the unique ID for this data source. Should be qualified, such as com.example.data-source-type. Must match the ID returned by your DataSourceConfigFactory in the designer scope.
    • gatherData

      void gatherData(ReportExecutionContext execContext, Serializable configObject, Map<String,Object> extraConfigs) throws Exception
      Called when a report is being executed to gather the data represented by this data source. This method is high re-entrant. A given data source instance will be used for concurrently executing reports. This method must inject the data it gathers into the data map.
      Parameters:
      execContext - This context holds the data map for the report, as well as other information about the report, its project, logging context, status feedback, etc.
      configObject - The object that was saved for this data source in the designer.
      extraConfigs - Any extra info datasources might need when running. Will be null if not sample data. It's up to the datasource to decide what object(s) from this map it wants. Key is the datasource id.
      Throws:
      Exception
      Since:
      7.9.4 (extra configs added)