api_sharing_ShareInterface.js.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Source: api/sharing/ShareInterface.js</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Source: api/sharing/ShareInterface.js</h1>
  17. <section>
  18. <article>
  19. <pre class="prettyprint source linenums"><code>/**
  20. * Licensed Materials - Property of IBM
  21. * IBM Cognos Products: Collaboration
  22. * (C) Copyright IBM Corp. 2018, 2019
  23. *
  24. * US Government Users Restricted Rights - Use, duplication or disclosure
  25. * restricted by GSA ADP Schedule Contract with IBM Corp.
  26. */
  27. define([], function () {
  28. 'use strict';
  29. /**
  30. * This class provides a means to declare a share and embed controller.
  31. * It plays the role of an interface, consumer can implement it.
  32. * e.g.
  33. * @example
  34. * {
  35. * "id": "com.ibm.bi.dashboard.shareAndEmbed",
  36. * "collectionItems": [{
  37. * "containerId": "com.ibm.bi.glass.common.sharedResources",
  38. * "id": "dashboard",
  39. * "label": "Share &amp; Embed",
  40. * "types": ["exploration"],
  41. * "perspectives": ["dashboard"],
  42. * "actionController": "dashboard/glass/controllers/ShareActionHandler"
  43. * }]
  44. * }
  45. * @public
  46. * @interface ShareInterface
  47. */
  48. var ShareInterface = function () {
  49. /**
  50. * Called when the custom button/menu item is Clicked/Tapped
  51. *
  52. * @memberof ShareInterface
  53. * @public
  54. * @param {Object} context
  55. * @returns {Object} urlMap object containing an object like:
  56. * @example
  57. * {
  58. * "perspective": "dashboard",
  59. * "objRef": "i047E166063164D5DA85C8872A4574513",
  60. * "action":"view",
  61. * "mode":"dashboard"
  62. * }
  63. */
  64. this.execute = function (context) {
  65. void (context);
  66. };
  67. /**
  68. * Called to decide if the Sharing entry should be shown or not.
  69. *
  70. * @memberof ShareInterface
  71. * @public
  72. * @param {Object} context
  73. * @returns {Boolean} true/false
  74. */
  75. this.isVisible = function (context) {
  76. void (context);
  77. };
  78. /**
  79. * Returns an array of DOM elements to be capture for a screenshot.
  80. *
  81. * @memberof ShareInterface
  82. * @public
  83. * @param {object} context
  84. * @return {Promise} An array of objects like: &lt;code>[{"el":domNode,"label":"text"}]&lt;/code>
  85. */
  86. this.getShareableItems = function (context) {
  87. void (context);
  88. };
  89. /**
  90. * Returns information about the current asset.
  91. *
  92. * @memberof ShareInterface
  93. * @public
  94. * @param {object} context
  95. * @return {Promise} An object like: &lt;code>[{"type":"dashboard","title":"Dashboard Name","subTitle":"Dashboard Tab 1","owner":"Sam Carter","saved":true}]&lt;/code>
  96. */
  97. this.getShareableInfo = function (context) {
  98. void (context);
  99. };
  100. /**
  101. * Tells the controller that the Share panel is about to be shown.
  102. *
  103. * @memberof ShareInterface
  104. * @public
  105. * @param {object} options
  106. * @param {object} options.glassContext
  107. * @param {object} options.slideout
  108. * @return {Promise}
  109. */
  110. this.enterShareState = function (options) {
  111. void (options);
  112. };
  113. /**
  114. * Tells the controller that the Share panel is about to be closed.
  115. *
  116. * @memberof ShareInterface
  117. * @public
  118. * @param {object} options
  119. * @param {object} options.glassContext
  120. * @param {object} options.slideout
  121. * @return {Promise}
  122. */
  123. this.leaveShareState = function (options) {
  124. void (options);
  125. };
  126. /**
  127. * Asks the controller if it supports exporting to PDF. If this method
  128. * is not implemented, the default response will be `false`.
  129. *
  130. * @memberof ShareInterface
  131. * @public
  132. * @param {object} options
  133. * @param {object} options.glassContext
  134. * @return {Boolean}
  135. */
  136. this.canExportToPDF = function (options) {
  137. void (options);
  138. };
  139. /**
  140. * Tells the controller to generate a PDF file. This will only be called
  141. * if the canExportToPDF function returns true.
  142. *
  143. * @memberof ShareInterface
  144. * @public
  145. * @param {object} options
  146. * @param {object} options.glassContext
  147. * @param {object} pageSize an object representing the size of the page
  148. * @param {object} printFilters print filters
  149. * @return {Promise}
  150. */
  151. this.exportToPDF = function (options, pageSize, printFilters) {
  152. void (options, pageSize, printFilters);
  153. };
  154. /**
  155. * Asks the action controller for its instrumentation data. The `action` will
  156. * be set as `shared` by collaboration when invoking the instrumentation's
  157. * track() method.
  158. *
  159. * @memberof ShareInterface
  160. * @public
  161. * @param {object} options
  162. * @param {object} options.glassContext
  163. * @return {object} instrumentation object data
  164. * @example
  165. * {
  166. * "objectId": "some_id",
  167. * "objectType": "type",
  168. * "details": {
  169. * ...
  170. * }
  171. * }
  172. */
  173. this.getInstrumentation = function (options) {
  174. void (options);
  175. };
  176. };
  177. return ShareInterface;
  178. });</code></pre>
  179. </article>
  180. </section>
  181. </div>
  182. <nav>
  183. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorBase.html">ConnectorBase</a></li><li><a href="Connectors.html">Connectors</a></li><li><a href="EmailClient.html">EmailClient</a></li><li><a href="EmailConnector.html">EmailConnector</a></li><li><a href="MSTeamsAuth.html">MSTeamsAuth</a></li><li><a href="MSTeamsClient.html">MSTeamsClient</a></li><li><a href="MSTeamsConnector.html">MSTeamsConnector</a></li><li><a href="ShareableItems.html">ShareableItems</a></li><li><a href="ShareController.html">ShareController</a></li><li><a href="ShareView.html">ShareView</a></li><li><a href="SlackAuth.html">SlackAuth</a></li><li><a href="SlackClient.html">SlackClient</a></li><li><a href="SlackConnector.html">SlackConnector</a></li></ul><h3>Interfaces</h3><ul><li><a href="ShareInterface.html">ShareInterface</a></li></ul>
  184. </nav>
  185. <br class="clear">
  186. <footer>
  187. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed May 25 2022 13:54:53 GMT+0000 (UTC)
  188. </footer>
  189. <script> prettyPrint(); </script>
  190. <script src="scripts/linenumber.js"> </script>
  191. </body>
  192. </html>