Interface FunctionOperations
public interface FunctionOperations
Provides operations for executing functions in the add-on.
Implementations of this interface allow execution of a function identified by its code within a specified asset context.
Typical usage involves passing a function code and an AssetContextAdapter representing
the context (such as dataspace, dataset, table, field, or workflow) in which the function should execute.
Example usage:
// Obtain FunctionOperations from OperationsFactory
FunctionOperations ops = OperationsFactory.getInstance().getFunctionOperations(session);
// Create an asset context for a table
AssetContextAdapter context = AssetContextAdapter.onTable(table);
// Execute a function by code
FunctionResult result = ops.execute("myFunctionCode", context);
-
Method Summary
Modifier and TypeMethodDescriptionexecute(String functionCode, AssetContextAdapter context) Executes a function identified by its code within the specified asset context.
-
Method Details
-
execute
FunctionResult execute(String functionCode, AssetContextAdapter context) throws IllegalArgumentException, DPRAException Executes a function identified by its code within the specified asset context.- Parameters:
functionCode- the code identifying the function to execute (must not be null)context- theAssetContextAdapterspecifying where the function executes (must not be null and valid for the code)- Returns:
- the result of the function execution (never null on success)
- Throws:
IllegalArgumentException- iffunctionCodeis null, unrecognized, or the context is invalid for the functionDPRAException- if a permission check fails or an internal execution/configuration error occurs
-