DashboardPreferencesAPI.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Business Analytics (C) Copyright IBM Corp. 2019, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define([], function () {
  9. /**
  10. * @interface DashboardPreferencesAPI
  11. * @hideconstructor
  12. * @classdesc API class that is used to manage user preferences.
  13. * @example dashboard.getFeature('DashboardPreferences')
  14. */
  15. var DashboardPreferencesAPI = function () {
  16. function DashboardPreferencesAPI() {
  17. _classCallCheck(this, DashboardPreferencesAPI);
  18. }
  19. /**
  20. * @description Returns an attribute that was set in the preferences.
  21. * @param {string} name Name of the preference
  22. * @return {(string|boolean|number|null|undefined)} Value of the preference; null means the property will be removed when saved.
  23. */
  24. DashboardPreferencesAPI.prototype.getPreference = function getPreference() {};
  25. /**
  26. * @description Sets the preference.
  27. * @param {string} name Name of the preference
  28. * @param {(string|boolean|number|null)} value Value of the preference to set; exception is thrown when it is not one of these types.
  29. */
  30. DashboardPreferencesAPI.prototype.setPreference = function setPreference() {};
  31. /**
  32. * @description Saves the preferences.
  33. * @returns {Promise} Promise is rejected if the save did not complete successfully.
  34. */
  35. DashboardPreferencesAPI.prototype.savePreferences = function savePreferences() {};
  36. return DashboardPreferencesAPI;
  37. }();
  38. return DashboardPreferencesAPI;
  39. });
  40. //# sourceMappingURL=DashboardPreferencesAPI.js.map