Package org.pentaho.platform.plugin.services.importexport

Examples of org.pentaho.platform.plugin.services.importexport.Exporter


    String path = repositoryFile.getPath();

    final InputStream is;

    try {
      Exporter exporter = getExporter();
      exporter.setRepoPath( path );
      exporter.setRepoWs( repoWs );

      File zipFile = exporter.doExportAsZip( repositoryFile );
      is = getFileInputStream( zipFile );
    } catch ( Exception e ) {
      return buildServerErrorResponse( e.toString() );
    }
View Full Code Here


  protected Response buildOkResponse( Object o, String s ) {
    return Response.ok( o, s ).build();
  }

  protected Exporter getExporter() {
    return new Exporter( repository );
  }
View Full Code Here

    RepositoryFile mockRepositoryFile = mock( RepositoryFile.class );

    String path = "path";
    doReturn( path ).when( mockRepositoryFile ).getPath();

    Exporter mockExporter = mock( Exporter.class );
    doReturn( mockExporter ).when( fileResource ).getExporter();

    File mockFile = mock( File.class );
    doReturn( mockFile ).when( mockExporter ).doExportAsZip( mockRepositoryFile );
View Full Code Here

    // handle method calls
    when( unifiedRepository.getFile( REPO_PATH ) ).thenReturn( repositoryFile );

    // instantiate exporter here to reuse for each test
    exporter = new Exporter( unifiedRepository );
    exporter.setRepoPath( REPO_PATH );
    exporter.setFilePath( FILE_PATH );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.services.importexport.Exporter

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.