public class Operation
extends java.lang.Object
Each of these operations will have relevant context available to be called in EPM Groovy scripts. For example, operation.grid will be available in the after load form and before/after form save operations but not in the before load form operation as the grid has not been created yet.
Modifier and Type | Method and Description |
---|---|
void |
exportDataToFile(DataGrid grid,
java.lang.String exportedDataFileName)
Exports the data in the specified data grid to a CSV file and uploads it
to the Outbox.
|
void |
exportDataToFile(DataGrid grid,
java.lang.String exportedDataFileName,
org.apache.commons.collections.Predicate predicate)
Exports the data in the specified data grid to a CSV file and uploads it
to the Outbox.
|
Application |
getApplication()
Returns the application on which the current operation is being performed.
|
Cube |
getCube()
Returns the cube against which this operation is being performed.
|
Rule |
getCurrentRule()
Returns the current rule being executed.
|
DataValueProvider |
getDataValueProvider()
Returns a data value provider for the current operation.
|
DataGrid |
getGrid()
Returns a representation of the current data entry form on which the
user is working.
|
User |
getUser()
Returns the user performing this operation.
|
boolean |
hasApplication()
Returns true if the application property is valid for this operation.
|
boolean |
hasCube()
Returns true if the cube property is valid for this operation.
|
boolean |
hasCurrentRule()
Returns true if the currentRule property is valid for this operation.
|
boolean |
hasDataValueProvider()
Returns true if a data value provider is available for the current
operation.
|
boolean |
hasGrid()
Returns true if the grid property is valid for this operation.
|
boolean |
hasUser()
Returns true if the user property is valid for this operation.
|
public void exportDataToFile(DataGrid grid, java.lang.String exportedDataFileName) throws java.lang.Exception
The file name is expected to be provided without any path. Supported types of extensions include .csv, .dat, .txt and .out. Extension will be defaulted to .csv if one is not specified.
grid
- data grid to export data fromexportedDataFileName
- name for the exported data filejava.lang.Exception
- if an unexpected fault occurspublic void exportDataToFile(DataGrid grid, java.lang.String exportedDataFileName, org.apache.commons.collections.Predicate predicate) throws java.lang.Exception
if a predicate is specified, then only the data cells that match the predicate conditions will be exported.
The file name is expected to be provided without any path. Supported types of extensions include .csv, .dat, .txt and .out. Extension will be defaulted to .csv if one is not specified.
grid
- data grid to export data fromexportedDataFileName
- name for the exported data filepredicate
- an optional predicatejava.lang.Exception
- if an unexpected fault occurspublic Application getApplication()
public Cube getCube()
public Rule getCurrentRule()
public DataValueProvider getDataValueProvider()
You can use a data value provider to iterate over cell intersections that have been changed by the current operation in a consistent way regardless of the operation.
public DataGrid getGrid()
This grid can be used to access metadata for the POV/Row/Column header cells as well as the data cells.
public User getUser()
public boolean hasApplication()
public boolean hasCube()
public boolean hasCurrentRule()
public boolean hasDataValueProvider()
public boolean hasGrid()
public boolean hasUser()
Copyright © 2017, 2024, Oracle and/or its affiliates. All rights reserved.