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.
-
-
Field Summary
Fields Modifier and Type Field Description ScriptingActionExecutorRegistry
actionExecutorRegistry
SecurityEnforcer
securityEnforcer
-
Constructor Summary
Constructors Constructor Description ScriptingExpressionEvaluator()
-
Method Summary
-
-
-
Field Detail
-
actionExecutorRegistry
@Autowired public ScriptingActionExecutorRegistry actionExecutorRegistry
-
securityEnforcer
@Autowired public SecurityEnforcer securityEnforcer
-
-
Method Detail
-
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
-
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, SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
-
evaluateExpression
public PipelineData evaluateExpression(ScriptingExpressionType value, PipelineData input, ExecutionContext context, OperationResult parentResult) throws ScriptExecutionException, SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException
-
evaluateConstantExpression
public PipelineData evaluateConstantExpression(@NotNull @NotNull RawType constant, @Nullable @Nullable Class<?> expectedClass, ExecutionContext context, String desc) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
evaluateConstantStringExpression
public PipelineData evaluateConstantStringExpression(RawType constant, ExecutionContext context) throws ScriptExecutionException
- Throws:
ScriptExecutionException
-
-