Package com.evolveum.midpoint.model.api
Interface ScriptingService
-
- All Known Implementing Classes:
ModelController
public interface ScriptingService
Interface of the Model subsystem that provides scripting (bulk actions) operations.- Author:
- mederly
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ScriptExecutionResult
evaluateExpression(ExecuteScriptType executeScriptCommand, VariablesMap initialVariables, boolean recordProgressAndIterationStatistics, Task task, OperationResult result)
ScriptExecutionResult
evaluateExpression(ScriptingExpressionType expression, Task task, OperationResult result)
Synchronously executes any scripting expression (with no input data).void
evaluateExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult)
void
evaluateExpressionInBackground(ScriptingExpressionType expression, Task task, OperationResult parentResult)
Asynchronously executes any scripting expression.void
evaluateExpressionInBackground(QName objectType, ObjectFilter filter, String actionName, Task task, OperationResult parentResult)
Deprecated.void
evaluateIterativeExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult)
Asynchronously executes any scripting expression.
-
-
-
Method Detail
-
evaluateExpressionInBackground
@Deprecated void evaluateExpressionInBackground(QName objectType, ObjectFilter filter, String actionName, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
Deprecated.Asynchronously executes simple scripting expressions, consisting of one search command and one action.- Parameters:
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
-- Throws:
SchemaException
- TODO consider removing this method (it was meant as a simplified version of the method below)SecurityViolationException
ObjectNotFoundException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
evaluateExpressionInBackground
void evaluateExpressionInBackground(ScriptingExpressionType expression, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
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.parentResult
-- Throws:
SchemaException
ConfigurationException
CommunicationException
SecurityViolationException
ObjectNotFoundException
ExpressionEvaluationException
-
evaluateExpressionInBackground
void evaluateExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
-
evaluateIterativeExpressionInBackground
void evaluateIterativeExpressionInBackground(ExecuteScriptType executeScriptCommand, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
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.parentResult
-- Throws:
SchemaException
ConfigurationException
CommunicationException
SecurityViolationException
ObjectNotFoundException
ExpressionEvaluationException
-
evaluateExpression
ScriptExecutionResult evaluateExpression(ScriptingExpressionType expression, Task task, OperationResult result) throws ScriptExecutionException, SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
Synchronously executes any scripting expression (with no input data).- Parameters:
expression
- Scripting expression to execute.task
- Task in context of which the script should execute (in foreground!)result
- Operation result- Throws:
ScriptExecutionException
- TODO return ExecutionContext (requires moving the context to model api)SchemaException
SecurityViolationException
ObjectNotFoundException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
evaluateExpression
ScriptExecutionResult evaluateExpression(@NotNull ExecuteScriptType executeScriptCommand, @NotNull VariablesMap initialVariables, boolean recordProgressAndIterationStatistics, @NotNull Task task, @NotNull OperationResult result) throws ScriptExecutionException, SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
-
-