Interface WorkbookImporter

    • 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 be QUIET_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​(WorkbookImporter def,
                                              Map<String,​SheetImporter> map)
        Creates a delegating handler.
        Parameters:
        def - The default sheet importer.
        It can be QUIET_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.