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.
- Source:
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"
}]
}
Methods
(static) this.canExportToPDF(options) → {Boolean}
Asks the controller if it supports exporting to PDF. If this method
is not implemented, the default response will be `false`.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- Source:
Returns:
- Type
- Boolean
(static) this.enterShareState(options) → {Promise}
Tells the controller that the Share panel is about to be shown.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- Source:
Returns:
- Type
- Promise
(static) this.execute(context) → {Object}
Called when the custom button/menu item is Clicked/Tapped
Parameters:
Name | Type | Description |
---|---|---|
context |
Object |
- Source:
Returns:
urlMap object containing an object like:
- Type
- Object
Example
{
"perspective": "dashboard",
"objRef": "i047E166063164D5DA85C8872A4574513",
"action":"view",
"mode":"dashboard"
}
(static) this.exportToPDF(options, pageSize, printFilters) → {Promise}
Tells the controller to generate a PDF file. This will only be called
if the canExportToPDF function returns true.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
||||||
pageSize |
object | an object representing the size of the page | ||||||
printFilters |
object | print filters |
- Source:
Returns:
- Type
- Promise
(static) this.getInstrumentation(options) → {object}
Asks the action controller for its instrumentation data. The `action` will
be set as `shared` by collaboration when invoking the instrumentation's
track() method.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- Source:
Returns:
instrumentation object data
- Type
- object
Example
{
"objectId": "some_id",
"objectType": "type",
"details": {
...
}
}
(static) this.getShareableInfo(context) → {Promise}
Returns information about the current asset.
Parameters:
Name | Type | Description |
---|---|---|
context |
object |
- Source:
Returns:
An object like:
[{"type":"dashboard","title":"Dashboard Name","subTitle":"Dashboard Tab 1","owner":"Sam Carter","saved":true}]
- Type
- Promise
(static) this.getShareableItems(context) → {Promise}
Returns an array of DOM elements to be capture for a screenshot.
Parameters:
Name | Type | Description |
---|---|---|
context |
object |
- Source:
Returns:
An array of objects like:
[{"el":domNode,"label":"text"}]
- Type
- Promise
(static) this.isVisible(context) → {Boolean}
Called to decide if the Sharing entry should be shown or not.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object |
- Source:
Returns:
true/false
- Type
- Boolean
(static) this.leaveShareState(options) → {Promise}
Tells the controller that the Share panel is about to be closed.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- Source:
Returns:
- Type
- Promise