Operation APIs
The operation system definition for cv.api
class (cv.api.operation
). Contains all operation related API calls.
Constructor
new operation()
Operation definition for cv.api
class. Contains all operation related API calls.
Methods
clearCache(successCallback, errorCallback, suppressSuccessNotification)
Clears the entire cache associated with the current data source, including Analyzer's metadata cache, the Mondrian schema cache, and the Mondrian segment cache.
clearDropTargetIndicator(dropTarget)
Clears a drop target indicator, provided there is a drop target. This can only be seen if an indicator has been shown previously for the given drop target.
completeDrop(dropTarget)
Completes the drop, provided there is a drop target. The result of this drop depends on the drop target and what custom drop action is bound to the specified drop target.
`getDropTarget(x, y, formula) : JSON
null`
redo()
Reapplies events in the order they were removed or undone.
refreshReport()
Refreshes the report, showing any changes made to the report.
resetReport()
Resets the state of the report back to the most recently saved state.
saveReport(name, path, successCallback, errorCallback, suppressSuccessNotification)
Saves the report.
showDropTargetIndicator(dropTarget)
Shows the drop target indicator, provided there is a drop target. Depending on the portion of the screen where the drop is occurring, the drop indicator may look different or move.
undo()
Removes events in the order they occurred.
Constructor Details
new operation()
Operation definition for cv.api
class. Contains all operation related API calls.
Source
## Methods Details
clearCache(successCallback, errorCallback, suppressSuccessNotification)
Clears the entire cache associated with the current data source, including Analyzer's metadata cache, the Mondrian schema cache, and the Mondrian segment cache.
Since
5.4
Source
javascript/scripts/cv_api_operation.js, line 316
Parameters
NameDefault ValueSummarysuccessCallback : function
The optional function which is executed when the report has been successfully saved.
errorCallback : function
The optional function which is executed when an exception is thrown when saving the report.
suppressSuccessNotification : boolean
The optional parameter which controls the display of the default success notification. By default, it is set to 'false'.
Example
var successCallback = function() {alert("Success!");}; var errorCallback = function() {alert("Error!");}; cv.api.operation.clearCache(successCallback, errorCallback, true);
```
Name
Default Value
Summary
successCallback : function
The optional function which is executed when the report has been successfully saved.
errorCallback : function
The optional function which is executed when an exception is thrown when saving the report.
suppressSuccessNotification : boolean
The optional parameter which controls the display of the default success notification. By default, it is set to 'false'.
clearDropTargetIndicator(dropTarget)
Clears a drop target indicator, provided there is a drop target. This can only be seen if an indicator has been shown previously for the given drop target.
Source
javascript/scripts/cv_api_operation.js, line 298
Parameters
NameDefault ValueSummarydropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
Example
var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.clearDropTargetIndicator(dropTarget);
```
Name
Default Value
Summary
dropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
completeDrop(dropTarget)
Completes the drop, provided there is a drop target. The result of this drop depends on the drop target and what custom drop action is bound to the specified drop target.
Source
javascript/scripts/cv_api_operation.js, line 262
Parameters
NameDefault ValueSummarydropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
Example
var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.completeDrop(dropTarget);
```
Name
Default Value
Summary
dropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
getDropTarget(x, y, formula) : [JSON](http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON)
| [null](http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null)
Retrieves the drop target, depending on the x and y coordinates provided. The x and y coordinates are relative to the frame in which analyzer is loaded, and not the parent frame. Any x and y coordinates from a parent window's mouse position needs to be translated such that (0, 0) is the top left corner of the frame.
Source
javascript/scripts/cv_api_operation.js, line 67
Parameters
NameDefault ValueSummaryx : integer
The x coordinate.
y : integer
The y coordinate.
formula : string
The MDX of the object which the user would want to drop onto Analyzer.
Returns
NameDescription`JSON
null`
Example
cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]");
```
Name
Default Value
Summary
x : integer
The x coordinate.
y : integer
The y coordinate.
formula : string
The MDX of the object which the user would want to drop onto Analyzer.
Name
Description
`JSON
null`
redo()
Reapplies events in the order they were removed or undone.
Since
5.4
Source
javascript/scripts/cv_api_operation.js, line 364
Example
cv.api.operation.redo();
```
refreshReport()
Refreshes the report, showing any changes made to the report.
Source
javascript/scripts/cv_api_operation.js, line 47
Example
cv.api.operation.refreshReport();
```
resetReport()
Resets the state of the report back to the most recently saved state.
Since
5.4
Source
javascript/scripts/cv_api_operation.js, line 385
Example
cv.api.operation.resetReport();
```
saveReport(name, path, successCallback, errorCallback, suppressSuccessNotification)
Saves the report.
Since:
5.4
Source
javascript/scripts/cv_api_operation.js, line 408
Parameters
NameDefault ValueSummaryname : string
The name of the report without extension.
path : string
The existing path of the repository to store the report without the report's name.
successCallback : function
The optional function that is executed when the report has been successfully saved.
errorCallback : function
The optional function that is executed when an exception was thrown during the saving of the report.
suppressSuccessNotification : boolean
The optional parameter to control displaying the default success notification. By default it's false.
Example
var name = "Test name of report"; var path = "/public/my_test";
var successCallback = function() {alert("Success!");}; var errorCallback = function() {alert("Error!");};
cv.api.operation.saveReport(name, path, successCallback, errorCallback, true);
```
Name
Default Value
Summary
name : string
The name of the report without extension.
path : string
The existing path of the repository to store the report without the report's name.
successCallback : function
The optional function that is executed when the report has been successfully saved.
errorCallback : function
The optional function that is executed when an exception was thrown during the saving of the report.
suppressSuccessNotification : boolean
The optional parameter to control displaying the default success notification. By default it's false.
showDropTargetIndicator(dropTarget)
Shows the drop target indicator, provided there is a drop target. Depending on the portion of the screen where the drop is occurring, the drop indicator may look different or move.
Source
javascript/scripts/cv_api_operation.js, line 280
Parameters
NameDefault ValueSummarydropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
Example
var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.showDropTargetIndicator(dropTarget);
```
Name
Default Value
Summary
dropTarget : JSON
The drop target, which represents the location upon which the user will drop a draggable object.
undo()
Removes events in the order they occurred.
Since:
5.4
Source
javascript/scripts/cv_api_operation.js, line 343
Example
cv.api.operation.undo(); ```
Last updated
Was this helpful?