Interface IRVDataSourceProvider


  • public interface IRVDataSourceProvider
    The interface that must be implemented to replace data sources. It must be passed to Reveal Engine initialization. See 'Replacing data sources' in the developer guide for more information.
    • Method Detail

      • changeDataSourceItem

        RVDataSourceItem changeDataSourceItem​(IRVUserContext userContext,
                                              String dashboardId,
                                              RVDataSourceItem dataSourceItem)
        This method can be used to replace a data source, returning null indicates Reveal to use the original data source. This method will be invoked every time data is requested for a dashboard, which can be quite frequent. If the method is slow, it will make all data requests slow. In that case, consider caching whatever information is required for this method to return quickly.
        Parameters:
        userContext - The user context of the user requesting data, as returned by IRVUserContextProvider.getUserContext().
        dashboardId - The ID of the dashboard being loaded.
        dataSourceItem - The data source item referencing the data source currently used by the visualization, like the name of the table, database, etc.
        Returns:
        A new data source item for the visualization, or null if the data source shouldn't be changed.
      • changeDataSource

        RVDashboardDataSource changeDataSource​(IRVUserContext userContext,
                                               RVDashboardDataSource dataSource)
        This method can be used to replace a data source, returning null indicates Reveal to use the original data source. This method will be invoked every time data is requested for a dashboard, which can be quite frequent. If the method is slow, it will make all data requests slow. In that case, consider caching whatever information is required for this method to return quickly.
        Parameters:
        userContext - The user context of the user requesting data, as returned by IRVUserContextProvider.getUserContext().
        dataSource - Information about the data source being used, like the host name for a database, etc.
        Returns: