Search in sources :

Example 11 with ResultHandler

use of com.evolveum.midpoint.schema.ResultHandler in project midpoint by Evolveum.

the class ExportObjects method execute.

public boolean execute() throws UnsupportedEncodingException, FileNotFoundException {
    System.out.println("Starting objects export.");
    File file = new File(filePath);
    if (file.exists() || file.canRead()) {
        System.out.println("XML file already exists, export won't be done.");
        return false;
    }
    final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(CONTEXTS);
    final OutputStreamWriter stream = new OutputStreamWriter(new FileOutputStream(file), "utf-8");
    try {
        System.out.println("Loading spring contexts.");
        System.out.println("Set repository.");
        RepositoryService repository = context.getBean("repositoryService", RepositoryService.class);
        ResultHandler<ObjectType> handler = new ResultHandler<ObjectType>() {

            PrismContext prismContext = context.getBean(PrismContext.class);

            @Override
            public boolean handle(PrismObject<ObjectType> object, OperationResult parentResult) {
                String displayName = getDisplayName(object);
                System.out.println("Exporting object " + displayName);
                OperationResult resultExport = new OperationResult("Export " + displayName);
                try {
                    String stringObject = prismContext.serializeObjectToString(object, PrismContext.LANG_XML);
                    stream.write("\t" + stringObject + "\n");
                } catch (Exception ex) {
                    System.out.println("Failed to parse objects to string for xml. Reason: " + ex);
                    resultExport.recordFatalError("Failed to parse objects to string for xml. Reason: ", ex);
                }
                return true;
            }
        };
        stream.write(createHeaderForXml());
        OperationResult result = new OperationResult("search set");
        System.out.println("Creating xml file " + file.getName());
        repository.searchObjectsIterative(ObjectType.class, null, handler, null, false, result);
        stream.write("</objects>");
        System.out.println("Created xml file " + file.getName());
    } catch (Exception ex) {
        System.out.println("Exception occurred during context loading, reason: " + ex.getMessage());
        ex.printStackTrace();
    } finally {
        destroyContext(context);
        if (stream != null) {
            IOUtils.closeQuietly(stream);
        }
    }
    System.out.println("Objects export finished.");
    return true;
}
Also used : PrismContext(com.evolveum.midpoint.prism.PrismContext) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ResultHandler(com.evolveum.midpoint.schema.ResultHandler) PolyString(com.evolveum.midpoint.prism.polystring.PolyString) FileNotFoundException(java.io.FileNotFoundException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) PrismObject(com.evolveum.midpoint.prism.PrismObject) ObjectType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) FileOutputStream(java.io.FileOutputStream) OutputStreamWriter(java.io.OutputStreamWriter) File(java.io.File) RepositoryService(com.evolveum.midpoint.repo.api.RepositoryService)

Example 12 with ResultHandler

use of com.evolveum.midpoint.schema.ResultHandler in project midpoint by Evolveum.

the class TestResources method test125SearchResourcesIterative.

