use of com.evolveum.midpoint.gui.api.factory.wrapper.WrapperContext in project midpoint by Evolveum.
the class TestIntegrationObjectWrapperFactory method createObjectWrapper.
private <O extends ObjectType> PrismObjectWrapper<O> createObjectWrapper(Task task, PrismObject<O> object, ItemStatus status) throws SchemaException {
OperationResult result = task.getResult();
ModelServiceLocator modelServiceLocator = getServiceLocator(task);
PrismObjectWrapperFactory<O> factory = modelServiceLocator.findObjectWrapperFactory(object.getDefinition());
WrapperContext context = new WrapperContext(task, result);
if (ItemStatus.NOT_CHANGED == status) {
context.setCreateIfEmpty(true);
context.setShowEmpty(true);
}
PrismObjectWrapper<O> objectWrapper = factory.createObjectWrapper(object, status, context);
return objectWrapper;
}
Aggregations