Stardust uses preference store to store preferences in a repository. These preferences are kept in the audit trail table Preferences. For details on this table and its entries, please refer to chapter The Repository Model.
The Preference Store supports different scopes to store and retrieve preferences. A scope always has to be specified when accessing the preference store.
The following scopes are available:
The scope DEFAULT is read only. It is used to read default values
supplied by the IStaticConfigurationProvider SPI
implementing providers. Refer to chapter
Implementing a Static Configuration Provider for Default Preferences
for details on the SPI provided by Stardust
for default preferences.
Scope PARTITION is readable and writable. It is used to address preferences on partition level. Preferences with this scope are accessible for all users on the same partition.
Scope REALM is readable and writable. It is used to address preferences on realm level. Preferences with this scope are saved per user realm. Only users on the same user realm can access the same set of preferences.
Scope USER is readable and writable. It is used to address preferences on user level. Preferences with this scope are saved per user. No other users except administrators have access to them.
Preferences are stored for different views on the basis of per user, per realm or per
partition.
If no user specific preferences exist, the preferences scopes are hierarchically
accessed to retrieve the currently valid preferences for a view. The scope hierarchy
of the preference retrieval is the following:
USER > REALM > PARTITION > DEFAULT.
During a model deployment or overwrite, configuration variables are evaluated for validation only. When the model is written to the audit trail, the configuration variables are kept. They are evaluated on model load during runtime.
All Configuration Variable values are stored in the table
Preferences using the moduleId
configuration-variables on tenant level.
The qualified model id is stored as preferencesId.
The scope PARTITION is used to store tenant level preferences.
Thus, the variables can be exported and imported between environments.
An existing scenario is the storage of preferences for the
Gantt Chart View, used in the
Control Center perspective.
Here, the moduleId entry of the Preferences
table is "bcc" and the preferencesId
entry is "gantt-chart", while the scope
is used to find the currently valid preferences for the logged-in user.
API is provided to retrieve and change preferences. Please refer to chapter Retrieving and Changing Preferences in the Programming Guide for details.