@Test
public void test125SearchResourcesIterative() throws Exception {
    given();
    Task task = getTestTask();
    OperationResult result = task.getResult();
    preTestCleanup(AssignmentPolicyEnforcementType.POSITIVE);
    // precondition
    assertSteadyResources();
    final List<PrismObject<ResourceType>> resources = new ArrayList<>();
    ResultHandler<ResourceType> handler = (resource, parentResult) -> {
        assertResource(resource, true);
        resources.add(resource);
        return true;
    };
    when();
    modelService.searchObjectsIterative(ResourceType.class, null, handler, null, task, result);
    then();
    assertSuccess(result);
    assertFalse("Empty search return", resources.isEmpty());
    assertEquals("Unexpected number of resources found", 2, resources.size());
    assertSteadyResources();
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) EventResult(com.evolveum.midpoint.common.validator.EventResult) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Random(java.util.Random) Test(org.testng.annotations.Test) FailableFunction(com.evolveum.midpoint.util.FailableFunction) com.evolveum.midpoint.util.exception(com.evolveum.midpoint.util.exception) InternalsConfig(com.evolveum.midpoint.schema.internals.InternalsConfig) DOMUtil(com.evolveum.midpoint.util.DOMUtil) PrismTestUtil(com.evolveum.midpoint.prism.util.PrismTestUtil) MiscSchemaUtil(com.evolveum.midpoint.schema.util.MiscSchemaUtil) com.evolveum.midpoint.prism(com.evolveum.midpoint.prism) ResultHandler(com.evolveum.midpoint.schema.ResultHandler) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions) Holder(com.evolveum.midpoint.util.Holder) InternalOperationClasses(com.evolveum.midpoint.schema.internals.InternalOperationClasses) ObjectDelta(com.evolveum.midpoint.prism.delta.ObjectDelta) PrismAsserts(com.evolveum.midpoint.prism.util.PrismAsserts) Collection(java.util.Collection) ResourceTypeUtil(com.evolveum.midpoint.schema.util.ResourceTypeUtil) Task(com.evolveum.midpoint.task.api.Task) List(java.util.List) CarefulAnt(com.evolveum.midpoint.repo.sql.testing.CarefulAnt) PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta) QName(javax.xml.namespace.QName) AssertJUnit(org.testng.AssertJUnit) com.evolveum.midpoint.xml.ns._public.common.common_3(com.evolveum.midpoint.xml.ns._public.common.common_3) EventHandler(com.evolveum.midpoint.common.validator.EventHandler) SchemaConstants(com.evolveum.midpoint.schema.constants.SchemaConstants) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) DummyResourceContoller(com.evolveum.midpoint.test.DummyResourceContoller) ArrayList(java.util.ArrayList) ItemDelta(com.evolveum.midpoint.prism.delta.ItemDelta) EquivalenceStrategy(com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy) LegacyValidator(com.evolveum.midpoint.common.validator.LegacyValidator) Node(org.w3c.dom.Node) SqlRepoTestUtil(com.evolveum.midpoint.repo.sql.testing.SqlRepoTestUtil) IntegrationTestTools(com.evolveum.midpoint.test.IntegrationTestTools) TestUtil(com.evolveum.midpoint.test.util.TestUtil) ModelExecuteOptions(com.evolveum.midpoint.model.api.ModelExecuteOptions) InternalCounters(com.evolveum.midpoint.schema.internals.InternalCounters) ClassMode(org.springframework.test.annotation.DirtiesContext.ClassMode) DummyResource(com.evolveum.icf.dummy.resource.DummyResource) ResourceCarefulAntUtil(com.evolveum.midpoint.repo.sql.testing.ResourceCarefulAntUtil) InternalMonitor(com.evolveum.midpoint.schema.internals.InternalMonitor) File(java.io.File) ItemPath(com.evolveum.midpoint.prism.path.ItemPath) Element(org.w3c.dom.Element) ItemName(com.evolveum.midpoint.prism.path.ItemName) ContextConfiguration(org.springframework.test.context.ContextConfiguration) GetOperationOptions(com.evolveum.midpoint.schema.GetOperationOptions) Task(com.evolveum.midpoint.task.api.Task) ArrayList(java.util.ArrayList) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Test(org.testng.annotations.Test)

Example 13 with ResultHandler

use of com.evolveum.midpoint.schema.ResultHandler in project midpoint by Evolveum.

the class SearchEvaluator method evaluate.

