use of com.evolveum.midpoint.repo.common.activity.run.processing.ItemProcessingRequest in project midpoint by Evolveum.
the class ClassicCollectionReportExportActivityRun method iterateOverItemsInBucket.
@Override
public void iterateOverItemsInBucket(OperationResult result) throws CommonException {
// Issue the search to audit or model/repository
// And use the following handler to handle the results
AtomicInteger sequence = new AtomicInteger(0);
Handler<Containerable> handler = record -> {
ItemProcessingRequest<Containerable> request = ContainerableProcessingRequest.create(sequence.getAndIncrement(), record, this);
coordinator.submit(request, result);
return true;
};
searchSpecificationHolder.run(handler, result);
}
use of com.evolveum.midpoint.repo.common.activity.run.processing.ItemProcessingRequest in project midpoint by Evolveum.
the class ClassicDashboardReportExportActivityRun method iterateOverItemsInBucket.
@Override
public void iterateOverItemsInBucket(OperationResult result) throws CommonException {
// Issue the search to audit or model/repository
// And use the following handler to handle the results
List<DashboardWidgetType> widgets = support.getDashboard().getWidget();
AtomicInteger widgetSequence = new AtomicInteger(1);
for (DashboardWidgetType widget : widgets) {
ExportDashboardReportLine<Containerable> widgetLine = new ExportDashboardReportLine<>(widgetSequence.getAndIncrement(), widget);
ItemProcessingRequest<ExportDashboardReportLine<Containerable>> widgetRequest = new ExportDashboardReportLineProcessingRequest(widgetLine, this);
coordinator.submit(widgetRequest, result);
if (support.isWidgetTableVisible()) {
AtomicInteger sequence = new AtomicInteger(1);
Handler<Containerable> handler = record -> {
ExportDashboardReportLine<Containerable> line = new ExportDashboardReportLine<>(sequence.getAndIncrement(), record, widget.getIdentifier());
ItemProcessingRequest<ExportDashboardReportLine<Containerable>> request = new ExportDashboardReportLineProcessingRequest(line, this);
coordinator.submit(request, result);
return true;
};
DashboardWidgetHolder holder = mapOfWidgetsController.get(widget.getIdentifier());
ContainerableReportDataSource searchSpecificationHolder = holder.getSearchSpecificationHolder();
searchSpecificationHolder.run(handler, result);
}
}
}
Aggregations