Package cdc.impex.api

Interface Importer


  • public interface Importer
    Interface implemented by classes that can analyze a file to prepare data for import.

    An importer analyzes input files, detects issues in them, find the appropriate template, and calls the passed ImportHandler.

    Author:
    Damien Carbonne
    • Method Detail

      • importData

        void importData​(File file,
                        Set<SheetTemplate> templates,
                        ImportHandler importHandler,
                        cdc.issues.api.IssuesHandler<ImportIssueType> issuesHandler)
                 throws IOException
        Invoked to analyze a file that contains data to import.
        Parameters:
        file - The file to import.
        templates - The templates for which matching sheets must be loaded.
        Non-matching sheets are ignored.
        importHandler - The import handler.
        issuesHandler - The issues handler.
        Throws:
        IllegalArgumentException - When file, templates, importHandler or issuesHandler is null.
        IOException - When an IO error occurs.