Class CSVImportTemplateSpec
java.lang.Object
com.orchestranetworks.addon.dint.template.TemplateSpec<ST,TT>
com.orchestranetworks.addon.dint.template.ImportExportTemplateSpec<CSVSourceTable,EBXTargetTable>
com.orchestranetworks.addon.dint.template.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
ConstructorDescriptionCSVImportTemplateSpec
(TemplateConfig<CSVSourceTable, EBXTargetTable> templateConfig, File sourceFile, com.orchestranetworks.service.Session session) Constructs a newCSVImportTemplateSpec
instance.CSVImportTemplateSpec
(String templateId, File sourceFile, com.orchestranetworks.service.Session session) Constructs a newCSVImportTemplateSpec
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureProcedure
(Consumer<com.orchestranetworks.service.ProcedureContext> config) Configures theProcedureContext
instance when writing in EBX.Deprecated.Returns the folder where the files that contain invalid records are stored.Returns the common prefix for the file name.Returns the common suffix for the file name.Consumer<com.orchestranetworks.service.ProcedureContext>
Returns theProcedureContext
configuration ornull
.Returns the source file.void
setInvalidDataFolder
(File folder) Sets the folder where the files that contain invalid records are stored.void
setInvalidDataFolder
(File invalidDataFolder, String invalidFilePrefix, String invalidFileSuffix) Sets the folder where the files that contain invalid records are stored.Methods inherited from class com.orchestranetworks.addon.dint.template.ImportExportTemplateSpec
getDataset, setDataset
Methods inherited from class com.orchestranetworks.addon.dint.template.TemplateSpec
getSession, getTemplateConfig, getTemplateId
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 Details
-
CSVImportTemplateSpec
public CSVImportTemplateSpec(String templateId, File sourceFile, com.orchestranetworks.service.Session session) Constructs a newCSVImportTemplateSpec
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:
IllegalArgumentException
- If any parameter isnull
or source file does not exist.
-
CSVImportTemplateSpec
public CSVImportTemplateSpec(TemplateConfig<CSVSourceTable, EBXTargetTable> templateConfig, File sourceFile, com.orchestranetworks.service.Session session) Constructs a newCSVImportTemplateSpec
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:
IllegalArgumentException
- If any parameter isnull
or source file does not exist.- Since:
- 4.5.0
-
-
Method Details
-
getCSVFile
Deprecated.Since v4.3.2, usegetSourceFile()
instead.Returns the source file. -
getSourceFile
Returns the source file.- Since:
- 4.3.2
-
configureProcedure
Configures theProcedureContext
instance when writing in EBX.- Since:
- 4.5.0
- See Also:
-
Procedure.execute(ProcedureContext)
-
getProcedureConfig
Returns theProcedureContext
configuration ornull
.- Since:
- 4.5.0
- See Also:
-
Procedure.execute(ProcedureContext)
-
getInvalidDataFolder
Returns the folder where the files that contain invalid records are stored.- Since:
- 4.5.0
-
setInvalidDataFolder
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(File invalidDataFolder, String invalidFilePrefix, String invalidFileSuffix) Sets the folder where the files that contain invalid records are stored.- Since:
- 4.5.0
-
getInvalidFileNamePrefix
Returns the common prefix for the file name.- Since:
- 4.5.0
-
getInvalidFileNameSuffix
Returns the common suffix for the file name.- Since:
- 4.5.0
-
getSourceFile()
instead.