use of com.evolveum.midpoint.xml.ns._public.common.common_3.ProjectionObjectDeltaType in project midpoint by Evolveum.
the class ObjectTreeDeltas method fromObjectTreeDeltasType.
public static ObjectTreeDeltas fromObjectTreeDeltasType(ObjectTreeDeltasType deltasType, PrismContext prismContext) throws SchemaException {
Validate.notNull(prismContext, "prismContext");
if (deltasType == null) {
return null;
}
ObjectTreeDeltas deltas = new ObjectTreeDeltas(prismContext);
if (deltasType.getFocusPrimaryDelta() != null) {
deltas.setFocusChange(DeltaConvertor.createObjectDelta(deltasType.getFocusPrimaryDelta(), prismContext));
}
for (ProjectionObjectDeltaType projectionObjectDeltaType : deltasType.getProjectionPrimaryDelta()) {
ResourceShadowDiscriminator rsd = ResourceShadowDiscriminator.fromResourceShadowDiscriminatorType(projectionObjectDeltaType.getResourceShadowDiscriminator());
ObjectDelta objectDelta = DeltaConvertor.createObjectDelta(projectionObjectDeltaType.getPrimaryDelta(), prismContext);
deltas.addProjectionChange(rsd, objectDelta);
}
return deltas;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ProjectionObjectDeltaType in project midpoint by Evolveum.
the class SceneUtil method visualizeObjectTreeDeltas.
public static Scene visualizeObjectTreeDeltas(ObjectTreeDeltasType deltas, String displayNameKey, PrismContext prismContext, ModelInteractionService modelInteractionService, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException {
List<Scene> scenes = new ArrayList<>();
if (deltas != null) {
if (deltas.getFocusPrimaryDelta() != null) {
ObjectDelta<? extends ObjectType> delta = DeltaConvertor.createObjectDelta(deltas.getFocusPrimaryDelta(), prismContext);
scenes.add(modelInteractionService.visualizeDelta(delta, task, result));
}
for (ProjectionObjectDeltaType projectionObjectDelta : deltas.getProjectionPrimaryDelta()) {
ObjectDelta<? extends ObjectType> delta = DeltaConvertor.createObjectDelta(projectionObjectDelta.getPrimaryDelta(), prismContext);
scenes.add(modelInteractionService.visualizeDelta(delta, task, result));
}
}
return new WrapperScene(scenes, displayNameKey);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ProjectionObjectDeltaType in project midpoint by Evolveum.
the class ObjectTreeDeltas method toObjectTreeDeltasType.
public ObjectTreeDeltasType toObjectTreeDeltasType() throws SchemaException {
ObjectTreeDeltasType jaxb = new ObjectTreeDeltasType();
if (getFocusChange() != null) {
jaxb.setFocusPrimaryDelta(DeltaConvertor.toObjectDeltaType(getFocusChange()));
}
Set<Map.Entry<ResourceShadowDiscriminator, ObjectDelta<ShadowType>>> entries = (Set<Map.Entry<ResourceShadowDiscriminator, ObjectDelta<ShadowType>>>) getProjectionChangeMapEntries();
for (Map.Entry<ResourceShadowDiscriminator, ObjectDelta<ShadowType>> entry : entries) {
ProjectionObjectDeltaType projChange = new ProjectionObjectDeltaType();
projChange.setResourceShadowDiscriminator(entry.getKey().toResourceShadowDiscriminatorType());
projChange.setPrimaryDelta(DeltaConvertor.toObjectDeltaType(entry.getValue()));
jaxb.getProjectionPrimaryDelta().add(projChange);
}
return jaxb;
}
Aggregations