Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model-api support for bulk actions (MID-637)
- Loading branch information
Showing
2 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
model/model-api/src/main/java/com/evolveum/midpoint/model/api/ScriptingService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright (c) 2010-2014 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.evolveum.midpoint.model.api; | ||
|
||
import com.evolveum.midpoint.prism.PrismObject; | ||
import com.evolveum.midpoint.prism.parser.QueryConvertor; | ||
import com.evolveum.midpoint.prism.query.ObjectFilter; | ||
import com.evolveum.midpoint.schema.GetOperationOptions; | ||
import com.evolveum.midpoint.schema.SelectorOptions; | ||
import com.evolveum.midpoint.schema.constants.SchemaConstants; | ||
import com.evolveum.midpoint.schema.result.OperationResult; | ||
import com.evolveum.midpoint.task.api.Task; | ||
import com.evolveum.midpoint.util.exception.ObjectNotFoundException; | ||
import com.evolveum.midpoint.util.exception.SchemaException; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType; | ||
import com.evolveum.midpoint.xml.ns._public.model.scripting_3.ActionExpressionType; | ||
import com.evolveum.midpoint.xml.ns._public.model.scripting_3.ExecuteScriptType; | ||
import com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType; | ||
import com.evolveum.midpoint.xml.ns._public.model.scripting_3.SearchExpressionType; | ||
|
||
import javax.xml.bind.JAXBElement; | ||
import javax.xml.namespace.QName; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
/** | ||
* Interface of the Model subsystem that provides scripting (bulk actions) operations. | ||
* | ||
* @author mederly | ||
*/ | ||
public interface ScriptingService { | ||
|
||
/** | ||
* Asynchronously executes simple scripting expressions, consisting of one search command and one action. | ||
* | ||
* @param objectType Object type to search (e.g. c:UserType) | ||
* @param filter Filter to be applied (ObjectFilter) | ||
* @param actionName Action to be executed on objects found (e.g. "disable", "delete", "recompute", etc). | ||
* @param 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. | ||
* @param parentResult | ||
* @throws SchemaException | ||
*/ | ||
public void evaluateExpressionInBackground(QName objectType, ObjectFilter filter, String actionName, Task task, OperationResult parentResult) throws SchemaException; | ||
|
||
/** | ||
* Asynchronously executes any scripting expression. | ||
* | ||
* @param expression Expression to be executed. | ||
* @param 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. | ||
* @param parentResult | ||
* @throws SchemaException | ||
*/ | ||
public void evaluateExpressionInBackground(JAXBElement<? extends ScriptingExpressionType> expression, Task task, OperationResult parentResult) throws SchemaException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters