Package cdc.impex.imports
Interface WorkbookImporter
-
- All Superinterfaces:
SheetImporter
- All Known Implementing Classes:
CheckedWorkbookImporter,VerboseWorkbookImporter
public interface WorkbookImporter extends SheetImporter
This interface adds workbook level notifications toSheetImporter.- Author:
- Damien Carbonne
-
-
Field Summary
Fields Modifier and Type Field Description static WorkbookImporterQUIET_VOIDstatic WorkbookImporterVERBOSE_VOID
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default voidbeginImport(String systemId, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler)Invoked to notify the beginning of import.default voidendImport(String systemId, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler)Invoked to notify the end of import.static WorkbookImporterfromDelegates(WorkbookImporter def, Function<String,SheetImporter> function)Creates a delegating workbook importer.static WorkbookImporterfromDelegates(WorkbookImporter def, Map<String,SheetImporter> map)Creates a delegating workbook importer.static WorkbookImporterfromDelegates(Function<String,SheetImporter> function)static WorkbookImporterfromDelegates(Map<String,SheetImporter> map)-
Methods inherited from interface cdc.impex.imports.SheetImporter
beginSheetImport, endSheetImport, importRow
-
-
-
-
Field Detail
-
QUIET_VOID
static final WorkbookImporter QUIET_VOID
-
VERBOSE_VOID
static final WorkbookImporter VERBOSE_VOID
-
-
Method Detail
-
beginImport
default void beginImport(String systemId, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler)
Invoked to notify the beginning of import.- Parameters:
systemId- The system if of the imported data.issuesHandler- The issues handler that should be used by the application to generate new issues.
-
endImport
default void endImport(String systemId, cdc.issues.IssuesHandler<cdc.issues.Issue> issuesHandler)
Invoked to notify the end of import.- Parameters:
systemId- The system if of the imported data.issuesHandler- The issues handler that should be used by the application to generate new issues.
-
fromDelegates
static WorkbookImporter fromDelegates(WorkbookImporter def, Function<String,SheetImporter> function)
Creates a delegating workbook importer.When the import of a sheet starts, an appropriate sheet importer is selected, if possible, among
delegates. If no appropriate sheet importer is found, the default workbook importer is used. The default will usually ignore things.- Parameters:
def- The default workbook importer.
It can beQUIET_VOID,VERBOSE_VOID, or any other valid WorkbookImporter.function- The function that maps template names to the associated sheet importers.- Returns:
- A new WorkbookImporter that delegates import if possible, or use the default workbook importer otherwise.
-
fromDelegates
static WorkbookImporter fromDelegates(Function<String,SheetImporter> function)
-
fromDelegates
static WorkbookImporter fromDelegates(WorkbookImporter def, Map<String,SheetImporter> map)
Creates a delegating workbook importer.- Parameters:
def- The default workbook importer.
It can beQUIET_VOID,VERBOSE_VOID, or any other valid WorkbookImporter.map- The map from template names to the associated sheet importers.- Returns:
- A new WorkbookImporter that delegates import if possible, or use the default workbook importer otherwise.
-
fromDelegates
static WorkbookImporter fromDelegates(Map<String,SheetImporter> map)
-
-