Namespace: Settings

sap. Settings

Provides settings exchange functionality

Methods

(static) isFeatureEnabled(name, successCallback, errorCallback)

This function return true if the feature is allowed and false if feature is not permitted.
Parameters:
Name Type Description
name String Name of the feature to fetch.
successCallback function Function to invoke if the exchange is successful.
errorCallback function Function to invoke if the exchange failed.

(static) start(connectionData, successCallback, errorCallback)

Starts the settings exchange.
Parameters:
Name Type Description
connectionData String This example below shows the structure of the connection data.
successCallback function Function to invoke if the exchange is successful.
errorCallback function Function to invoke if the exchange failed.
Example
connectionData = {
     "keyMAFLogonOperationContextConnectionData": {
     "keyMAFLogonConnectionDataApplicationSettings":
     {
     "DeviceType":device.platform,
     "DeviceModel":device.model,
     "ApplicationConnectionId":"yourappconnectionid"
     },
     "keyMAFLogonConnectionDataBaseURL":"servername:port"
 },
 "keyMAFLogonOperationContextApplicationId":"yourapplicationid",
 "keyMAFLogonOperationContextBackendUserName":"yourusername",
 "keyMAFLogonOperationContextBackendPassword":"password",
 "keyMAFLogonOperationContextSecurityConfig":"securityConfigName",
 "keySSLEnabled":keySSLEnabled
 };
sap.Settings.start(connectionData, function(mesg) {
                                   
                                        sap.Logger.debug("Setting Exchange is successful "+mesg,"SMP_SETTINGS_JS",function(m){},function(m){});
                                    },
                                   function(mesg){
                                       sap.Logger.debug("Setting Exchange failed" + mesg,"SMP_SETTINGS_JS",function(m){},function(m){});
                                   });
This function disable datalink. This function is called when the FVplugin is installed.
This function enable datalink. This function is called when the FVplugin is installed.

getWhiteList()

This function is used to get the whitelisted urls from the settings plugin. This function is used when we are trying to check if the url is allowed to reach the plugins or not.

invalidatePlugins()

This fuction can invalidate a list of optional plugins. This function is called when the user is trying to navigate from a whitelisted url to a non-whitelisted url.

validatePlugins()

This fuction can validate a list of optional plugins. This function is called when the user is trying to navigate from a non-whitelisted url to a whitelisted url.