Class Job
- Namespace
- Dynamicweb.DataIntegration.Integration
- Assembly
- Dynamicweb.DataIntegration.dll
This class describes one data transfer job. It can be saved to disk, reloaded and run again, assuming the schema of the source and the destination hasn't changed.
public class Job
- Inheritance
-
Job
- Derived
- Inherited Members
- Extension Methods
Constructors
Job()
Initializes a new instance of the Job class.
public Job()
Job(ISource, IDestination)
Initializes an empty job
public Job(ISource source, IDestination destination)
Parameters
sourceISourcedata source
destinationIDestinationdata destination
Job(string, string?)
Initializes a job from an XML Document
public Job(string path, string? logFile)
Parameters
Fields
AsTransaction
Indicates if, if possible, the job should be run as a transaction. Mostly relevant when the destination is an SQL server. Can only be changed by editing the saved XML job.
public bool AsTransaction
Field Value
ConfigurationJobFolderName
public static readonly string ConfigurationJobFolderName
Field Value
CreateMappingAtRuntime
Indicates if column mappings should be created automatically at runtime, for the mappings added to the job.
public bool CreateMappingAtRuntime
Field Value
Description
public string? Description
Field Value
Name
Name of the job. The name of the XML file the job is saved to/loaded from.
public string? Name
Field Value
Result
public volatile JobResult Result
Field Value
ServiceCacheSettings
public ServiceCacheSettings ServiceCacheSettings
Field Value
Properties
Culture
Formatting culture
public string? Culture { get; set; }
Property Value
Destination
Gets or sets the destination of the job.
public virtual IDestination? Destination { get; set; }
Property Value
- IDestination
The destination.
DestinationProviderLabel
public string? DestinationProviderLabel { get; protected set; }
Property Value
DisableCacheClearingAndIndexUpdates
Disable cache clearing and index update when there are no records changes at import.
public bool DisableCacheClearingAndIndexUpdates { get; set; }
Property Value
Group
public string? Group { get; set; }
Property Value
Id
public string? Id { get; }
Property Value
InheritDestination
public bool InheritDestination { get; set; }
Property Value
InheritSource
public bool InheritSource { get; set; }
Property Value
IsResponseMappingSupported
public bool IsResponseMappingSupported { get; }
Property Value
JobFilePath
protected string JobFilePath { get; set; }
Property Value
LastExecutionRunTime
public TimeSpan? LastExecutionRunTime { get; }
Property Value
LastRun
public DateTime? LastRun { get; }
Property Value
LastRunResult
public JobResult LastRunResult { get; }
Property Value
LastSuccessfulRun
public DateTime? LastSuccessfulRun { get; }
Property Value
LogFileFullPath
public string? LogFileFullPath { get; }
Property Value
LogFileRelativePath
public string? LogFileRelativePath { get; }
Property Value
Logger
Logger
public ILogger? Logger { get; }
Property Value
MappingErrors
List of mapping errors
public List<SchemaComparerResult> MappingErrors { get; }
Property Value
MappingType
MappingType
public MappingType MappingType { get; }
Property Value
Mappings
Gets or sets the mapping collection.
public virtual MappingCollection Mappings { get; set; }
Property Value
- MappingCollection
The mapping collection.
NotificationSettings
Notification settings
public NotificationSettings NotificationSettings { get; set; }
Property Value
RepositoriesIndexSettings
public RepositoriesIndexSettings RepositoriesIndexSettings { get; set; }
Property Value
Source
Gets the source.
public virtual ISource? Source { get; set; }
Property Value
SourceProviderLabel
public string? SourceProviderLabel { get; protected set; }
Property Value
Methods
AddMapping()
Adds a table mapping to the job. The new table mapping is returned. The mapping is empty, so sourceTable and destinationTable should be set.
public Mapping AddMapping()
Returns
- Mapping
Mapping object instance
CreateMappings()
Runs through the mappings in the job, and creates column mappings where the names of source columns match the name of a column in the destination column.
public void CreateMappings()
Delete()
public void Delete()
EvaluatePath(string)
protected static void EvaluatePath(string filePath)
Parameters
filePathstring
FindJobFullFilePath(string)
protected static string FindJobFullFilePath(string path)
Parameters
pathstring
Returns
GetAdapters()
Gets job adapters
public List<AdapterBase> GetAdapters()
Returns
GetJob(string?)
public static Job? GetJob(string? jobName)
Parameters
jobNamestring
Returns
GetJob(string?, bool)
public static Job? GetJob(string? jobName, bool dataImport)
Parameters
Returns
GetJobFile(string?)
public static FileInfo? GetJobFile(string? jobName)
Parameters
jobNamestring
Returns
GetJobFiles(bool)
public static List<FileInfo> GetJobFiles(bool getSorted = false)
Parameters
getSortedbool
Returns
GetJobFiles(bool, bool)
public static List<FileInfo> GetJobFiles(bool getSorted, bool getAll)
Parameters
Returns
GetJobFolderFromIdentifier(string?)
public static string? GetJobFolderFromIdentifier(string? jobIdentifier)
Parameters
jobIdentifierstring
Returns
GetJobFolderName(string?)
public static string? GetJobFolderName(string? jobFilePath)
Parameters
jobFilePathstring
Returns
GetJobIdentifier(FileInfo)
public static string? GetJobIdentifier(FileInfo jobFile)
Parameters
jobFileFileInfo
Returns
GetJobIdentifier(string?, string?)
public static string? GetJobIdentifier(string? folder, string? jobName)
Parameters
Returns
GetJobInformation(string, string)
Gets the job name and description from job XML Document
public static Job? GetJobInformation(string path, string logFile)
Parameters
Returns
GetJobName(FileInfo)
public static string GetJobName(FileInfo jobFile)
Parameters
jobFileFileInfo
Returns
GetJobNameFromIdentifier(string)
public static string GetJobNameFromIdentifier(string jobIdentifier)
Parameters
jobIdentifierstring
Returns
GetJobNewLogFile(string)
public static string GetJobNewLogFile(string jobName)
Parameters
jobNamestring
Returns
GetJobNewLogFile(string, string?)
public static string GetJobNewLogFile(string jobName, string? taskId)
Parameters
Returns
GetJobNewLogFile(string, string?, string?)
public static string GetJobNewLogFile(string jobName, string? taskId, string? timeStamp)
Parameters
Returns
InitLogger(string)
public ILogger InitLogger(string fileName)
Parameters
fileNamestring
Returns
IsDataImportJob(string?)
public static bool IsDataImportJob(string? jobName)
Parameters
jobNamestring
Returns
IsSortable()
public bool IsSortable()
Returns
Move(string, string)
public static void Move(string jobName, string groupName)
Parameters
Run()
Runs this job.
public bool Run()
Returns
Save(bool)
public void Save(bool updateStatistic = false)
Parameters
updateStatisticbool
SaveAsXml(string)
Saves the job in an XML document
public void SaveAsXml(string savePath)
Parameters
savePathstringuri to save the document to
SaveSchema()
protected void SaveSchema()
SetDestination(XmlNode, ParentJob?)
protected void SetDestination(XmlNode node, ParentJob? parentJob)
Parameters
SetSource(XmlNode, ParentJob?)
protected void SetSource(XmlNode node, ParentJob? parentJob)
Parameters
UpdateDestinationSetting(string, string)
Uses reflection to update a property on the source in this job.
public void UpdateDestinationSetting(string fieldName, string value)
Parameters
UpdateSourceSetting(string, string)
Uses reflection to update a property on the source in this job.
public void UpdateSourceSetting(string fieldName, string value)