public abstract class AbstractExcelImExporter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Collection<ExcelTableManager> |
tableManagers |
| Constructor and Description |
|---|
AbstractExcelImExporter()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDataSetsToProcess(int aDataSetsToProcess) |
boolean |
addObserver(ExcelImExportObserver aExcelImExportObserver)
Adds an observer for the im- exporter.
|
protected void |
addProcessedDataSets(int aProcessedDataSets) |
static boolean |
addTableManager(ExcelTableManager aTableManager)
Adds a table manager to the list of supported table managers for the im-
/ exporter.
|
protected void |
calculateProgress()
Calculates the progress percentage.
|
protected void |
finishDataSetProcess()
Increases the number of processed data sets by one.
|
protected void |
finishSubRun()
Increases the number of finished sub runs by one.
|
static void |
generateCleanMappingFile(Path aFilePath,
String aTableName)
A helper method to generate a mapping file for a table.
The mapping format is: "column name": "field name". |
static void |
generateCleanMappingFile(String aFilePath,
String aTableName)
Deprecated.
Use
generateCleanMappingFile(Path, String) instead. |
protected org.apache.commons.collections4.BidiMap<String,String> |
loadMapping(Path aMappingFilePath)
Loads the mapping from a mapping file.
|
protected org.apache.commons.collections4.BidiMap<String,String> |
loadMapping(String aMappingFilePath)
Deprecated.
Use
loadMapping(Path) instead. |
protected void |
postError(ExcelImExporterError aError)
Posts an error for the observers.
|
protected void |
postWarning(ExcelImExporterWarning aWarning)
Posts an warning for the observers.
|
boolean |
removeObserver(ExcelImExportObserver aExcelImExportObserver)
Removes an observer.
|
static boolean |
removeTableManager(ExcelTableManager aTableManager)
Removes a table manager.
|
protected static Optional<ExcelTableManager> |
searchTableManager(String aTableName)
Searches for a table manager for a table with the given table name.
|
protected void |
setSubRuns(int aSubRuns) |
protected void |
updateProgress()
Updates the percentage for each observer.
|
protected static final Collection<ExcelTableManager> tableManagers
public AbstractExcelImExporter()
public static boolean addTableManager(ExcelTableManager aTableManager)
aTableManager - The table manager which should be added.Collection.add(Object)@Deprecated public static void generateCleanMappingFile(String aFilePath, String aTableName) throws IOException
generateCleanMappingFile(Path, String) instead.aFilePath - The path where the mapping file should be saved.aTableName - The table name for which the file should be generated.IOException - if the file can't be written.IllegalArgumentException - if no table with the given table name is available for im- or
export.public static void generateCleanMappingFile(Path aFilePath, String aTableName) throws IOException
aFilePath - The path where the mapping file should be saved.aTableName - The table name for which the file should be generated.IOException - if the file can't be written.IllegalArgumentException - if no table with the given table name is available for im- or
export.public static boolean removeTableManager(ExcelTableManager aTableManager)
aTableManager - The table manager which should be removed.Collection.remove(Object)protected static Optional<ExcelTableManager> searchTableManager(String aTableName)
aTableName - The table name for which a table manager should be searched.Optional with the search result.public boolean addObserver(ExcelImExportObserver aExcelImExportObserver)
aExcelImExportObserver - The observer which should be added.Collection.add(Object)public boolean removeObserver(ExcelImExportObserver aExcelImExportObserver)
aExcelImExportObserver - The observer which should be removed.Collection.remove(Object)protected void addDataSetsToProcess(int aDataSetsToProcess)
protected void addProcessedDataSets(int aProcessedDataSets)
protected void calculateProgress()
protected void finishDataSetProcess()
protected void finishSubRun()
@Deprecated protected org.apache.commons.collections4.BidiMap<String,String> loadMapping(String aMappingFilePath) throws ExcelImExporterException
loadMapping(Path) instead.aMappingFilePath - The path to the mapping file.ExcelImExporterException - will be thrown if the mapping file is invalid.protected org.apache.commons.collections4.BidiMap<String,String> loadMapping(Path aMappingFilePath) throws ExcelImExporterException
aMappingFilePath - The path to the mapping file.ExcelImExporterException - will be thrown if the mapping file is invalid.protected void postError(ExcelImExporterError aError)
aError - The error which should be posted.protected void postWarning(ExcelImExporterWarning aWarning)
aWarning - The warning which should be posted.protected void setSubRuns(int aSubRuns)
protected void updateProgress()
Copyright © 2019. All rights reserved.