{
throw new LockException("Node " + node.getPath() + " is locked ");
}
StreamImporter importer =
new ExportImportFactory().getStreamImporter(((NodeData) node.getData()), uuidBehavior, session
.getTransientNodesManager().getTransactManager(), session.getTransientNodesManager()
.getTransactManager(), nodeTypeManager, session.getLocationFactory(),
session.getValueFactory(), getNamespaceRegistry(), session.getAccessManager(), session
.getUserState(), context, (RepositoryImpl) session.getRepository(), name);
importer.importStream(in);