VisDefinitionsAPI.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class VisDefinitionsAPI
  10. * @hideconstructor
  11. * @classdesc Represents the API to access the visualization definitions that are registered in the dashboard application.
  12. */
  13. define([], function () {
  14. var VisDefinitionsAPI = function () {
  15. function VisDefinitionsAPI() {
  16. _classCallCheck(this, VisDefinitionsAPI);
  17. }
  18. /**
  19. * @function VisDefinitionsAPI#getList
  20. * @description Return a list of visualization definitions.
  21. * @public
  22. *
  23. * @return {VisDefinitionAPI[]}
  24. *
  25. */
  26. VisDefinitionsAPI.prototype.getList = function getList() {};
  27. /**
  28. * @function VisDefinitionsAPI#getById
  29. * @description Return a list of visualization definitions.
  30. * @public
  31. *
  32. * @param {String} id
  33. * @return {VisDefinitionAPI}
  34. *
  35. */
  36. VisDefinitionsAPI.prototype.getById = function getById() /* id */{};
  37. /**
  38. * @function VisDefinitionsAPI#getByType
  39. * @description Return a list of visualization definitions.
  40. * @public
  41. *
  42. * @param {String} type
  43. * @return {VisDefinitionAPI}
  44. *
  45. */
  46. VisDefinitionsAPI.prototype.getByType = function getByType() /* type */{};
  47. /**
  48. * @function VisDefinitionsAPI#refresh
  49. * @description Refresh definitions
  50. * @public
  51. *
  52. * @return {Promise<undefined>}
  53. */
  54. VisDefinitionsAPI.prototype.refresh = function refresh() {};
  55. /**
  56. * @function VisDefinitionsAPI#loadById
  57. * @description Loads a specific definition by ID
  58. * @public
  59. *
  60. * @return {Promise<undefined>}
  61. */
  62. VisDefinitionsAPI.prototype.loadById = function loadById() /* id */{};
  63. /**
  64. * @function VisDefinitionsAPI#on
  65. * @description Register an event handler for the visualization definitions
  66. * @param {String} eventName Name of the feature event
  67. * @param {function} handler Event handler to be called when the event occurrs.
  68. * @param {object} context Context of the event
  69. * Multiple handlers can be registered with the same <strong>eventName</strong>.
  70. * Each handlers needs to be registered and unregistered individually.
  71. */
  72. VisDefinitionsAPI.prototype.on = function on() {};
  73. /**
  74. * @function VisDefinitionsAPI#off
  75. * @description Unregister an event handler that was registered with {@link VisDefinitionsAPI#on}
  76. * @param {String} eventName Name of the feature event
  77. * @param {function} handler Event handler to be called when the event occurrs
  78. * @param {object} context Context of the event
  79. */
  80. VisDefinitionsAPI.prototype.off = function off() {};
  81. /**
  82. * @function VisDefinitionsAPI#registerModifier
  83. * @description Register a modifier object that can be used to extend the vis definitions
  84. * @param {VisDefinitionModifier} modifier
  85. */
  86. VisDefinitionsAPI.prototype.registerModifier = function registerModifier() {};
  87. /**
  88. * @function VisDefinitionsAPI#deregisterModifier
  89. * @description Deregister a previously registered definition modifier
  90. * @param {VisDefinitionModifier} modifier
  91. */
  92. VisDefinitionsAPI.prototype.deregisterModifier = function deregisterModifier() {};
  93. return VisDefinitionsAPI;
  94. }();
  95. return VisDefinitionsAPI;
  96. });
  97. //# sourceMappingURL=VisDefinitionsAPI.js.map