Table of Contents

Class DynamicwebProvider

Namespace
Dynamicweb.DataIntegration.Providers.DynamicwebProvider
Assembly
Dynamicweb.DataIntegration.dll
[AddInName("Dynamicweb.DataIntegration.Providers.Provider")]
[AddInLabel("Dynamicweb Provider")]
[AddInDescription("Dynamicweb provider")]
[AddInIgnore(false)]
[AddInUseParameterOrdering(true)]
public class DynamicwebProvider : BaseSqlProvider, IParameterizedDestination, IParameterOptions, IParameterVisibility, ISource, IDestination, IDisposable
Inheritance
DynamicwebProvider
Implements
Inherited Members
Extension Methods

Constructors

DynamicwebProvider()

public DynamicwebProvider()

DynamicwebProvider(string)

public DynamicwebProvider(string connectionString)

Parameters

connectionString string

DynamicwebProvider(XmlNode)

public DynamicwebProvider(XmlNode xmlNode)

Parameters

xmlNode XmlNode

Properties

Connection

protected SqlConnection Connection { get; set; }

Property Value

SqlConnection

DeactivateMissingProducts

[AddInParameter("Deactivate missing products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=When ON missing products are deactivated. When OFF no action is taken")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(30)]
public bool DeactivateMissingProducts { get; set; }

Property Value

bool

DefaultLanguage

[AddInParameter("Default Language")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "none=true;")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(10)]
public string DefaultLanguage { get; set; }

Property Value

string

DeleteIncomingItems

