repository.warn(JcrI18n.cannotLoadCndFile, cndFile);
return;
}
CndImporter cndImporter = new CndImporter(repository.context());
Problems importProblems = new SimpleProblems();
cndImporter.importFrom(cndFileStream, importProblems, cndFile);
for (Problem problem : importProblems) {
if (problem.getStatus() == Problem.Status.ERROR) {
if (problem.getThrowable() != null) {
repository.error(problem.getThrowable(), problem.getMessage(), problem.getParameters());
} else {
repository.error(problem.getMessage(), problem.getParameters());
}
} else if (problem.getStatus() == Problem.Status.WARNING) {
repository.warn(problem.getMessage(), problem.getParameters());
}
}
if (importProblems.hasErrors()) {
return;
}
this.nodeTypeDefinitions = cndImporter.getNodeTypeDefinitions();
this.namespaces = cndImporter.getNamespaces();
} catch (IOException e) {