Operation APIs
cv.api. operation
Constructor
Name | Description |
---|---|
new operation()
|
Operation definition for cv.api class. Contains all operation related api calls. |
Methods
Name | Description |
---|---|
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
|
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. |
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. |
Methods Details
- Since:
-
- 5.4
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. |
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'. |
Example
var successCallback = function() {alert("Success!");}; var errorCallback = function() {alert("Error!");}; cv.api.operation.clearCache(successCallback, errorCallback, true);
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
Example var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.clearDropTargetIndicator(dropTarget); |
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
Example var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.completeDrop(dropTarget); |
getDropTarget(x, y, formula) : JSON | 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
Example cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); |
- Since:
-
- 5.4
Example
cv.api.operation.redo();
redo()
|
---|
Reapplies events in the order they were removed or undone. |
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(); |
- Since:
-
- 5.4
Example
cv.api.operation.resetReport();
resetReport()
|
---|
Resets the state of the report back to the most recently saved state. |
- Since:
-
- 5.4
saveReport(name, path, successCallback, errorCallback, suppressSuccessNotification)
|
---|
Saves the report. |
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. |
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);
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
Example var dropTarget = cv.api.operation.getDropTarget(0, 0, "[MDX].[Formula]"); cv.api.operation.showDropTargetIndicator(dropTarget); |
- Since:
-
- 5.4
Example
cv.api.operation.undo();
undo()
|
---|
Removes events in the order they occurred. |