ContentInfoAPI.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class ContentInfoAPI
  10. * @hideconstructor
  11. * @classdesc API class that is used to return widget serviceability information
  12. */
  13. define([], function () {
  14. var ContentInfoAPI = function () {
  15. function ContentInfoAPI() {
  16. _classCallCheck(this, ContentInfoAPI);
  17. }
  18. /**
  19. * @public
  20. * @function ContentInfoAPI#getId
  21. * @description get widget ID
  22. */
  23. ContentInfoAPI.prototype.getId = function getId() {};
  24. /**
  25. * @public
  26. * @function ContentInfoAPI#getType
  27. * @description Get widget type
  28. * @returns {string} type of the content
  29. */
  30. ContentInfoAPI.prototype.getType = function getType() {};
  31. /**
  32. * @public
  33. * @function ContentInfoAPI#getVisTypeLabel
  34. * @description retrieves the visualization type label
  35. * @returns {string} the label for the visualization type
  36. */
  37. ContentInfoAPI.prototype.getVisTypeLabel = function getVisTypeLabel() {};
  38. /**
  39. * @public
  40. * @function ContentInfoAPI#setData
  41. * @description set a custom data property
  42. * @param {string} key - data key; must be a string; logs an error when it is not
  43. * @param {Object} value - data value; can have a toJson method used when generating the spec
  44. * @returns undefined
  45. */
  46. ContentInfoAPI.prototype.setData = function setData() {};
  47. /**
  48. * @public
  49. * @function ContentInfoAPI#getData
  50. * @description Get the value stored with passed key
  51. * @param {string} key - data key
  52. * @returns the associated data or underfined if not found or key is invalid
  53. */
  54. ContentInfoAPI.prototype.getData = function getData() {};
  55. /**
  56. * @public
  57. * @function ContentInfoAPI#getSpec
  58. * @description Get widgetInfo spec
  59. * @returns {Object} json object representing the s12y info
  60. */
  61. ContentInfoAPI.prototype.getSpec = function getSpec() {};
  62. /**
  63. * @public
  64. * @function ContentInfoAPI#toUIJSON
  65. * @description Get a json which defines the UI. The json will be consumed by ServiceabilityContent
  66. * class where the required structure of the json is explained. This method will try to call each
  67. * "toUIJSON" for each data. The "toUIJSON" of each data shoule return an array of sections.
  68. * @returns {Array} json object
  69. */
  70. ContentInfoAPI.prototype.toUIJSON = function toUIJSON() {};
  71. return ContentInfoAPI;
  72. }();
  73. return ContentInfoAPI;
  74. });
  75. //# sourceMappingURL=ContentInfoAPI.js.map