Package org.pentaho.platform.plugin.services.importer

Examples of org.pentaho.platform.plugin.services.importer.IPlatformImporter


      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() );
View Full Code Here


          // get a File reference to the directory
          String solutionPath = PentahoSystem.getApplicationContext().getSolutionPath( DEFAULT_CONTENT_FOLDER );
          File directory = new File( solutionPath );

          // Instantiate the importer
          IPlatformImporter importer = PentahoSystem.get( IPlatformImporter.class );
          ArchiveLoader archiveLoader = new ArchiveLoader( importer );
          archiveLoader.loadAll( directory, ArchiveLoader.ZIPS_FILTER );
          return null;
        }
      } );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.services.importer.IPlatformImporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.