| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 | <!DOCTYPE html><html lang="en"><head>    <meta charset="utf-8">    <title>JSDoc: Source: api/sharing/ShareInterface.js</title>    <script src="scripts/prettify/prettify.js"> </script>    <script src="scripts/prettify/lang-css.js"> </script>    <!--[if lt IE 9]>      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>    <![endif]-->    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"></head><body><div id="main">    <h1 class="page-title">Source: api/sharing/ShareInterface.js</h1>            <section>        <article>            <pre class="prettyprint source linenums"><code>/** * Licensed Materials - Property of IBM * IBM Cognos Products: Collaboration * (C) Copyright IBM Corp. 2018, 2019 * * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. */define([], function () {	'use strict';	/**	 * This class provides a means to declare a share and embed controller.	 * It plays the role of an interface, consumer can implement it.	 * e.g.	 * @example	 * {	 *   "id": "com.ibm.bi.dashboard.shareAndEmbed",	 *   "collectionItems": [{	 *     "containerId": "com.ibm.bi.glass.common.sharedResources",	 *     "id": "dashboard",	 *     "label": "Share & Embed",	 *     "types": ["exploration"],	 *     "perspectives": ["dashboard"],	 *     "actionController": "dashboard/glass/controllers/ShareActionHandler"	 *   }]	 * }	 * @public	 * @interface ShareInterface	 */	var ShareInterface = function () {		/**		 * Called when the custom button/menu item is Clicked/Tapped		 *		 * @memberof ShareInterface		 * @public		 * @param {Object} context		 * @returns {Object} urlMap object containing an object like:		 * @example		 * {		 *   "perspective": "dashboard",		 *   "objRef": "i047E166063164D5DA85C8872A4574513",		 *   "action":"view",		 *   "mode":"dashboard"		 * }		 */		this.execute = function (context) {			void (context);		};		/**		 * Called to decide if the Sharing entry should be shown or not.		 * 		 * @memberof ShareInterface		 * @public		 * @param {Object} context 		 * @returns {Boolean} true/false		 */		this.isVisible = function (context) {			void (context);		};		/**		 * Returns an array of DOM elements to be capture for a screenshot.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} context		 * @return {Promise} An array of objects like: <code>[{"el":domNode,"label":"text"}]</code>		 */		this.getShareableItems = function (context) {			void (context);		};		/**		 * Returns information about the current asset.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} context		 * @return {Promise} An object like: <code>[{"type":"dashboard","title":"Dashboard Name","subTitle":"Dashboard Tab 1","owner":"Sam Carter","saved":true}]</code>		 */		this.getShareableInfo = function (context) {			void (context);		};		/**		 * Tells the controller that the Share panel is about to be shown.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} options		 * @param {object} options.glassContext		 * @param {object} options.slideout		 * @return {Promise}		 */		this.enterShareState = function (options) {			void (options);		};		/**		 * Tells the controller that the Share panel is about to be closed.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} options		 * @param {object} options.glassContext		 * @param {object} options.slideout		 * @return {Promise}		 */		this.leaveShareState = function (options) {			void (options);		};		/**		 * Asks the controller if it supports exporting to PDF. If this method		 * is not implemented, the default response will be `false`.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} options		 * @param {object} options.glassContext		 * @return {Boolean}		 */		this.canExportToPDF = function (options) {			void (options);		};		/**		 * Tells the controller to generate a PDF file. This will only be called		 * if the canExportToPDF function returns true.		 * 		 * @memberof ShareInterface		 * @public		 * @param {object} options		 * @param {object} options.glassContext		 * @param {object} pageSize an object representing the size of the page		 * @param {object} printFilters print filters		 * @return {Promise}		 */		this.exportToPDF = function (options, pageSize, printFilters) {			void (options, pageSize, printFilters);		};		/**		* Asks the action controller for its instrumentation data. The `action` will		* be set as `shared` by collaboration when invoking the instrumentation's		* track() method.		*		* @memberof ShareInterface		* @public		* @param {object} options		* @param {object} options.glassContext		* @return {object} instrumentation object data		* @example		* {		*   "objectId": "some_id",		*   "objectType": "type",		*   "details": {		*    ...		*   }		* }		*/		this.getInstrumentation = function (options) {			void (options);		};	};	return ShareInterface;});</code></pre>        </article>    </section></div><nav>    <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></nav><br class="clear"><footer>    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)</footer><script> prettyPrint(); </script><script src="scripts/linenumber.js"> </script></body></html>
 |