com.agimatec.utility.fileimport
Class ImporterProcessor

java.lang.Object
  extended by com.agimatec.utility.fileimport.ImporterProcessor
Direct Known Subclasses:
LineImportProcessor, XmlImportProcessor

public abstract class ImporterProcessor
extends Object

Description: common implementation to do the import process
User: roman.stumm
Date: 22.11.2007
Time: 11:56:47
Copyright: Agimatec GmbH


Field Summary
protected  boolean cancelled
           
protected  int errorCount
           
protected  Importer importer
           
protected  Object lastError
           
protected  int rowCount
           
 
Constructor Summary
protected ImporterProcessor(Importer importer)
           
 
Method Summary
 int getErrorCount()
           
 Writer getErrorWriter()
           
 Importer getImporter()
           
 Object getLastError()
           
 int getRowCount()
           
protected abstract  ImporterSpec getSpec()
           
protected  void handleException(Exception ex)
           
protected  void handleRowException(Exception iex, Object aLine)
          overwrite in subclasses for different exception handling
protected  void importFrom(Closeable aReader)
           
 boolean isCancelled()
           
 void log(Object obj)
           
protected  void logFinished()
           
 void release()
           
 void setCancelled(boolean cancelled)
           
 void setErrorWriter(Writer aErrorWriter)
           
 void setLastError(Object lastError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

importer

protected final Importer importer

errorCount

protected int errorCount

rowCount

protected int rowCount

cancelled

protected boolean cancelled

lastError

protected Object lastError
Constructor Detail

ImporterProcessor

protected ImporterProcessor(Importer importer)
Method Detail

getSpec

protected abstract ImporterSpec getSpec()

getImporter

public Importer getImporter()

isCancelled

public boolean isCancelled()

getErrorCount

public int getErrorCount()

getRowCount

public int getRowCount()

getLastError

public Object getLastError()

setLastError

public void setLastError(Object lastError)

getErrorWriter

public Writer getErrorWriter()
                      throws IOException
Throws:
IOException

setErrorWriter

public void setErrorWriter(Writer aErrorWriter)

log

public void log(Object obj)

importFrom

protected void importFrom(Closeable aReader)

setCancelled

public void setCancelled(boolean cancelled)

logFinished

protected void logFinished()

release

public void release()

handleException

protected void handleException(Exception ex)
                        throws ImporterException
Throws:
ImporterException

handleRowException

protected void handleRowException(Exception iex,
                                  Object aLine)
overwrite in subclasses for different exception handling



Copyright © 2008-2011. All Rights Reserved.