Search in sources :

Example 6 with CachingMetadataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType in project midpoint by Evolveum.

the class ResourceManager method isComplete.

private boolean isComplete(PrismObject<ResourceType> resource) {
    ResourceType resourceType = resource.asObjectable();
    Element xsdSchema = ResourceTypeUtil.getResourceXsdSchema(resource);
    if (xsdSchema == null) {
        return false;
    }
    CapabilitiesType capabilitiesType = resourceType.getCapabilities();
    if (capabilitiesType == null) {
        return false;
    }
    CachingMetadataType capCachingMetadata = capabilitiesType.getCachingMetadata();
    if (capCachingMetadata == null) {
        return false;
    }
    return true;
}
Also used : CapabilitiesType(com.evolveum.midpoint.xml.ns._public.common.common_3.CapabilitiesType) Element(org.w3c.dom.Element) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) CachingMetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType)

Example 7 with CachingMetadataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType in project midpoint by Evolveum.

the class TestDummyCaching method assertRepoCachingMetadata.

@Override
protected void assertRepoCachingMetadata(PrismObject<ShadowType> shadowFromRepo, XMLGregorianCalendar start, XMLGregorianCalendar end) {
    CachingMetadataType cachingMetadata = shadowFromRepo.asObjectable().getCachingMetadata();
    assertNotNull("No caching metadata in " + shadowFromRepo, cachingMetadata);
    TestUtil.assertBetween("Wrong retrieval timestamp in caching metadata in " + shadowFromRepo, start, end, cachingMetadata.getRetrievalTimestamp());
}
Also used : CachingMetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType)

Example 8 with CachingMetadataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType in project midpoint by Evolveum.

the class TestDummyCaching method assertRepoCachingMetadata.

/**
	 * We do not know what the timestamp should be. But some timestamp should be there.
	 */
@Override
protected void assertRepoCachingMetadata(PrismObject<ShadowType> shadowFromRepo) {
    CachingMetadataType cachingMetadata = shadowFromRepo.asObjectable().getCachingMetadata();
    assertNotNull("No caching metadata in " + shadowFromRepo, cachingMetadata);
    assertNotNull("Missing retrieval timestamp in caching metadata in " + shadowFromRepo, cachingMetadata.getRetrievalTimestamp());
}
Also used : CachingMetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType)

Example 9 with CachingMetadataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType in project midpoint by Evolveum.

the class TestDummyCaching method assertCachingMetadata.

@Override
protected void assertCachingMetadata(PrismObject<ShadowType> shadow, boolean expectedCached, XMLGregorianCalendar startTs, XMLGregorianCalendar endTs) {
    CachingMetadataType cachingMetadata = shadow.asObjectable().getCachingMetadata();
    if (expectedCached) {
        assertNotNull("No caching metadata in " + shadow, cachingMetadata);
        TestUtil.assertBetween("Wrong retrievalTimestamp in caching metadata in " + shadow, startTs, endTs, cachingMetadata.getRetrievalTimestamp());
    } else {
        super.assertCachingMetadata(shadow, expectedCached, startTs, endTs);
    }
}
Also used : CachingMetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType)

Example 10 with CachingMetadataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType in project midpoint by Evolveum.

the class AbstractDummyTest method getSchemaCachingMetadata.

protected CachingMetadataType getSchemaCachingMetadata(PrismObject<ResourceType> resource) {
    ResourceType resourceType = resource.asObjectable();
    XmlSchemaType xmlSchemaTypeAfter = resourceType.getSchema();
    assertNotNull("No schema", xmlSchemaTypeAfter);
    Element resourceXsdSchemaElementAfter = ResourceTypeUtil.getResourceXsdSchema(resourceType);
    assertNotNull("No schema XSD element", resourceXsdSchemaElementAfter);
    return xmlSchemaTypeAfter.getCachingMetadata();
}
Also used : Element(org.w3c.dom.Element) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) XmlSchemaType(com.evolveum.midpoint.xml.ns._public.common.common_3.XmlSchemaType)

Aggregations

CachingMetadataType (com.evolveum.midpoint.xml.ns._public.common.common_3.CachingMetadataType)13 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)7 Element (org.w3c.dom.Element)5 ResourceSchema (com.evolveum.midpoint.schema.processor.ResourceSchema)4 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)4 CapabilitiesType (com.evolveum.midpoint.xml.ns._public.common.common_3.CapabilitiesType)4 XmlSchemaType (com.evolveum.midpoint.xml.ns._public.common.common_3.XmlSchemaType)4 Test (org.testng.annotations.Test)4 RefinedResourceSchema (com.evolveum.midpoint.common.refinery.RefinedResourceSchema)2 PrismObject (com.evolveum.midpoint.prism.PrismObject)2 Task (com.evolveum.midpoint.task.api.Task)2 AbstractConfiguredModelIntegrationTest (com.evolveum.midpoint.model.intest.AbstractConfiguredModelIntegrationTest)1 ComplexTypeDefinition (com.evolveum.midpoint.prism.ComplexTypeDefinition)1 Containerable (com.evolveum.midpoint.prism.Containerable)1 ConnectorInstance (com.evolveum.midpoint.provisioning.ucf.api.ConnectorInstance)1 AbstractIntegrationTest (com.evolveum.midpoint.test.AbstractIntegrationTest)1 CommunicationException (com.evolveum.midpoint.util.exception.CommunicationException)1 ConfigurationException (com.evolveum.midpoint.util.exception.ConfigurationException)1 ExpressionEvaluationException (com.evolveum.midpoint.util.exception.ExpressionEvaluationException)1 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)1