Note: Not sure if it's a bug or a feature request. But since the importer implements the FileManagerDocumentModelFactory class, one expects it to be usable
So the problem is: I need to import files and have Nuxeo create the correct document types. The default importer creates a "File" for every file imported. The FileManagerDocumentModelFactory is supposed to create the correct type: A "Picture" for a .jpg, a "Video" for a .mov, etc.
The problem is in the DefaultImporterServiceImpl class (nuxeo-importer-core). Basically, this service is ready to handle only {{DefaultDocumentModelFactory{{, not anything else:
// . . . protected DefaultDocumentModelFactory getDocumentModelFactory() { // . . . && (DefaultDocumentModelFactory.class.isAssignableFrom(docModelFactoryClass)) } // . . .
=> The FileManagerDocumentModelFactory extends AbstractDocumentModelFactory, not DefaultDocumentModelFactory, so isAssignableFrom is always false, and the importer falls back to DefaultDocumentModelFactory.