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;
}
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());
}
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());
}
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);
}
}
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();
}
Aggregations