Search in sources :

Example 6 with SceneDto

use of com.evolveum.midpoint.web.component.prism.show.SceneDto in project midpoint by Evolveum.

the class WorkItemDto method prepareDeltaVisualization.

public void prepareDeltaVisualization(String sceneNameKey, PrismContext prismContext, ModelInteractionService modelInteractionService, Task opTask, OperationResult result) throws SchemaException, ExpressionEvaluationException {
    TaskType task = getTaskType();
    if (task == null || task.getWorkflowContext() == null) {
        return;
    }
    if (!(task.getWorkflowContext().getProcessorSpecificState() instanceof WfPrimaryChangeProcessorStateType)) {
        return;
    }
    WfPrimaryChangeProcessorStateType state = (WfPrimaryChangeProcessorStateType) task.getWorkflowContext().getProcessorSpecificState();
    Scene deltasScene = SceneUtil.visualizeObjectTreeDeltas(state.getDeltasToProcess(), sceneNameKey, prismContext, modelInteractionService, opTask, result);
    deltas = new SceneDto(deltasScene);
    ObjectTreeDeltas deltas = ObjectTreeDeltas.fromObjectTreeDeltasType(state.getDeltasToProcess(), prismContext);
    changes = TaskDto.createChangesToBeApproved(deltas, modelInteractionService, prismContext, opTask, result);
}
Also used : SceneDto(com.evolveum.midpoint.web.component.prism.show.SceneDto) Scene(com.evolveum.midpoint.model.api.visualizer.Scene) ObjectTreeDeltas(com.evolveum.midpoint.schema.ObjectTreeDeltas)

Example 7 with SceneDto

use of com.evolveum.midpoint.web.component.prism.show.SceneDto in project midpoint by Evolveum.

the class TaskDto method retrieveDeltaToProcess.

private SceneDto retrieveDeltaToProcess(TaskType taskType, ModelInteractionService modelInteractionService, Task opTask, OperationResult thisOpResult) throws SchemaException, ExpressionEvaluationException {
    WfContextType wfc = taskType.getWorkflowContext();
    if (wfc == null || !(wfc.getProcessorSpecificState() instanceof WfPrimaryChangeProcessorStateType)) {
        return null;
    }
    WfPrimaryChangeProcessorStateType pcps = (WfPrimaryChangeProcessorStateType) wfc.getProcessorSpecificState();
    Scene scene = SceneUtil.visualizeObjectTreeDeltas(pcps.getDeltasToProcess(), "", taskType.asPrismObject().getPrismContext(), modelInteractionService, opTask, thisOpResult);
    return new SceneDto(scene);
}
Also used : SceneDto(com.evolveum.midpoint.web.component.prism.show.SceneDto) Scene(com.evolveum.midpoint.model.api.visualizer.Scene)

Aggregations

SceneDto (com.evolveum.midpoint.web.component.prism.show.SceneDto)7 Scene (com.evolveum.midpoint.model.api.visualizer.Scene)5 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 ExpressionEvaluationException (com.evolveum.midpoint.util.exception.ExpressionEvaluationException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 ScenePanel (com.evolveum.midpoint.web.component.prism.show.ScenePanel)2 Label (org.apache.wicket.markup.html.basic.Label)2 ModelState (com.evolveum.midpoint.model.api.context.ModelState)1 ObjectTreeDeltas (com.evolveum.midpoint.schema.ObjectTreeDeltas)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 ObjectDeltaType (com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType)1 ArrayList (java.util.ArrayList)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)1 IModel (org.apache.wicket.model.IModel)1 PropertyModel (org.apache.wicket.model.PropertyModel)1 StringResourceModel (org.apache.wicket.model.StringResourceModel)1