public AuditFileEntry() { File auditDir = new File( PentahoSystem.getApplicationContext().getFileOutputPath( AuditFileEntry.auditDirPath ) ); if ( !auditDir.exists() ) { auditDir.mkdirs(); } else if ( !auditDir.isDirectory() ) { Logger.error( this, Messages.getInstance().getErrorString( "AUDFILEENT.ERROR_0001_AUDIT_PATH_NOT_DIRECTORY", AuditFileEntry.auditDirPath ) ); //$NON-NLS-1$ return; } AuditFileEntry.auditFile = new File( auditDir, AuditFileEntry.auditFileName ); if ( "\\t".equals( AuditFileEntry.ID_SEPARATOR ) ) { //$NON-NLS-1$ AuditFileEntry.ID_SEPARATOR = "\t"; //$NON-NLS-1$ } }
protected OutputStream getOutputStream( String testName, String extension ) { OutputStream outputStream = null; try { String tmpDir = PentahoSystem.getApplicationContext().getFileOutputPath( "test/tmp" ); //$NON-NLS-1$ File file = new File( tmpDir ); file.mkdirs(); String path = PentahoSystem.getApplicationContext().getFileOutputPath( "test/tmp/" + testName + extension ); //$NON-NLS-1$ outputStream = new FileOutputStream( path ); } catch ( FileNotFoundException e ) { // ignored } return outputStream; }
protected InputStream getInputStreamFromOutput( String testName, String extension ) { String path = PentahoSystem.getApplicationContext().getFileOutputPath( "test/tmp/" + testName + extension ); //$NON-NLS-1$ File f = new File( path ); if ( f.exists() ) { try { FileInputStream fis = new FileInputStream( f ); return fis; } catch ( Exception ignored ) { return null; } } else { return null; } }
protected InputStream getInputStreamFromOutput( String solnPath, String testName, String extension ) { String path = PentahoSystem.getApplicationContext().getFileOutputPath( solnPath + "test/tmp/" + testName + extension ); //$NON-NLS-1$ File f = new File( path ); if ( f.exists() ) { try { FileInputStream fis = new FileInputStream( f ); return fis; } catch ( Exception ignored ) { return null; } } else { return null; } }
protected OutputStream getOutputStream( String solnPath, String testName, String extension ) { OutputStream outputStream = null; try { IApplicationContext appContext = PentahoSystem.getApplicationContext(); String outputPath = solnPath + "/test/tmp"; //$NON-NLS-1$ String tmpDir = appContext.getFileOutputPath( outputPath ); // String tmpDir = PentahoSystem.getApplicationContext().getFileOutputPath(SOLUTION_PATH +"test/tmp"); // //$NON-NLS-1$ File file = new File( tmpDir ); file.mkdirs(); String path = PentahoSystem.getApplicationContext().getFileOutputPath( solnPath + "/test/tmp/" + testName + extension ); //$NON-NLS-1$ outputStream = new FileOutputStream( path ); } catch ( FileNotFoundException e ) { // ignored } return outputStream; }
String filePath = PentahoSystem.getApplicationContext().getFileOutputPath( fileName ); JFreeChartEngine.saveChart( chart, filePath, width, height, outputType, writer, info ); } catch ( IOException e ) {
InputStream tmpFileStream = null; String filePath = PentahoSystem.getApplicationContext().getFileOutputPath( "test/tmp/" + testName + extension ); //$NON-NLS-1$ try { File file = new File( filePath ); filePath = PentahoSystem.getApplicationContext().getFileOutputPath( "test/golden/" + testName + extension ); //$NON-NLS-1$ try { File file = new File( filePath );