SimpleExportProcessor extends BaseExportProcessor { public File performExport( RepositoryFile exportRepositoryFile ) throws ExportException, IOException { OutputStream os; File exportFile = null; exportFile = File.createTempFile( EXPORT_TEMP_FILENAME_PREFIX, EXPORT_TEMP_FILENAME_EXT ); exportFile.deleteOnExit(); String filePath = new File( this.path ).getParent(); if ( exportRepositoryFile == null ) { throw new FileNotFoundException( "JCR file not found: " + this.path ); } os = new FileOutputStream( exportFile ); try { exportFile( exportRepositoryFile, os, filePath ); } catch ( Exception e ) { log.error( e.getMessage() ); throw ( new ExportException() ); } finally { os.close(); } os = null; return exportFile; } SimpleExportProcessor( String path, IUnifiedRepository repository ); File performExport( RepositoryFile exportRepositoryFile ); @Override void exportDirectory( RepositoryFile repositoryDir, OutputStream outputStream, String filePath ); @Override void exportFile( RepositoryFile repositoryFile, OutputStream outputStream, String filePath );  }
@Test public void testPerformExportWithManifest() throws Exception { SimpleExportProcessor simpleExportProcessor = new SimpleExportProcessor( path, unifiedRepository ); simpleExportProcessor.addExportHandler( defaultExportHandler ); File resultFile = simpleExportProcessor.performExport( repositoryFile ); assertNotNull( resultFile ); }