Package com.orchestranetworks.addon.adix
package com.orchestranetworks.addon.adix
Classes and interfaces to call Adix import and export.
Example of an Adix import
ImportDataAccessSpec dataAccessSpec=new ImportDataAccessSpec(dataset,currentTable,locale,session); AdixImportSpec importSpec = new AdixImportSpec(); File importedFile = new File(importedFilePath); importSpec.setDataAccessSpec(dataAccessSpec); importSpec.setImportedFile(importedFile); importSpec.setImportPreference(importPreferenceName); importSpec.setImportType(ImportType.CSV); AdixImportResult importResult = AdixFactory.getAdixImport().execute(importSpec);
Example of an Adix export
ExportDataAccessSpec dataAccessSpec = new ExportDataAccessSpec(dataset,currentTable,locale,session); AdixExportSpec exportSpec = new AdixExportSpec(); exportSpec.setDataAccessSpec(dataAccessSpec); exportSpec.setExportPreference(exportPreferenceName); exportSpec.setImportPreference(importPreferenceName); exportSpec.setExportType(ExportType.EXCEL_FOR_SINGLE_TABLE); AdixExportResult exportResult = AdixFactory.getAdixExport().execute(exportSpec);
Example of an Adix export using data filter
List<ExportTableFilter> exportTableFilters = new ArrayList<ExportTableFilter>(); ExportTableFilter tableFilter = new ExportTableFilter(); tableFilter.setTablePath(tablePath); tableFilter.setPredicate(predicate); tableFilter.setSchemaNodes(schemaNodes); exportTableFilters.add(tableFilter); ExportDataAccessSpec dataAccessSpec = new ExportDataAccessSpec(currentTable,exportTableFilters,session); AdixExportSpec exportSpec = new AdixExportSpec(); exportSpec.setDataAccessSpec(dataAccessSpec); exportSpec.setExportPreference(exportPreferenceName); exportSpec.setImportPreference(importPreferenceName); exportSpec.setExportType(ExportType.EXCEL_FOR_SINGLE_TABLE); AdixExportResult exportResult = AdixFactory.getAdixExport().execute(exportSpec);
Example of creating a transformer class
Firstly, create a transformer class.
For example:
public final class TransformerExample implements Transformer { public Object getValueOnExport(TransformContextForExport context) { return context.getValueInTable(); } public Object getValueOnImport(TransformContextForImport context) { return context.getValueInSpreadsheet(); } }
Next, declare the transformer definition.
TransformerDefinition transformerDefinition = new TransformerDefinition( TransformerExample.class, UserMessage.createInfo("Transformer example"), UserMessage.createInfo("Transformer example"));
Finally, register this transformer.
TransformerCatalog.add(transformerDefinition,repository);
-
ClassDescriptionDefines an Adix add-on exception.Deprecated.Deprecated.Since 2.3.0, replaced by
DataExchangeResult
.Deprecated.Since 2.3.0, replaced byDataExchangeSpec
.Deprecated.Since 2.3.0, replaced byDataExchangeServiceFactory
.Deprecated.Since 2.3.0, replaced byDataExchangeService
.Deprecated.Since 2.3.0, replaced byDataExchangeResult
.Deprecated.Since 2.3.0, replaced byImportResult
.Deprecated.Since 2.3.0, replaced byDataExchangeSpec
.Deprecated.Since 2.3.0, replaced byDataExchangeSpec
.Deprecated.Since 2.3.0, replaced byExportConfigurationSpec
.Deprecated.Since 2.3.0, replaced byTableFilter
.Deprecated.Since 2.3.0, replaced byServiceType
.Deprecated.Since 2.3.0, replaced byImportConfigurationSpec
.Deprecated.Since 2.3.0, replaced byServiceType
.Deprecated.Since 2.3.0, replaced byTransformationExecutionContext
.Deprecated.Since 2.3.0, replaced byTransformationExecutionContext
.Deprecated.Since 2.3.0, replaced byTransformation
.Deprecated.Since 2.3.0, replaced byTransformationCatalog
.Deprecated.Since 2.3.0, replaced byTransformationDefinition
.
DataExchangeService
.