Package io.revealbi.core
Class RevealServerBuilder
java.lang.Object
io.revealbi.core.RevealServerBuilder
Builds instances of
IRevealServer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPlugin(RevealPlugin plugin) addRedisCache(Consumer<RVRedisOptions> configure) Configures Redis as the cache provider for the Reveal server.addSettings(Consumer<RevealSettings> consumer) Applies additional settings to the Reveal server configuration.build()Builds the Reveal server.setAuthenticationProvider(IRVAuthenticationProvider authenticationProvider) The authentication provider that provides credentials for data sources.setDashboardProvider(IRVDashboardProvider dashboardProvider) The dashboard provider, used to load and save dashboards.setDataModelProvider(IRVDataModelProvider dataModelProvider) Sets the data model provider used to customize the schema, calculated fields, and measures exposed by data sources.setDataProvider(IRVDataProvider dataProvider) The data provider, used for in-memory data sources.setDataSourceProvider(IRVDataSourceProvider dataSourceProvider) The data source provider, used to replace data sources in existing dashboards when they are opened.setObjectFilter(IRVObjectFilter objectFilter) The optional object filter, used to filter 'objects' (DataSource and DataSourceItems) to be returned to the client.setSystemUserContextProvider(IRVSystemUserContextProvider systemUserContextProvider) Sets a provider for system-level engine callbacks that are not associated with a normal client request.
-
Constructor Details
-
RevealServerBuilder
public RevealServerBuilder()
-
-
Method Details
-
addSettings
Applies additional settings to the Reveal server configuration.- Parameters:
consumer- The consumer that configures the settings.- Returns:
- The same builder instance, so you can continue setting other properties.
-
addPlugin
-
setSystemUserContextProvider
public RevealServerBuilder setSystemUserContextProvider(IRVSystemUserContextProvider systemUserContextProvider) Sets a provider for system-level engine callbacks that are not associated with a normal client request.- Parameters:
systemUserContextProvider- A provider that returns the user context for system callbacks.- Returns:
- The same build instance, so you can continue setting other properties.
-
addRedisCache
Configures Redis as the cache provider for the Reveal server. When set, Redis is used instead of the default in-memory cache.Example:
new RevealServerBuilder() .addRedisCache(redis -> { redis.setConnectionString("localhost:6379"); redis.setPassword("your-password"); }) .build();- Parameters:
configure- A consumer that receives aRVRedisOptionsinstance to configure the Redis connection.- Returns:
- The same builder instance, so you can continue setting other properties.
-
setAuthenticationProvider
public RevealServerBuilder setAuthenticationProvider(IRVAuthenticationProvider authenticationProvider) The authentication provider that provides credentials for data sources.- Parameters:
authenticationProvider- An instance ofIRVAuthenticationProviderused to provide credentials for data sources.- Returns:
- The same build instance, so you can continue setting other properties.
-
setDashboardProvider
The dashboard provider, used to load and save dashboards.- Parameters:
dashboardProvider- An instance ofIRVDashboardProviderused to load and save dashboards.- Returns:
- The same build instance, so you can continue setting other properties.
-
setDataSourceProvider
The data source provider, used to replace data sources in existing dashboards when they are opened.- Parameters:
dataSourceProvider- An instance ofIRVDataSourceProviderused to replace data sources in existing dashboards.- Returns:
- The same build instance, so you can continue setting other properties.
-
setDataProvider
The data provider, used for in-memory data sources.- Parameters:
dataProvider- An instance ofIRVDataProviderused for in-memory data sources.- Returns:
- The same build instance, so you can continue setting other properties.
-
setObjectFilter
The optional object filter, used to filter 'objects' (DataSource and DataSourceItems) to be returned to the client.- Parameters:
objectFilter- The object filter instance.- Returns:
- The same build instance, so you can continue setting other properties.
-
setDataModelProvider
Sets the data model provider used to customize the schema, calculated fields, and measures exposed by data sources.Beta notice: This method is part of the beta
IRVDataModelProviderAPI. The API surface may change in future releases without prior notice.- Parameters:
dataModelProvider- An instance ofIRVDataModelProvider.- Returns:
- The same build instance, so you can continue setting other properties.
-
build
Builds the Reveal server.- Returns:
- The built Reveal server.
-