use of com.evolveum.midpoint.prism.delta.builder.S_ValuesEntry in project midpoint by Evolveum.
the class PolicyRuleBasedAspect method assignmentToDelta.
// creates an ObjectDelta that will be executed after successful approval of the given assignment
@SuppressWarnings("unchecked")
private ObjectDelta<? extends FocusType> assignmentToDelta(Class<? extends Objectable> focusClass, AssignmentType assignmentType, boolean assignmentRemoved, String objectOid) throws SchemaException {
PrismContainerValue value = assignmentType.clone().asPrismContainerValue();
S_ValuesEntry item = DeltaBuilder.deltaFor(focusClass, prismContext).item(FocusType.F_ASSIGNMENT);
S_ItemEntry op = assignmentRemoved ? item.delete(value) : item.add(value);
return (ObjectDelta<? extends FocusType>) op.asObjectDelta(objectOid);
}
Aggregations