public class DefaultDumpHandler extends AbstractDumpHandler
DumpHeader using plain files as dump storage.| Constructor and Description |
|---|
DefaultDumpHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected CSVReader |
createReader()
Creates a new reader using last dump file as input.
|
protected CSVWriter |
createWriter()
Creates a new writer using a new created temp file as current dump file.
|
protected void |
deleteCurrentDump()
Deletes the file holding the current dump.
|
protected void |
deleteLastDump()
Deletes the file holding the last dump.
|
void |
finish(boolean saveCurrentDump)
Deletes last dump storage definitely and current one if given flag is set.
|
java.io.File |
getDumpAsFile()
Gets the current dump as file.
|
ImpExMedia |
getDumpAsMedia()
Gets the current dump as media object.
|
void |
init()
Initializes the handler by creating the first dump storage and providing a writer object to that storage when
calling
DumpHandler.getWriterOfCurrentDump(). |
protected void |
switchCurrentToLastDump()
Switches the reference of current dump file to last dump file.
|
void |
switchDump()
References the 'current' dump storage as 'last' dump storage (
DumpHandler.getReaderOfLastDump() now provides a reader
object to that storage) and creates a new 'current' dump storage (DumpHandler.getWriterOfCurrentDump() now provides a
writer object to that storage). |
getDumpAsString, getReaderOfLastDump, getWriterOfCurrentDump, setReaderOfLastDump, setWriterOfCurrentDumppublic void init()
throws java.io.IOException
DumpHandlerDumpHandler.getWriterOfCurrentDump().java.io.IOException - error while storage creationpublic void finish(boolean saveCurrentDump)
DumpHandlersaveCurrentDump - should the current storage be deletedpublic void switchDump()
throws ImpExException
DumpHandlerDumpHandler.getReaderOfLastDump() now provides a reader
object to that storage) and creates a new 'current' dump storage (DumpHandler.getWriterOfCurrentDump() now provides a
writer object to that storage). If there was a storage referenced by 'last' it will be deleted.ImpExException - error while storage handlingpublic java.io.File getDumpAsFile()
DumpHandlergetDumpAsFile in interface DumpHandlergetDumpAsFile in class AbstractDumpHandlerpublic ImpExMedia getDumpAsMedia()
DumpHandlergetDumpAsMedia in interface DumpHandlergetDumpAsMedia in class AbstractDumpHandlerprotected void deleteLastDump()
protected void deleteCurrentDump()
protected void switchCurrentToLastDump()
protected CSVReader createReader() throws java.io.IOException
java.io.IOException - error while accessing fileprotected CSVWriter createWriter() throws java.io.IOException
java.io.IOException - error while accessing fileCopyright © 2018 SAP SE. All Rights Reserved.