public interface ScriptingService
Modifier and Type | Method and Description |
---|---|
ScriptExecutionResult |
evaluateExpression(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType expression,
Task task,
OperationResult result)
Synchronously executes any scripting expression (with no input data).
|
void |
evaluateExpressionInBackground(QName objectType,
ObjectFilter filter,
String actionName,
Task task,
OperationResult parentResult)
Asynchronously executes simple scripting expressions, consisting of one search command and one action.
|
void |
evaluateExpressionInBackground(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType expression,
Task task,
OperationResult parentResult)
Asynchronously executes any scripting expression.
|
void evaluateExpressionInBackground(QName objectType, ObjectFilter filter, String actionName, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException
objectType
- Object type to search (e.g. c:UserType)filter
- Filter to be applied (ObjectFilter)actionName
- Action to be executed on objects found (e.g. "disable", "delete", "recompute", etc).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.parentResult
- SchemaException
- TODO consider removing this method (it was meant as a simplified version of the method below)SecurityViolationException
void evaluateExpressionInBackground(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType expression, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException
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.parentResult
- SchemaException
SecurityViolationException
ScriptExecutionResult evaluateExpression(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType expression, Task task, OperationResult result) throws ScriptExecutionException, SchemaException, SecurityViolationException
expression
- Scripting expression to execute.task
- Task in context of which the script should execute (in foreground!)result
- Operation resultScriptExecutionException
- TODO return ExecutionContext (requires moving the context to model api)SchemaException
SecurityViolationException
Copyright © 2016 evolveum. All rights reserved.