Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

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.

Source: javascript/scripts/cv_api_operation.js, line 28

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.

Source: javascript/scripts/cv_api_operation.js, line 316

Parameters:
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

Parameters:
Name Default Value Summary
dropTarget : 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);
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:
Name Default Value Summary
dropTarget : 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);
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

Parameters:
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

Returns:
Name Description
JSON | null

If no drop target is at the provided x and y coordinates, null is returned. Otherwise, the drop target is returned as a JSON

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.

Source: javascript/scripts/cv_api_operation.js, line 364

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.

Source: javascript/scripts/cv_api_operation.js, line 385

Since:
  • 5.4
saveReport(name, path, successCallback, errorCallback, suppressSuccessNotification)
 

Saves the report.

Source: javascript/scripts/cv_api_operation.js, line 408

Parameters:
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

Parameters:
Name Default Value Summary
dropTarget : 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);
Since:
  • 5.4

Example

cv.api.operation.undo();
undo()
 

Removes events in the order they occurred.

Source: javascript/scripts/cv_api_operation.js, line 343