public <T extends ObjectType> PipelineData evaluate(SearchExpressionType searchExpression, PipelineData input, ExecutionContext context, OperationResult globalResult) throws ScriptExecutionException, SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException {
    Validate.notNull(searchExpression.getType());
    ExpressionProfile expressionProfile = MiscSchemaUtil.getExpressionProfile();
    List<PipelineItem> data = input.getData();
    if (data.isEmpty()) {
        // TODO fix this brutal hack (with dummyValue)
        PrismContainerValue<?> dummyValue = prismContext.itemFactory().createContainerValue();
        PipelineItem dummyItem = new PipelineItem(dummyValue, PipelineData.newOperationResult(), context.getInitialVariables());
        data = Collections.singletonList(dummyItem);
    }
    final PipelineData outputData = PipelineData.createEmpty();
    final MutableBoolean atLeastOne = new MutableBoolean(false);
    for (PipelineItem item : data) {
        // TODO variables from current item
        // TODO operation result handling (global vs local)
        boolean noFetch = expressionHelper.getArgumentAsBoolean(searchExpression.getParameter(), PARAM_NO_FETCH, input, context, false, "search", globalResult);
        Class<T> objectClass = ObjectTypes.getObjectTypeFromTypeQName(searchExpression.getType()).getClassDefinition();
        ObjectQuery unresolvedObjectQuery = null;
        if (searchExpression.getQuery() != null) {
            try {
                unresolvedObjectQuery = context.getQueryConverter().createObjectQuery(objectClass, searchExpression.getQuery());
            } catch (SchemaException e) {
                throw new ScriptExecutionException("Couldn't parse object query. Reason: " + e.getMessage(), e);
            }
        } else if (searchExpression.getSearchFilter() != null) {
            unresolvedObjectQuery = prismContext.queryFactory().createQuery();
            try {
                ObjectFilter filter = prismContext.getQueryConverter().parseFilter(searchExpression.getSearchFilter(), objectClass);
                unresolvedObjectQuery.setFilter(filter);
            } catch (SchemaException e) {
                throw new ScriptExecutionException("Couldn't parse object query. Reason: " + e.getMessage(), e);
            }
        }
        ObjectQuery objectQuery;
        if (unresolvedObjectQuery != null) {
            VariablesMap variables = new VariablesMap();
            // noinspection unchecked
            item.getVariables().forEach((name, value) -> variables.put(name, cloneIfNecessary(name, value)));
            try {
                objectQuery = ExpressionUtil.evaluateQueryExpressions(unresolvedObjectQuery, variables, expressionProfile, expressionFactory, prismContext, "bulk action query", context.getTask(), globalResult);
            } catch (SchemaException | ObjectNotFoundException | ExpressionEvaluationException | CommunicationException | ConfigurationException | SecurityViolationException e) {
                // TODO continue on any error?
                throw new ScriptExecutionException("Couldn't evaluate expressions in object query: " + e.getMessage(), e);
            }
        } else {
            objectQuery = null;
        }
        final String variableName = searchExpression.getVariable();
        ResultHandler<T> handler = (object, parentResult) -> {
            context.checkTaskStop();
            atLeastOne.setValue(true);
            if (searchExpression.getScriptingExpression() != null) {
                if (variableName != null) {
                // TODO
                }
                JAXBElement<?> childExpression = searchExpression.getScriptingExpression();
                try {
                    PipelineData expressionResult = scriptingExpressionEvaluator.evaluateExpression((ScriptingExpressionType) childExpression.getValue(), PipelineData.create(object.getValue(), item.getVariables()), context, globalResult);
                    if (!BooleanUtils.isFalse(searchExpression.isAggregateOutput())) {
                        outputData.addAllFrom(expressionResult);
                    }
                    globalResult.setSummarizeSuccesses(true);
                    globalResult.summarize();
                } catch (ScriptExecutionException | SchemaException | ConfigurationException | ObjectNotFoundException | CommunicationException | SecurityViolationException | ExpressionEvaluationException e) {
                    // todo think about this
                    if (context.isContinueOnAnyError()) {
                        LoggingUtils.logUnexpectedException(LOGGER, "Exception when evaluating item from search result list.", e);
                    } else {
                        throw new SystemException(e);
                    }
                }
            } else {
                outputData.addValue(object.getValue(), item.getVariables());
            }
            return true;
        };
        try {
            Collection<SelectorOptions<GetOperationOptions>> options = operationsHelper.createGetOptions(searchExpression.getOptions(), noFetch);
            modelService.searchObjectsIterative(objectClass, objectQuery, handler, options, context.getTask(), globalResult);
        } catch (SchemaException | ObjectNotFoundException | SecurityViolationException | CommunicationException | ConfigurationException | ExpressionEvaluationException e) {
            // TODO continue on any error?
            throw new ScriptExecutionException("Couldn't execute searchObjects operation: " + e.getMessage(), e);
        }
    }
    if (atLeastOne.isFalse()) {
        // temporary hack, this will be configurable
        context.println("Warning: no matching object found");
    }
    return outputData;
}
Also used : ObjectType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType) OperationsHelper(com.evolveum.midpoint.model.impl.scripting.helpers.OperationsHelper) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Autowired(org.springframework.beans.factory.annotation.Autowired) BooleanUtils(org.apache.commons.lang3.BooleanUtils) Trace(com.evolveum.midpoint.util.logging.Trace) com.evolveum.midpoint.util.exception(com.evolveum.midpoint.util.exception) ExpressionHelper(com.evolveum.midpoint.model.impl.scripting.helpers.ExpressionHelper) ObjectFilter(com.evolveum.midpoint.prism.query.ObjectFilter) MiscSchemaUtil(com.evolveum.midpoint.schema.util.MiscSchemaUtil) PipelineItem(com.evolveum.midpoint.model.api.PipelineItem) VariablesMap(com.evolveum.midpoint.schema.expression.VariablesMap) ResultHandler(com.evolveum.midpoint.schema.ResultHandler) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions) Collection(java.util.Collection) JAXBElement(javax.xml.bind.JAXBElement) ExecutionContext(com.evolveum.midpoint.model.impl.scripting.ExecutionContext) LoggingUtils(com.evolveum.midpoint.util.logging.LoggingUtils) PipelineData(com.evolveum.midpoint.model.impl.scripting.PipelineData) List(java.util.List) Component(org.springframework.stereotype.Component) ExpressionFactory(com.evolveum.midpoint.repo.common.expression.ExpressionFactory) PrismContainerValue(com.evolveum.midpoint.prism.PrismContainerValue) ScriptingExpressionType(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType) MutableBoolean(org.apache.commons.lang.mutable.MutableBoolean) ExpressionUtil(com.evolveum.midpoint.repo.common.expression.ExpressionUtil) GetOperationOptions(com.evolveum.midpoint.schema.GetOperationOptions) ExpressionProfile(com.evolveum.midpoint.schema.expression.ExpressionProfile) ObjectTypes(com.evolveum.midpoint.schema.constants.ObjectTypes) VariablesUtil.cloneIfNecessary(com.evolveum.midpoint.model.impl.scripting.VariablesUtil.cloneIfNecessary) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) SearchExpressionType(com.evolveum.midpoint.xml.ns._public.model.scripting_3.SearchExpressionType) Collections(java.util.Collections) Validate(org.apache.commons.lang.Validate) TraceManager(com.evolveum.midpoint.util.logging.TraceManager) PipelineData(com.evolveum.midpoint.model.impl.scripting.PipelineData) ScriptingExpressionType(com.evolveum.midpoint.xml.ns._public.model.scripting_3.ScriptingExpressionType) VariablesMap(com.evolveum.midpoint.schema.expression.VariablesMap) MutableBoolean(org.apache.commons.lang.mutable.MutableBoolean) ExpressionProfile(com.evolveum.midpoint.schema.expression.ExpressionProfile) ObjectFilter(com.evolveum.midpoint.prism.query.ObjectFilter) JAXBElement(javax.xml.bind.JAXBElement) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) PipelineItem(com.evolveum.midpoint.model.api.PipelineItem) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions)

