User data source
Unica Platform uses user data sources to store sensitive information, such as API credentials, security tokens, database user credentials, etc. Plugins often need to store such configuration details. Content Integration provides the relevant configuration to specify the name of user data source and the associated Unica user while onboarding systems using Unica Platform configuration.
Use the ExecutionContext
to obtain applicable user data source
(credentials) by navigating through SystemConfig
object:
executionContext.getSystemConfig().getDataSourceCredentials()
The DataSourceCredentials
object returned by the
getDataSourceCredentials
method contains the selected data source
based on the strategy set up for User credentials in Platform
configuration. Hence, plugins need not make any logical decision pertaining to the right
selection of the user data source.
Likewise, SystemConfig
object also provides an overloaded version of
getDataSourceCredentials
,
getDataSourceCredentials
(String username, String dataSourceName), which
accepts the username & the name of data source to be looked up in the given user’s
account. This method can be used for obtaining user data sources in other similar
logical contexts should there be any need.