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
- Inherited Members
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
source
ISourcedata source
destination
IDestinationdata 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; }
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
IsResponseMappingSupported
public bool IsResponseMappingSupported { get; }
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; }
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()
GetAdapters()
Gets job adapters
public List<AdapterBase> GetAdapters()
Returns
GetJob(string, bool)
public static Job GetJob(string jobName, bool dataImport)
Parameters
Returns
GetJobFile(string)
public static FileInfo GetJobFile(string jobName)
Parameters
jobName
string
Returns
GetJobFiles(bool)
public static List<FileInfo> GetJobFiles(bool getSorted = false)
Parameters
getSorted
bool
Returns
GetJobFiles(bool, bool)
public static List<FileInfo> GetJobFiles(bool getSorted, bool getAll)
Parameters
Returns
GetJobFolderFromIdentifier(string)
public static string GetJobFolderFromIdentifier(string jobIdentifier)
Parameters
jobIdentifier
string
Returns
GetJobFolderName(string)
public static string GetJobFolderName(string jobFilePath)
Parameters
jobFilePath
string
Returns
GetJobIdentifier(FileInfo)
public static string GetJobIdentifier(FileInfo jobFile)
Parameters
jobFile
FileInfo
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
jobFile
FileInfo
Returns
GetJobNameFromIdentifier(string)
public static string GetJobNameFromIdentifier(string jobIdentifier)
Parameters
jobIdentifier
string
Returns
GetJobNewLogFile(string)
public static string GetJobNewLogFile(string jobName)
Parameters
jobName
string
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
fileName
string
Returns
IsDataImportJob(string)
public static bool IsDataImportJob(string jobName)
Parameters
jobName
string
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
updateStatistic
bool
SaveAsXml(string)
Saves the job in an XML document
public void SaveAsXml(string savePath)
Parameters
savePath
stringuri to save the document to
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)