Class AdapterBase
- Namespace
- Dynamicweb.DataIntegration.Integration.Adapters
- Assembly
- Dynamicweb.DataIntegration.dll
public abstract class AdapterBase : ConfigurableAddIn, ISource, ISourceReader, IDisposable, INotSource
- Inheritance
-
AdapterBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
AdapterBase()
public AdapterBase()
AdapterBase(XmlNode)
public AdapterBase(XmlNode xmlNode)
Parameters
xmlNode
XmlNode
Fields
CurrentMapping
protected Mapping CurrentMapping
Field Value
Name
public string Name
Field Value
OutputTables
public Dictionary<Table, List<Dictionary<string, object>>> OutputTables
Field Value
source
public ISource source
Field Value
Properties
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
Logger
Logger
public ILogger Logger { get; set; }
Property Value
OutputSchema
public virtual Schema OutputSchema { get; }
Property Value
WorkingDirectory
Gets or sets the working directory. When used for testing, all paths for standard providers are relative to this path.
public string WorkingDirectory { get; set; }
Property Value
- string
The working directory.
Methods
CheckCondition(MappingConditional, Dictionary<string, object>)
Checks the condition.
public virtual bool CheckCondition(MappingConditional mc, Dictionary<string, object> row)
Parameters
mc
MappingConditionalThe mapping Conditional Collection
row
Dictionary<string, object>The row.
Returns
- bool
True if the condition is met, false otherwise
CheckMapping(Mapping)
public virtual List<SchemaComparerResult> CheckMapping(Mapping map)
Parameters
map
Mapping
Returns
Close()
Closes this instance.
public virtual void Close()
CreateParameterNode(Type, string, string)
protected XElement CreateParameterNode(Type type, string name, string value)
Parameters
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetId()
public string GetId()
Returns
GetNext()
Gets the next line.
public virtual Dictionary<string, object> GetNext()
Returns
GetNext(Mapping)
public virtual Dictionary<string, object> GetNext(Mapping mapping)
Parameters
mapping
Mapping
Returns
GetNextInput(Mapping)
protected Dictionary<string, object> GetNextInput(Mapping mapping)
Parameters
mapping
Mapping
Returns
GetOriginalSourceSchema()
Get recent Source Tables Schema from source.
public virtual Schema GetOriginalSourceSchema()
Returns
GetReader(Mapping)
Gets the reader.
public ISourceReader GetReader(Mapping mapping)
Parameters
mapping
MappingThe mapping.
Returns
GetSchema()
Gets the schema.
public virtual Schema GetSchema()
Returns
Initialize()
Initializes this instance.
public virtual void Initialize()
IsDone()
Determines whether this instance is done reading from the source.
public virtual bool IsDone()
Returns
- bool
true
if this instance is done; otherwise,false
.
IsDone(Mapping)
public virtual bool IsDone(Mapping mapping)
Parameters
mapping
Mapping
Returns
IsDoneInput(Mapping)
protected bool IsDoneInput(Mapping mapping)
Parameters
mapping
Mapping
Returns
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
JobThe job.
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()
SaveAsXml(XmlTextWriter)
Saves as XML.
public virtual void SaveAsXml(XmlTextWriter textWriter)
Parameters
textWriter
XmlTextWriterThe XmlTextWriter.
Serialize()
Serializes this instance for use in AddinSelectors.
Output must be of the format
public virtual string Serialize()
Returns
- string
Serialized XML output describing addin paramters
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
ISourceThe source.
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