Class StaticReportDataSource
java.lang.Object
com.inductiveautomation.reporting.gateway.data.StaticReportDataSource
- All Implemented Interfaces:
ReportDataSource
StaticReportDataSource
Author: Perry
This class provides a static data source to a report resource.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThis Convenience Builder will look through all the rows of a given column, trying to parse the values as Numbers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgatherData(ReportExecutionContext context, Serializable aConfigObject, Map<String, Object> extraConfigs) Called when a report is being executed to gather the data represented by this data source.getId()Return the unique ID for this data source.static Liststatic MaptoMap(JSONObject object)
-
Constructor Details
-
StaticReportDataSource
public StaticReportDataSource()
-
-
Method Details
-
gatherData
public void gatherData(ReportExecutionContext context, Serializable aConfigObject, Map<String, Object> extraConfigs) throws ExceptionDescription copied from interface:ReportDataSourceCalled 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.- Specified by:
gatherDatain interfaceReportDataSource- Parameters:
context- This context holds the data map for the report, as well as other information about the report, its project, logging context, status feedback, etc.aConfigObject- 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
-
getId
Description copied from interface:ReportDataSourceReturn 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.- Specified by:
getIdin interfaceReportDataSource
-
toMap
- Throws:
JSONException
-
toList
- Throws:
JSONException
-