use of com.evolveum.midpoint.schema.traces.TraceParser in project midpoint by Evolveum.
the class PageTraceView method createOpNodeList.
private void createOpNodeList(String filePath) throws IOException, SchemaException {
if (parsedOpNodeList == null || !filePath.equals(parsedFilePath)) {
PrismContext prismContext = getPrismContext();
TraceParser parser = new TraceParser(prismContext);
TracingOutputType parsed = parser.parse(new File(filePath));
parsedOpNodeList = new OpNodeTreeBuilder(prismContext).build(parsed);
parsedFilePath = filePath;
}
}
use of com.evolveum.midpoint.schema.traces.TraceParser in project midpoint by Evolveum.
the class TestTracing method assertTraceCanBeParsed.
private void assertTraceCanBeParsed(OperationResult result) throws SchemaException, IOException {
SearchResultList<PrismObject<ReportDataType>> reportDataObjects = repositoryService.searchObjects(ReportDataType.class, null, null, result);
assertThat(reportDataObjects.size()).as("# of report outputs").isEqualTo(1);
String file = reportDataObjects.get(0).asObjectable().getFilePath();
TraceParser parser = new TraceParser(prismContext);
TracingOutputType parsed = parser.parse(new File(file));
System.out.println("Tracing output parsed OK: " + parsed);
}
use of com.evolveum.midpoint.schema.traces.TraceParser in project midpoint by Evolveum.
the class EditTraceAction method parseInput.
private TracingOutputType parseInput() throws IOException, SchemaException {
String inputFile = options.getInput();
log.info("Starting parsing input file: {}", inputFile);
long start = System.currentTimeMillis();
TraceParser parser = new TraceParser(context.getPrismContext());
TracingOutputType trace = parser.parse(new File(inputFile), true);
log.info("Parsing finished; in {} seconds", (System.currentTimeMillis() - start) / 1000);
return trace;
}
Aggregations