}
// Otherwise, ask the content manager for whom handles this kind of
// file and dispatch there.
ContentImportManager cim = ContentImportManager.getContentImportManager();
final ContentImporterSPI importer = cim.getContentImporter(extension, true);
if (importer == null) {
logger.warning("No importer found for " + file.getAbsolutePath());
return;
}
// Kick off a thread to upload the content. We put this in its own
// thread to let this method complete (since we are running on the
// AWT event queue.
new Thread() {
@Override
public void run() {
try {
String uri = importer.importFile(file, extension, createCell);
if (listener != null) {
listener.importSuccess(uri);
}
} catch (Throwable t) {
if (listener != null) {