Class ScriptingExpressionEvaluator
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator
-
@Component public class ScriptingExpressionEvaluator extends Object
Main entry point for evaluating scripting expressions.- Author:
- mederly
-
-
Constructor Summary
Constructors Constructor Description ScriptingExpressionEvaluator()
-
Method Summary
-
-
-
Method Detail
-
createExecuteScriptCommand
public static ExecuteScriptType createExecuteScriptCommand(ScriptingExpressionType expression)
-
evaluateExpressionInBackground
public void evaluateExpressionInBackground(ScriptingExpressionType expression, Task task, OperationResult parentResult) throws SchemaException
Asynchronously executes any scripting expression.- Parameters:
expression
- Expression to be executed.task
- Task in context of which the script should execute. The task should be "clean", i.e. (1) transient, (2) without any handler. This method puts the task into background, and assigns ScriptExecutionTaskHandler to it, to execute the script.- Throws:
SchemaException
-
evaluateExpressionInBackground
public void evaluateExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult) throws SchemaException
- Throws:
SchemaException
-
evaluateIterativeExpressionInBackground
public void evaluateIterativeExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult) throws SchemaException
Asynchronously executes any scripting expression.- Parameters:
executeScriptCommand
- ExecuteScript to be executed.task
- Task in context of which the script should execute. The task should be "clean", i.e. (1) transient, (2) without any handler. This method puts the task into background, and assigns IterativeScriptExecutionTaskHandler to it, to execute the script.- Throws:
SchemaException
-
evaluateExpression
public ExecutionContext evaluateExpression(@NotNull @NotNull ExecuteScriptType executeScript, VariablesMap initialVariables, boolean recordProgressAndIterationStatistics, Task task, OperationResult result) throws ScriptExecutionException
Main entry point.- Throws:
ScriptExecutionException
-
evaluateExpressionPrivileged
public ExecutionContext evaluateExpressionPrivileged(@NotNull @NotNull ExecuteScriptType executeScript, @NotNull @NotNull VariablesMap initialVariables, Task task, OperationResult result) throws ScriptExecutionException
Entry point for privileged execution. Note that privileged execution means- Throws:
ScriptExecutionException
-
evaluateExpression
public ExecutionContext evaluateExpression(ScriptingExpressionType expression, Task task, OperationResult result) throws ScriptExecutionException
Convenience method (if we don't have full ExecuteScriptType).- Throws:
ScriptExecutionException
-
evaluateExpression
public PipelineData evaluateExpression(javax.xml.bind.JAXBElement<? extends ScriptingExpressionType> expression, PipelineData input, ExecutionContext context, OperationResult parentResult) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
evaluateExpression
public PipelineData evaluateExpression(ScriptingExpressionType value, PipelineData input, ExecutionContext context, OperationResult parentResult) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
evaluateConstantExpression
public PipelineData evaluateConstantExpression(@NotNull @NotNull RawType constant, @Nullable @Nullable Class<?> expectedClass, ExecutionContext context, String desc, OperationResult result) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
evaluateConstantStringExpression
public PipelineData evaluateConstantStringExpression(RawType constant, ExecutionContext context, OperationResult result) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
registerActionExecutor
public void registerActionExecutor(String actionName, ActionExecutor executor)
-
-