ReGraph License Configuration
Overview
Starting with ReGraph v5, the license handling has changed. The license is now managed through the UiSdlGraphConfig type and must be configured on a per-application basis.
License Requirement
The ReGraph library requires a valid license to render graph visualizations. If no license is configured in UiSdlGraphConfig, the graph will not render.
License Management
The license is managed by C3 and provided through configuration. Application developers do not need to obtain or manage the license directly, but they must ensure the configuration is properly set up in their application.
Configuration Type
The UiSdlGraphConfig type provides access to graph visualization configuration settings. This type mixes Configurable<UiSdlGraphConfigSettings> and Singleton, allowing centralized management of the license token.
Key Methods
setAccessToken(accessToken): Sets the graph visualization access token.getAccessToken(): Retrieves the configured access token.clearAccessToken(): Clears the configured access token.configWithAccessToken(): Returns the configuration settings with the access token.
Setting Up the License in Your Application
To configure the ReGraph license in your application:
Get the UiSdlGraphConfig instance:
JavaScriptvar graphConfig = UiSdlGraphConfig.inst();Set the access token provided by C3:
JavaScriptgraphConfig.setAccessToken('your_access_token');Verify the token is set:
JavaScriptconst accessToken = graphConfig.getAccessToken();
Important Notes
- The license must be defined on a per-application basis.
- Without a valid license configured, graph visualizations will not render.
- The access token is stored securely using the
@config(secret=true)annotation in UiSdlGraphConfigSettings. - Contact your C3 representative to obtain the appropriate license for your application.