if ( mimeTypeFromFile == null ) {
return Response.ok( "INVALID_MIME_TYPE", MediaType.TEXT_HTML ).build();
}
bundleBuilder.mime( mimeTypeFromFile );
IPlatformImporter importer = PentahoSystem.get( IPlatformImporter.class );
importLogger = importer.getRepositoryImportLogger();
final String mimeType =
bundle.getMimeType() != null ? bundle.getMimeType() : mimeResolver.resolveMimeForBundle( bundle );
if ( mimeType == null ) {
return Response.ok( "INVALID_MIME_TYPE", MediaType.TEXT_HTML ).build();
}
logJobStarted = true;
importLogger.startJob( importLoggerStream, uploadDir, level );
importer.importFile( bundle );
// Flush the Mondrian cache to show imported data-sources.
IMondrianCatalogService mondrianCatalogService =
PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService", PentahoSessionHolder
.getSession() );