[AddInParameter("Delete incoming rows")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Deletes existing rows present in the import source. When Delete incoming rows is ON, the following options are skipped: Update only existing records, Deactivate missing products, Remove missing rows after import, Delete products / groups for languages included in input, Hide deactivated products")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(50)]
public bool DeleteIncomingItems { get; set; }

Property Value

bool

DeleteProductsAndGroupForSpecificLanguage

[AddInParameter("Delete products/groups for languages included in input")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Deletes products and groups only from the languages included in the import. If Delete incoming rows is ON, Delete products / groups for languages included in input is skipped")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(60)]
public bool DeleteProductsAndGroupForSpecificLanguage { get; set; }

Property Value

bool

DiscardDuplicates

[AddInParameter("Discard duplicates")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=When ON, duplicate rows are skipped")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(70)]
public bool DiscardDuplicates { get; set; }

Property Value

bool

HideDeactivatedProducts

[AddInParameter("Hide deactivated products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=When Deactivate missing products is ON, this option hides the deactivated products. If Delete incoming rows is ON, Hide deactivated products is skipped. If Deactivate missing products is OFF, Hide deactivated products is skipped")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(80)]
public bool HideDeactivatedProducts { get; set; }

Property Value

bool

InsertOnlyNewRecords

[AddInParameter("Insert only new records")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Inserts new records present in the source, but does not update existing records")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(23)]
public bool InsertOnlyNewRecords { get; set; }

Property Value

bool

IsFirstJobRun

protected bool IsFirstJobRun { get; set; }

Property Value

bool

PartialUpdate

This property is used to remove rows from the EcomGroupProductRelationsTable, but only for the products that are being imported. It can be set in the job settings xml file in the config section

public virtual bool PartialUpdate { get; set; }

Property Value

bool

RemoveMissingAfterImport

[AddInParameter("Remove missing rows after import")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Deletes rows from each destination table individually, based on whether they are present in the corresponding source table. This setting looks at each table separately and removes rows missing from the source for that specific table. When Delete incoming rows is ON, this option is ignored")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(40)]
public bool RemoveMissingAfterImport { get; set; }

Property Value

bool

RemoveMissingAfterImportDestinationTablesOnly

[AddInParameter("Remove missing rows after import in the destination tables only")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Deletes rows not present in the import source - excluding related tabled")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(35)]
public bool RemoveMissingAfterImportDestinationTablesOnly { get; set; }

Property Value

bool

RemoveMissingRows

[AddInParameter("Remove missing rows across all tables after import")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Deletes rows from all destination tables and relation tables by considering the entire dataset in the import source. This setting evaluates all tables collectively and removes rows missing across the whole activity.")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(45)]
public bool RemoveMissingRows { get; set; }

Property Value

bool

Shop

[AddInParameter("Shop")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "none=true;")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(20)]
public string? Shop { get; set; }

Property Value

string

SkipFailingRows

[AddInParameter("Persist successful rows and skip failing rows")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=Checking this box allows the activity to do partial imports by skipping problematic records and keeping the succesful ones")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(100)]
public bool SkipFailingRows { get; set; }

Property Value

bool

SqlConnectionString

protected string? SqlConnectionString { get; set; }

Property Value

string

UpdateOnlyExistingRecords

[AddInParameter("Update only existing records")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Tooltip=When this option is ON the imported rows are updated but not inserted. When OFF rows are updated and inserted")]
[AddInParameterGroup("Destination")]
[AddInParameterOrder(25)]
public bool UpdateOnlyExistingRecords { get; set; }

Property Value

bool

UserKeyField

public string? UserKeyField { get; set; }

Property Value

string

Methods

Close()

Close the provider and release resources (connections, file handles, etc.). Should be safe to call multiple times (idempotent).

public override void Close()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

GetHiddenParameterNames(string, object?)

public IEnumerable<string> GetHiddenParameterNames(string parameterName, object? parameterValue)

Parameters

parameterName string
parameterValue object

Returns

IEnumerable<string>

GetOriginalDestinationSchema()

Gets the schema from the Destination Source

public override Schema GetOriginalDestinationSchema()

Returns

Schema

GetOriginalSourceSchema()

Fetch the most recent schema directly from the source (unmodified, live).

This should return a fresh representation of the source structure and may perform expensive I/O. Use it when you explicitly need the authoritative source schema regardless of any cached/persisted schema.

public override Schema GetOriginalSourceSchema()

Returns

Schema

A fresh Schema from the source.

GetParameterOptions(string)

public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)

Parameters

parameterName string

Returns

IEnumerable<ParameterOption>

GetReader(Mapping)

Create and return an ISourceReader for the provided mapping.

The returned reader must be initialized and ready to enumerate rows for the mapping. Implementations are responsible for any resource allocation; callers will close the reader.

public override ISourceReader GetReader(Mapping mapping)

Parameters

mapping Mapping

Mapping that configures what/how to read.

Returns

ISourceReader

An ISourceReader instance.

GetSchema()

Return the live Schema (tables + columns) for this source.

Implementer guidance:

  • Return a thread-safe, non-mutating Schema instance (or a defensive copy).
  • Prefer cached or lightweight responses to avoid repeated expensive I/O.
  • This method should reflect the source structure at the time of the call.

Note: schema access is centralized via GetSchema(ISource?). That service consults the SchemaManagementFeature and may use a persisted schema instead of invoking this method. Call this directly only when you need the live schema.

public override Schema GetSchema()

Returns

Schema

The source Schema describing tables and columns.

OverwriteDestinationSchemaToOriginal()

Replace the destination's current/cached schema with the latest schema from the destination.

Implementations should update any internal schema cache/state so subsequent calls to GetSchema() reflect the original schema returned by GetOriginalDestinationSchema().

public override void OverwriteDestinationSchemaToOriginal()

OverwriteSourceSchemaToOriginal()

Replace the provider's current/cached schema with the latest schema from the source.

Implementations should update any internal schema cache/state so subsequent calls to GetSchema() reflect the original schema returned by GetOriginalSourceSchema().

public override void OverwriteSourceSchemaToOriginal()

RunJob(Job)

Execute the job against this destination. The implementation performs the write/insert/update operations required by the job and returns true on success.

Implementations should be robust: validate inputs, log errors, and leave destination in a consistent state or perform appropriate rollback where applicable.

public override bool RunJob(Job job)

Parameters

job Job

Job to execute.

Returns

bool

True if the job completed successfully; otherwise false.

SaveAsXml(XmlTextWriter)

Persist provider settings to the supplied System.Xml.XmlTextWriter.

Implementations should write their configuration elements but must not close or dispose the writer.

public override void SaveAsXml(XmlTextWriter textWriter)

Parameters

textWriter XmlTextWriter

Xml writer to write settings into.

Serialize()

Serialize provider settings for use by AddinSelectors.

Output must be of the format <xxx>yyy</xxx>, where xxx is the parameter name (as defined by the decoration) and yyy is the value.

public override string Serialize()

Returns

string

XML fragment describing configured addin parameters.

UpdateDestinationSettings(IDestination)

Update this instance's settings to match the provided destination.

Used to copy settings between provider instances (for example when restoring from saved configuration).

public override void UpdateDestinationSettings(IDestination destination)

Parameters

destination IDestination

Destination instance to copy settings from.

UpdateSourceSettings(ISource)

Update this instance's settings to match the provided source.

Used to copy settings between provider instances (for example when restoring from saved configuration).

public override void UpdateSourceSettings(ISource source)

Parameters

source ISource

Source instance to copy settings from.

ValidateDestinationSettings()

Validates the destination settings. Used to validate properties when created by the AddinSelector.

public override string ValidateDestinationSettings()

Returns

string

ValidateSourceSettings()

Validate the source configuration.

Return an empty string for a valid configuration; otherwise return a human-readable error/validation message describing the problem.

public override string ValidateSourceSettings()

Returns

string

Empty string if valid; otherwise a validation error message.

To top