Class CSVImportTemplateSpec

  • All Implemented Interfaces:
    com.orchestranetworks.addon.dint.dataconnector.spec.InvalidDataFileCSVFileValidator

    public final class CSVImportTemplateSpec
    extends ImportExportTemplateSpec<CSVSourceTable,​EBXTargetTable>
    implements com.orchestranetworks.addon.dint.dataconnector.spec.InvalidDataFileCSVFileValidator
    Template specification for CSV import.
    Since:
    4.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CSVImportTemplateSpec​(TemplateConfig<CSVSourceTable,​EBXTargetTable> templateConfig, java.io.File sourceFile, com.orchestranetworks.service.Session session)
      Constructs a new CSVImportTemplateSpec instance.
      CSVImportTemplateSpec​(java.lang.String templateId, java.io.File sourceFile, com.orchestranetworks.service.Session session)
      Constructs a new CSVImportTemplateSpec instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void configureProcedure​(java.util.function.Consumer<com.orchestranetworks.service.ProcedureContext> config)
      Configures the ProcedureContext instance when writing in EBX.
      java.io.File getCSVFile()
      Deprecated.
      Since v4.3.2, use getSourceFile() instead.
      java.io.File getInvalidDataFolder()
      Returns the folder where the files that contain invalid records are stored.
      java.lang.String getInvalidFileNamePrefix()
      Returns the common prefix for the file name.
      java.lang.String getInvalidFileNameSuffix()
      Returns the common suffix for the file name.
      java.util.function.Consumer<com.orchestranetworks.service.ProcedureContext> getProcedureConfig()
      Returns the ProcedureContext configuration or null.
      java.io.File getSourceFile()
      Returns the source file.
      void setInvalidDataFolder​(java.io.File folder)
      Sets the folder where the files that contain invalid records are stored.
      void setInvalidDataFolder​(java.io.File invalidDataFolder, java.lang.String invalidFilePrefix, java.lang.String invalidFileSuffix)
      Sets the folder where the files that contain invalid records are stored.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.orchestranetworks.addon.dint.dataconnector.spec.InvalidDataFileCSVFileValidator

        validate, validateFolder
    • Constructor Detail

      • CSVImportTemplateSpec

        public CSVImportTemplateSpec​(java.lang.String templateId,
                                     java.io.File sourceFile,
                                     com.orchestranetworks.service.Session session)
        Constructs a new CSVImportTemplateSpec instance.
        Parameters:
        templateId - The unique template id.
        sourceFile - The source CSV file for import on table, or the archive file for import on dataset.
        session - The session.
        Throws:
        java.lang.IllegalArgumentException - If any parameter is null or source file does not exist.
      • CSVImportTemplateSpec

        public CSVImportTemplateSpec​(TemplateConfig<CSVSourceTable,​EBXTargetTable> templateConfig,
                                     java.io.File sourceFile,
                                     com.orchestranetworks.service.Session session)
        Constructs a new CSVImportTemplateSpec instance.
        Parameters:
        templateConfig - The template configuration.
        sourceFile - The source CSV file when importing a table, or the archive file when importing a dataset.
        session - The session.
        Throws:
        java.lang.IllegalArgumentException - If any parameter is null or source file does not exist.
        Since:
        4.5.0
    • Method Detail

      • getCSVFile

        @Deprecated
        public java.io.File getCSVFile()
        Deprecated.
        Since v4.3.2, use getSourceFile() instead.
        Returns the source file.
      • getSourceFile

        public java.io.File getSourceFile()
        Returns the source file.
        Since:
        4.3.2
      • configureProcedure

        public void configureProcedure​(java.util.function.Consumer<com.orchestranetworks.service.ProcedureContext> config)
        Configures the ProcedureContext instance when writing in EBX.
        Since:
        4.5.0
        See Also:
        Procedure.execute(ProcedureContext)
      • getProcedureConfig

        public java.util.function.Consumer<com.orchestranetworks.service.ProcedureContext> getProcedureConfig()
        Returns the ProcedureContext configuration or null.
        Since:
        4.5.0
        See Also:
        Procedure.execute(ProcedureContext)
      • getInvalidDataFolder

        public java.io.File getInvalidDataFolder()
        Returns the folder where the files that contain invalid records are stored.
        Since:
        4.5.0
      • setInvalidDataFolder

        public void setInvalidDataFolder​(java.io.File folder)
        Sets the folder where the files that contain invalid records are stored.

        The file names have no prefix nor suffix.

        Since:
        4.5.0
      • setInvalidDataFolder

        public void setInvalidDataFolder​(java.io.File invalidDataFolder,
                                         java.lang.String invalidFilePrefix,
                                         java.lang.String invalidFileSuffix)
        Sets the folder where the files that contain invalid records are stored.
        Since:
        4.5.0
      • getInvalidFileNamePrefix

        public java.lang.String getInvalidFileNamePrefix()
        Returns the common prefix for the file name.
        Since:
        4.5.0
      • getInvalidFileNameSuffix

        public java.lang.String getInvalidFileNameSuffix()
        Returns the common suffix for the file name.
        Since:
        4.5.0