Table of Contents

Class BaseProvider

Namespace
Dynamicweb.DataIntegration
Assembly
Dynamicweb.DataIntegration.dll

Provides base functionality for source-destination data integration means. Any providers for integration MUST provide three constructors of types: Ctor(), Ctor(string filename) & Ctor(XmlNode xmlNode) as these are all called implicitly through reflection in the frontend and in the Job class.

[AddInName("Dynamicweb.DataIntegration.Providers.Provider")]
[AddInDescription("XML provider")]
public abstract class BaseProvider : ConfigurableAddIn, ISource, IDestination, IParameterizedDestination
Inheritance
BaseProvider
Implements
Derived
Inherited Members
Extension Methods

Properties

ABasePovider

protected BaseProvider ABasePovider { get; set; }

Property Value

BaseProvider

FilesFolderName

The Name of the files folder in the current installation of Dynamicweb. Empty if used for test.

public string FilesFolderName { get; set; }

Property Value

string

JobIsGoingToRun

Gets and sets "job is going to run" status

public bool JobIsGoingToRun { get; set; }

Property Value

bool

Logger

Logger

public ILogger Logger { get; set; }

Property Value

ILogger

Parameters

Parameters

public Dictionary<string, string> Parameters { get; set; }

Property Value

Dictionary<string, string>

SchemaIsEditable

Schema is editable

public virtual bool SchemaIsEditable { get; }

Property Value

bool

WorkingDirectory

Gets and sets working directory path

public virtual string WorkingDirectory { get; set; }

Property Value

string

Methods

CheckCondition(MappingConditional, Dictionary<string, object>)

Checks mapping conditionals

public bool CheckCondition(MappingConditional mappingConditional, Dictionary<string, object> row)

Parameters

mappingConditional MappingConditional

MappingConditionals

row Dictionary<string, object>

Returns

bool

Result of check

Close()

Closes this instance.

public virtual void Close()

CreateParameterNode(Type, string, string)

protected static XElement CreateParameterNode(Type type, string name, string value)

Parameters

type Type
name string
value string

Returns

XElement

GetDefaultValue(Type)

Gets the default value for the type

public static object GetDefaultValue(Type type)

Parameters

type Type

Returns

object

GetFailedSourceRowMessage(Dictionary<string, object>)

Gets the failed row data message

public static string GetFailedSourceRowMessage(Dictionary<string, object> row)

Parameters

row Dictionary<string, object>

Data row

Returns

string

The failed row data as string

GetOriginalDestinationSchema()

Gets the schema from the Destination Source

public virtual Schema GetOriginalDestinationSchema()

Returns

Schema

GetOriginalSourceSchema()

Get recent Source Tables Schema from source.

public virtual Schema GetOriginalSourceSchema()

Returns

Schema

GetReader(Mapping)

Gets the reader.

public virtual ISourceReader GetReader(Mapping mapping)

Parameters

mapping Mapping

The mapping.

Returns

ISourceReader

GetSchema()

Gets the schema.

public virtual Schema GetSchema()

Returns

Schema

Initialize()

Initializes this instance.

public virtual void Initialize()

IsSortable(Job, bool)

public virtual bool IsSortable(Job job, bool isSource)

Parameters

job Job
isSource bool

Returns

bool

LoadSettings(Job)

Loads from the input when the job is run.

This method is run when a job is run, before the actual data transfer takes place. The purpose is to allow settings for source and destination providers to be changed at runtime.

public virtual void LoadSettings(Job job)

Parameters

job Job

The job.

OverwriteDestinationSchemaToOriginal()

Update current tables schema with most recent schema. Needed for updation of possible old schema loaded from the xml job settings.

public virtual void OverwriteDestinationSchemaToOriginal()

OverwriteSourceSchemaToOriginal()

Update current tables schema with most recent schema. Needed for updation of possible old schema loaded from the xml job settings.

public virtual void OverwriteSourceSchemaToOriginal()

ProcessInputRow(Dictionary<string, object>, Mapping)

Processes the source row using the provider from table mapping script class

protected bool ProcessInputRow(Dictionary<string, object> row, Mapping mapping)

Parameters

row Dictionary<string, object>

source row

mapping Mapping

mapping

Returns

bool

ReplaceMappingConditionalsWithValuesFromRequest(Job)

protected void ReplaceMappingConditionalsWithValuesFromRequest(Job job)

Parameters

job Job

RunJob(Job)

Runs the job. This is where the majority of the work is done.

public virtual bool RunJob(Job job)

Parameters

job Job

The job to be run.

Returns

bool

SaveAsXml(XmlTextWriter)

Saves as XML.

public virtual void SaveAsXml(XmlTextWriter textWriter)

Parameters

textWriter XmlTextWriter

The XmlTextWriter.

Serialize()

Serializes this instance for use in AddinSelectors. Output must be of the format yyy, where xxx is the name of AddinParamter, as defined in the decoration, and yyy is the value assigned to the paramter

public virtual string Serialize()

Returns

string

Serialized XML output describing addin paramters

UpdateDestinationSettings(IDestination)

Updates the destination settings of the current instance to match the settings of the "destination" paramter.

public virtual void UpdateDestinationSettings(IDestination destination)

Parameters

destination IDestination

The destination.

UpdateIndexes(IList<string>, ILogger)

public static void UpdateIndexes(IList<string> indexes, ILogger logger)

Parameters

indexes IList<string>
logger ILogger

UpdateSourceSettings(ISource)

Updates the source settings of the current instance to match the settings of the "destination" paramter.

public virtual void UpdateSourceSettings(ISource source)

Parameters

source ISource

The source.

ValidateDestinationSettings()

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

public virtual string ValidateDestinationSettings()

Returns

string

ValidateSourceSettings()

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

public virtual string ValidateSourceSettings()

Returns

string

Tuple of message text and message type

See Also

To top