Example 14 with ResultHandler

use of com.evolveum.midpoint.schema.ResultHandler in project midpoint by Evolveum.

the class TestBrokenResources method testListResources.

public void testListResources(int expectedNumber, Collection<SelectorOptions<GetOperationOptions>> options) throws Exception {
    // GIVEN (1)
    Task task = getTestTask();
    OperationResult result = task.getResult();
    // WHEN (1)
    final SearchResultList<PrismObject<ResourceType>> resources = modelService.searchObjects(ResourceType.class, null, options, task, result);
    // THEN (1)
    result.computeStatus();
    display("getObject result", result);
    if (options == null) {
        assertEquals("Expected partial error (search)", OperationResultStatus.PARTIAL_ERROR, result.getStatus());
    } else if (GetOperationOptions.isNoFetch(SelectorOptions.findRootOptions(options))) {
        TestUtil.assertSuccess(result);
    } else {
        AssertJUnit.fail("unexpected");
    }
    display("Got resources: " + resources);
    assertEquals("Wrong number of resources", expectedNumber, resources.size());
    // GIVEN (2)
    resources.clear();
    task = getTestTask();
    result = task.getResult();
    ResultHandler<ResourceType> handler = (object, parentResult) -> {
        resources.add(object);
        return true;
    };
    // WHEN (2)
    modelService.searchObjectsIterative(ResourceType.class, null, handler, options, task, result);
    // THEN (2)
    result.computeStatus();
    display("getObject result", result);
    if (options == null) {
        assertEquals("Expected partial error (searchIterative)", OperationResultStatus.PARTIAL_ERROR, result.getStatus());
    } else if (GetOperationOptions.isNoFetch(SelectorOptions.findRootOptions(options))) {
        TestUtil.assertSuccess(result);
    } else {
        AssertJUnit.fail("unexpected");
    }
    display("Got resources: " + resources);
    assertEquals("Wrong number of resources", expectedNumber, resources.size());
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) AssertJUnit(org.testng.AssertJUnit) DeltaFactory(com.evolveum.midpoint.prism.delta.DeltaFactory) com.evolveum.midpoint.xml.ns._public.common.common_3(com.evolveum.midpoint.xml.ns._public.common.common_3) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) BreakMode(com.evolveum.icf.dummy.resource.BreakMode) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) StringAssertionPredicates.startsWith(com.evolveum.midpoint.test.asserter.predicates.StringAssertionPredicates.startsWith) Test(org.testng.annotations.Test) com.evolveum.midpoint.util.exception(com.evolveum.midpoint.util.exception) GenericConnectorException(com.evolveum.midpoint.provisioning.api.GenericConnectorException) OperationResultStatus(com.evolveum.midpoint.schema.result.OperationResultStatus) ORG_RELATED(com.evolveum.midpoint.schema.constants.SchemaConstants.ORG_RELATED) AbstractConfiguredModelIntegrationTest(com.evolveum.midpoint.model.intest.AbstractConfiguredModelIntegrationTest) PrismTestUtil(com.evolveum.midpoint.prism.util.PrismTestUtil) MiscSchemaUtil(com.evolveum.midpoint.schema.util.MiscSchemaUtil) IntegrationTestTools(com.evolveum.midpoint.test.IntegrationTestTools) TestUtil(com.evolveum.midpoint.test.util.TestUtil) DummyAccount(com.evolveum.icf.dummy.resource.DummyAccount) InternalCounters(com.evolveum.midpoint.schema.internals.InternalCounters) ResultHandler(com.evolveum.midpoint.schema.ResultHandler) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions) ObjectDelta(com.evolveum.midpoint.prism.delta.ObjectDelta) ProvisioningScriptSpec(com.evolveum.midpoint.test.ProvisioningScriptSpec) ClassMode(org.springframework.test.annotation.DirtiesContext.ClassMode) TimeAssertionPredicates.approximatelyCurrent(com.evolveum.midpoint.test.asserter.predicates.TimeAssertionPredicates.approximatelyCurrent) Collection(java.util.Collection) DummyResource(com.evolveum.icf.dummy.resource.DummyResource) MiscUtil(com.evolveum.midpoint.util.MiscUtil) PrismObject(com.evolveum.midpoint.prism.PrismObject) Task(com.evolveum.midpoint.task.api.Task) File(java.io.File) SearchResultList(com.evolveum.midpoint.schema.SearchResultList) ContextConfiguration(org.springframework.test.context.ContextConfiguration) GetOperationOptions(com.evolveum.midpoint.schema.GetOperationOptions) AssertJUnit.assertNotNull(org.testng.AssertJUnit.assertNotNull) AssertJUnit.assertEquals(org.testng.AssertJUnit.assertEquals) PrismObject(com.evolveum.midpoint.prism.PrismObject) Task(com.evolveum.midpoint.task.api.Task) OperationResult(com.evolveum.midpoint.schema.result.OperationResult)

