common.js

1       if (typeof(SAP) == 'undefined') SAP = {};
2       
3       /**
4        * @class
5        * SAP Util
6        *
7        * @author SAP AG 
8        * @version 1.0
9        *
10       * @public
11       * @name sap.Util
12       */
13      SAP.Util = {
14      /**
15       * Set style for a control
16       *
17       * @param {object} [control] The control is to set style
18       * @param {string} [style] The style is to be set
19       * @public
20       * @static
21       * @name sap.Util#setStyle
22        * @function
23       */
24      	setStyle: function(control, style) {
25      		if(control instanceof sap.ui.core.Control) {
26      			control.data("style", style);
27      		}
28      	}
29      };
30      
31      /**
32       * @class
33       * SAP DataSources APIs
34       *
35       * @author SAP AG 
36       * @version 1.0
37       *
38       * @public
39       * @name sap.DataSourceAPI
40       */
41      SAP.DataSourceAPI = {
42      /**
43       * Set the application logon context for accesing oData servicesfrom SMP server. This context is from SMP Kapsel logon manager.
44       *
45       * @param {string} [smpLogonApplicationContext] Application login context. This context should be the returned result from the Kapsel logon manager.
46       * @public
47       * @static
48       * @name sap.DataSourceAPI#setLogonApplicationContext
49       * @function
50       */
51      setLogonApplicationContext: function (smpLogonApplicationContext) {
52      },
53      
54      /**
55       * Change the specified datasource’s user name, password, and root URL information
56       *
57       * @param {string} [dataSourceName] The datasource's name for example "ODataService.EmployeeDB", it can’t be the table source name
58       * @param {string} [user] The new user name ,if you don’t want to change the user name, you can set it to undefined
59       * @param {string} [password] The new password, if you don’t want to change the password, you can set it to undefined
60       * @param {string} [url] The new root URL for the data source, if you don’t want to change the root URL, you can set it to undefined
61       * @public
62       * @static
63       * @name sap.DataSourceAPI#setDataSourceInfo
64       * @function
65       */
66      	setDataSourceInfo: function(dataSourceName, user, password, url) {
67      	},
68      	
69      /**
70       * Change the current SMP Server Profile
71       *
72       * @param {string} [SMPServer]  The new SMP Server to use. If you don’t want to change it, you can set it to undefined
73       * @param {string} [SMPApplicationID] The new SMP ApplicationID. If you don’t want to change it, you can set it to undefined
74       * @param {string} [SMPApplicationTag] The new SMP ApplicationTag. If you don’t want to change it, you can set it to undefined
75       * @param {bool} [allowAnonymous] You can set it to true if the server allows anonymous access, otherwise, set it false. If you don’t want to change it, you can set it to undefined
76       * @param {string} [user] The new user name. If you don’t want to change it, you can set it to undefined
77       * @param {string} [password] The new password. If you don’t want to change it, you can set it to undefined
78       * @param {string} [connectionID] The the conection ID to be used. If you want to clear the old connection ID, you can set it to empty string ("").
79       * @public
80       * @static
81       * @name sap.DataSourceAPI#setSMPServerProfile
82       * @function
83       */
84      	setSMPServerProfile : function(SMPServer,SMPApplicationID,SMPApplicationTag,allowAnonymous,user,password) {
85      	},
86      
87      /**
88       * Encrypt the specified password and return the encrypted password
89       *
90       * @param {string} [password] The password that is going to be encrypted
91       * @public
92       * @static
93       * @name sap.DataSourceAPI#encryptPassword
94       * @function
95       */
96      	encryptPassword: function(password) {
97      	},
98      
99      /**
100      * Decrypt the specified password and return the decrypted password
101      *
102      * @param {string} [password] The password that is going to be decrypted
103      * @public
104      * @static
105      * @name sap.DataSourceAPI#decryptPassword
106      * @function
107      */
108     	decryptPassword: function(password) {
109     	}	
110     };
111