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
Constructors Constructor Description CSVImportTemplateSpec(TemplateConfig<CSVSourceTable,EBXTargetTable> templateConfig, java.io.File sourceFile, com.orchestranetworks.service.Session session)
Constructs a newCSVImportTemplateSpec
instance.CSVImportTemplateSpec(java.lang.String templateId, java.io.File sourceFile, com.orchestranetworks.service.Session session)
Constructs a newCSVImportTemplateSpec
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 theProcedureContext
instance when writing in EBX.java.io.File
getCSVFile()
Deprecated.Since v4.3.2, usegetSourceFile()
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 theProcedureContext
configuration ornull
.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 com.orchestranetworks.addon.dint.template.ImportExportTemplateSpec
getDataset, setDataset
-
Methods inherited from class com.orchestranetworks.addon.dint.template.TemplateSpec
getSession, getTemplateConfig, getTemplateId
-
-
-
-
Constructor Detail
-
CSVImportTemplateSpec
public CSVImportTemplateSpec(java.lang.String templateId, java.io.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:
java.lang.IllegalArgumentException
- If any parameter isnull
or source file does not exist.
-
CSVImportTemplateSpec
public CSVImportTemplateSpec(TemplateConfig<CSVSourceTable,EBXTargetTable> templateConfig, java.io.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:
java.lang.IllegalArgumentException
- If any parameter isnull
or source file does not exist.- Since:
- 4.5.0
-
-
Method Detail
-
getCSVFile
@Deprecated public java.io.File getCSVFile()
Deprecated.Since v4.3.2, usegetSourceFile()
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 theProcedureContext
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 theProcedureContext
configuration ornull
.- 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
-
-