InternalAPI.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. 2018, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class InternalAPI
  10. * @hideconstructor
  11. * @classdesc Internal API class that is used to control a dashboard instance behaviour
  12. */
  13. define([], function () {
  14. var InternalAPI = function () {
  15. function InternalAPI() {
  16. _classCallCheck(this, InternalAPI);
  17. }
  18. /**
  19. * @function InternalAPI#reloadFromJSONSpec
  20. * @description Reload the dashboard with the given dashboard spec
  21. * @param {object} spec the new dashboard spec to load
  22. * @param {object} [options] reload options
  23. * @param {boolean} [options.isAuthoringMode] true to reload the dashboard in authoring mode, otherwise false
  24. * @param {boolean} [options.clearDirtyFlag] true to mark dashboard as clean, otherwise false
  25. */
  26. InternalAPI.prototype.reloadFromJSONSpec = function reloadFromJSONSpec() {};
  27. /**
  28. * @function InternalAPI#getWidgetRegistry
  29. * @description Get the widget registry
  30. * @return {object} Collection of entries from the widget registry
  31. * @example
  32. {
  33. widget-identifier: {
  34. id: 'widget unique identifier',
  35. label: 'widget display label',
  36. builtin: true if widget is an builtin widget otherwise false,
  37. modelClassPath: 'path of the widget model class',
  38. widget: 'path of the widget class',
  39. layoutConsumeView: 'path of the widget layout consumption view class',
  40. layoutAuthoringView: 'path of the widget layout authoring view class',
  41. disableTitle: true if widget title is not supported, otherwise false,
  42. createContentNode: true if widget requires a separate div to separate the widget content,
  43. enableSmarts: true, // need to revise
  44. ownTitle: false // need to revise
  45. },
  46. ...
  47. }
  48. */
  49. InternalAPI.prototype.getWidgetRegistry = function getWidgetRegistry() {};
  50. /**
  51. * @function InternalAPI#getDashboardInfo
  52. * @description Get the dashboard internal information
  53. * @return {object} collection of dashboard information
  54. * @example
  55. {
  56. boardId: 'CM object identifier of the dashboard',
  57. searchPath: 'CM object search path',
  58. type': 'exploration',
  59. isDirty: true if the dashboard model has changed otherwise false
  60. }
  61. */
  62. InternalAPI.prototype.getDashboardInfo = function getDashboardInfo() {};
  63. /**
  64. * @function InternalAPI#prepareGlassOptions
  65. * @description Modify the given option object to be consumable by Glass
  66. * @param {object} option option object
  67. * @return {object} option object consumable by Glass
  68. */
  69. InternalAPI.prototype.prepareGlassOptions = function prepareGlassOptions() {};
  70. /**
  71. * @function InternalAPI#getCDNUrl
  72. * @description Get the dashboard internal CDN root path
  73. * @return dashboard internal CDN root path
  74. */
  75. InternalAPI.prototype.getCDNUrl = function getCDNUrl() {};
  76. /**
  77. * @function InternalAPI#isDevInstall
  78. * @description Determine whether the dashboard is currently running in development mode
  79. * @return true if dashboard is currently in development mode, otherwise false
  80. */
  81. InternalAPI.prototype.isDevInstall = function isDevInstall() {};
  82. /**
  83. * @function InternalAPI#registerDashboardSvc
  84. * @description Register a new service to dashboard
  85. * @param {object} service new service to register to dashboard
  86. */
  87. InternalAPI.prototype.registerDashboardSvc = function registerDashboardSvc() {};
  88. /**
  89. * @function InternalAPI#setPermissions
  90. * @description Set the CM object permisssion to the dashboard
  91. * @param {object} permission CM object permission response
  92. */
  93. InternalAPI.prototype.setPermissions = function setPermissions() {};
  94. /**
  95. * @function InternalAPI#destroy
  96. * @description destroys the dashboard
  97. */
  98. InternalAPI.prototype.destroy = function destroy() {};
  99. return InternalAPI;
  100. }();
  101. return InternalAPI;
  102. });
  103. //# sourceMappingURL=InternalAPI.js.map