Map<String, Object> context = new HashMap<String, Object>();
context.put(ContentImporter.RESPECT_PROPERTY_DEFINITIONS_CONSTRAINTS, true);
NodeData rootData = ((NodeData) ((NodeImpl) sysSession.getRootNode()).getData());
TransactionableDataManager dataManager = sysSession.getTransientNodesManager().getTransactManager();
ExportImportFactory eiFactory = new ExportImportFactory();
StreamImporter importer =
eiFactory.getWorkspaceImporter(rootData, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW, dataManager,
dataManager, sysSession.getWorkspace().getNodeTypesHolder(),
sysSession.getLocationFactory(), sysSession.getValueFactory(), getNamespaceRegistry(),
sysSession.getAccessManager(), sysSession.getUserState(), context, this, wsName);
importer.importStream(xmlStream);
}