Search in sources :

Example 1 with MetadataItemProcessingSpecImpl

use of com.evolveum.midpoint.model.common.mapping.metadata.MetadataItemProcessingSpecImpl in project midpoint by Evolveum.

the class ModelInteractionServiceImpl method getMetadataItemProcessingSpec.

@Override
public <O extends ObjectType> MetadataItemProcessingSpec getMetadataItemProcessingSpec(ItemPath metadataItemPath, PrismObject<O> object, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, SecurityViolationException {
    PrismObject<O> fullObject = getFullObjectReadOnly(object, result);
    ArchetypePolicyType archetypePolicy = archetypeManager.determineArchetypePolicy(fullObject, result);
    ObjectReferenceType templateRef = archetypePolicy != null ? archetypePolicy.getObjectTemplateRef() : null;
    MetadataItemProcessingSpecImpl processingSpec = new MetadataItemProcessingSpecImpl(metadataItemPath);
    processingSpec.populateFromObjectTemplate(templateRef, objectResolver, "getting items with provenance support for " + object, task, result);
    LOGGER.trace("getMetadataSupportSpec for {} in {}:\n" + " - archetypePolicy = {}\n" + " - templateRef = {}\n" + " - processingSpec = \n{}", metadataItemPath, object, archetypePolicy, templateRef, DebugUtil.debugDumpLazily(processingSpec, 1));
    return processingSpec;
}
Also used : MetadataItemProcessingSpecImpl(com.evolveum.midpoint.model.common.mapping.metadata.MetadataItemProcessingSpecImpl)

Aggregations

MetadataItemProcessingSpecImpl (com.evolveum.midpoint.model.common.mapping.metadata.MetadataItemProcessingSpecImpl)1