Example 15 with ResultHandler

use of com.evolveum.midpoint.schema.ResultHandler in project midpoint by Evolveum.

the class SearchIterativeTest method test100SimpleSequentialIteration.

@Test
public void test100SimpleSequentialIteration() throws Exception {
    OperationResult result = new OperationResult("test100SimpleSequentialIteration");
    final List<PrismObject<UserType>> objects = new ArrayList<>();
    ResultHandler<UserType> handler = (object, parentResult) -> {
        objects.add(object);
        return true;
    };
    SearchOpAsserter asserter = new SearchOpAsserter();
    repositoryService.searchObjectsIterative(UserType.class, null, handler, null, true, result);
    result.recomputeStatus();
    // extra search is to make sure no other objects are there
    asserter.assertIncrement(COUNT / BATCH + 1);
    assertTrue(result.isSuccess());
    assertObjects(objects, COUNT);
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) ResultHandler(com.evolveum.midpoint.schema.ResultHandler) AssertJUnit(org.testng.AssertJUnit) OP_SEARCH_OBJECTS(com.evolveum.midpoint.repo.api.RepositoryService.OP_SEARCH_OBJECTS) ObjectNotFoundException(com.evolveum.midpoint.util.exception.ObjectNotFoundException) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) SchemaException(com.evolveum.midpoint.util.exception.SchemaException) Test(org.testng.annotations.Test) ObjectAlreadyExistsException(com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException) PrismObject(com.evolveum.midpoint.prism.PrismObject) SqlPerformanceMonitorImpl(com.evolveum.midpoint.repo.sqlbase.perfmon.SqlPerformanceMonitorImpl) ArrayList(java.util.ArrayList) List(java.util.List) SystemException(com.evolveum.midpoint.util.exception.SystemException) PolyStringType(com.evolveum.prism.xml.ns._public.types_3.PolyStringType) ContextConfiguration(org.springframework.test.context.ContextConfiguration) UserType(com.evolveum.midpoint.xml.ns._public.common.common_3.UserType) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) RepositoryService(com.evolveum.midpoint.repo.api.RepositoryService) PolyString(com.evolveum.midpoint.prism.polystring.PolyString) PrismObject(com.evolveum.midpoint.prism.PrismObject) ArrayList(java.util.ArrayList) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) UserType(com.evolveum.midpoint.xml.ns._public.common.common_3.UserType) Test(org.testng.annotations.Test)

Aggregations

ResultHandler (com.evolveum.midpoint.schema.ResultHandler)54 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)53 PrismObject (com.evolveum.midpoint.prism.PrismObject)39 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)33 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)29 Test (org.testng.annotations.Test)29 ArrayList (java.util.ArrayList)24 SystemException (com.evolveum.midpoint.util.exception.SystemException)23 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)22 Task (com.evolveum.midpoint.task.api.Task)19 QName (javax.xml.namespace.QName)19 DirtiesContext (org.springframework.test.annotation.DirtiesContext)19 ContextConfiguration (org.springframework.test.context.ContextConfiguration)19 AssertJUnit (org.testng.AssertJUnit)17 RepositoryService (com.evolveum.midpoint.repo.api.RepositoryService)16 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)16 List (java.util.List)16 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)15 SelectorOptions (com.evolveum.midpoint.schema.SelectorOptions)14 com.evolveum.midpoint.xml.ns._public.common.common_3 (com.evolveum.midpoint.xml.ns._public.common.common_3)13