public class Importer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
protected ImporterProcessor |
processor
processor is responsible to do the actual import process
|
protected ImporterSpec |
spec
is determines the input format and configuration
|
| Constructor and Description |
|---|
Importer(ImporterSpec spec) |
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCount() |
String |
getLastErrorMessage()
last error message that occured during import processing
|
Throwable |
getLastException()
last exception thrown and handled during import processing
|
ImporterProcessor |
getProcessor() |
int |
getRowCount() |
protected ImporterSpec |
getSpec() |
void |
importFrom(InputStream aStream)
API - this method starts the import process.
|
void |
importFrom(Reader aReader)
API - this method starts the import process.
|
boolean |
isCancelled() |
void |
log(Object obj)
log an info message to the importLog.
|
void |
setErrorWriter(Writer aErrorWriter)
set the writer where errorous data rows should be stored to.
|
protected static final org.slf4j.Logger log
protected final ImporterProcessor processor
protected final ImporterSpec spec
public Importer(ImporterSpec spec)
protected ImporterSpec getSpec()
public final void setErrorWriter(Writer aErrorWriter)
aErrorWriter - public void importFrom(Reader aReader) throws ImporterException
aReader - - reader to read the import data from.ExceptionImporterExceptionpublic void importFrom(InputStream aStream) throws ImporterException
aStream - - stream to read the import data from.ExceptionImporterExceptionpublic int getRowCount()
public int getErrorCount()
public boolean isCancelled()
public Throwable getLastException()
public String getLastErrorMessage()
public void log(Object obj)
public ImporterProcessor getProcessor()
Copyright © 2008-2016. All Rights Reserved.