Class GatewayDataSourceRegistry
- java.lang.Object
-
- com.inductiveautomation.reporting.gateway.api.GatewayDataSourceRegistry
-
public final class GatewayDataSourceRegistry extends java.lang.Object
This registry holds the types of report data sources usable in the gateway for generating reports. To add your own type of report data source, implementReportDataSource
and then in a Gateway hook class, register it like so:GatewayDataSourceRegistry.get(context).register(myDataSource);
Created by carl.gould on 1/13/2015.
-
-
Constructor Summary
Constructors Constructor Description GatewayDataSourceRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ReportDataSource>
findDataSource(java.lang.String id)
Look up the data source represented by the given id.java.util.Optional<QuerySource>
findQuerySource(java.lang.String id)
Look up the query source represented by the given id.static GatewayDataSourceRegistry
get(GatewayContext context)
void
register(QuerySource querySource)
Adds the given query source to the list of registered query sourcesvoid
register(ReportDataSource dataSource)
Adds the given data source to the list of registered data typesjava.util.Optional<ReportDataSource>
unregisterDataSource(java.lang.String id)
Removes the data source represented by the given idjava.util.Optional<QuerySource>
unregisterQuerySource(java.lang.String id)
Removes the query source represented by the given id
-
-
-
Method Detail
-
get
public static GatewayDataSourceRegistry get(GatewayContext context)
-
register
public void register(ReportDataSource dataSource)
Adds the given data source to the list of registered data types
-
unregisterDataSource
public java.util.Optional<ReportDataSource> unregisterDataSource(java.lang.String id)
Removes the data source represented by the given id
-
findDataSource
public java.util.Optional<ReportDataSource> findDataSource(java.lang.String id)
Look up the data source represented by the given id.
-
register
public void register(QuerySource querySource)
Adds the given query source to the list of registered query sources
-
unregisterQuerySource
public java.util.Optional<QuerySource> unregisterQuerySource(java.lang.String id)
Removes the query source represented by the given id
-
findQuerySource
public java.util.Optional<QuerySource> findQuerySource(java.lang.String id)
Look up the query source represented by the given id.
-
-