Package cdc.impex.api.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 Abstract Methods Modifier and Type Method Description voidbeginImport(String systemId, cdc.issues.api.IssuesHandler<? super ImportIssue> issuesHandler)Invoked to notify the beginning of import.voidendImport(String systemId, cdc.issues.api.IssuesHandler<? super ImportIssue> issuesHandler)Invoked to notify the end of import.static WorkbookImporterfromDelegates(WorkbookImporter def, Function<String,SheetImporter> function)Creates a delegating handler.static WorkbookImporterfromDelegates(WorkbookImporter def, Map<String,SheetImporter> map)Creates a delegating handler.static WorkbookImporterfromDelegates(Function<String,SheetImporter> function)static WorkbookImporterfromDelegates(Map<String,SheetImporter> map)-
Methods inherited from interface cdc.impex.api.imports.SheetImporter
beginSheetImport, endSheetImport, importRow
-
-
-
-
Field Detail
-
QUIET_VOID
static final WorkbookImporter QUIET_VOID
-
VERBOSE_VOID
static final WorkbookImporter VERBOSE_VOID
-
-
Method Detail
-
beginImport
void beginImport(String systemId, cdc.issues.api.IssuesHandler<? super ImportIssue> 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
void endImport(String systemId, cdc.issues.api.IssuesHandler<? super ImportIssue> 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 handler.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 import handler.
It can beQUIET_VOID,VERBOSE_VOID, or any other valid WorkbookImporter.function- The function that maps template names to the associated importers.- Returns:
- A new SheetImporter that delegates import if possible, or use the default handler otherwise.
-
fromDelegates
static WorkbookImporter fromDelegates(Function<String,SheetImporter> function)
-
fromDelegates
static WorkbookImporter fromDelegates(WorkbookImporter def, Map<String,SheetImporter> map)
Creates a delegating handler.- Parameters:
def- The default sheet importer.
It can beQUIET_VOID,VERBOSE_VOID, or any other valid WorkbookImporter.map- The map from template names to the associated importers.- Returns:
- A new SheetImporter that delegates import if possible, or use the default handler otherwise.
-
fromDelegates
static WorkbookImporter fromDelegates(Map<String,SheetImporter> map)
-
-