use of org.pentaho.di.trans.step.errorhandling.CompositeFileErrorHandler in project pentaho-kettle by pentaho.
the class ExcelInput method initErrorHandling.
private void initErrorHandling() {
List<FileErrorHandler> errorHandlers = new ArrayList<FileErrorHandler>(2);
if (meta.getLineNumberFilesDestinationDirectory() != null) {
errorHandlers.add(new FileErrorHandlerContentLineNumber(getTrans().getCurrentDate(), environmentSubstitute(meta.getLineNumberFilesDestinationDirectory()), meta.getLineNumberFilesExtension(), "Latin1", this));
}
if (meta.getErrorFilesDestinationDirectory() != null) {
errorHandlers.add(new FileErrorHandlerMissingFiles(getTrans().getCurrentDate(), environmentSubstitute(meta.getErrorFilesDestinationDirectory()), meta.getErrorFilesExtension(), "Latin1", this));
}
data.errorHandler = new CompositeFileErrorHandler(errorHandlers);
}
use of org.pentaho.di.trans.step.errorhandling.CompositeFileErrorHandler in project pentaho-kettle by pentaho.
the class TextFileInput method initErrorHandling.
private void initErrorHandling() {
List<FileErrorHandler> dataErrorLineHandlers = new ArrayList<FileErrorHandler>(2);
if (meta.getLineNumberFilesDestinationDirectory() != null) {
dataErrorLineHandlers.add(new FileErrorHandlerContentLineNumber(getTrans().getCurrentDate(), environmentSubstitute(meta.getLineNumberFilesDestinationDirectory()), meta.getLineNumberFilesExtension(), meta.getEncoding(), this));
}
if (meta.getErrorFilesDestinationDirectory() != null) {
dataErrorLineHandlers.add(new FileErrorHandlerMissingFiles(getTrans().getCurrentDate(), environmentSubstitute(meta.getErrorFilesDestinationDirectory()), meta.getErrorLineFilesExtension(), meta.getEncoding(), this));
}
data.dataErrorLineHandler = new CompositeFileErrorHandler(dataErrorLineHandlers);
}
use of org.pentaho.di.trans.step.errorhandling.CompositeFileErrorHandler in project pentaho-kettle by pentaho.
the class BaseFileInputStep method initErrorHandling.
/**
* Initialize error handling.
*
* TODO: should we set charset for error files from content meta ? What about case for automatic charset ?
*/
private void initErrorHandling() {
List<FileErrorHandler> dataErrorLineHandlers = new ArrayList<FileErrorHandler>(2);
if (meta.errorHandling.lineNumberFilesDestinationDirectory != null) {
dataErrorLineHandlers.add(new FileErrorHandlerContentLineNumber(getTrans().getCurrentDate(), environmentSubstitute(meta.errorHandling.lineNumberFilesDestinationDirectory), meta.errorHandling.lineNumberFilesExtension, meta.getEncoding(), this));
}
if (meta.errorHandling.errorFilesDestinationDirectory != null) {
dataErrorLineHandlers.add(new FileErrorHandlerMissingFiles(getTrans().getCurrentDate(), environmentSubstitute(meta.errorHandling.errorFilesDestinationDirectory), meta.errorHandling.errorFilesExtension, meta.getEncoding(), this));
}
data.dataErrorLineHandler = new CompositeFileErrorHandler(dataErrorLineHandlers);
}
Aggregations