Table of Contents

Class OpenCatalogIntegrationScheduledTaskBase

Namespace
Dynamicweb.Ecommerce.Integration
Assembly
Dynamicweb.Ecommerce.dll

The class OpenCatalogIntegrationScheduledTaskBase represents base open catalog scheduled task add in.

public abstract class OpenCatalogIntegrationScheduledTaskBase : BaseScheduledTaskAddIn, IParameterOptions
Inheritance
OpenCatalogIntegrationScheduledTaskBase
Implements
Inherited Members

Properties

ContentType

The type of output content file with data from open catalog.

[AddInLabel("Catalog Content type")]
[AddInParameter("ContentType")]
[AddInParameterGroup("Output")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "")]
public string ContentType { get; set; }

Property Value

string

IncludeMissingProducts

[AddInLabel("Include missing products in XML")]
[AddInParameter("IncludeMissingProducts")]
[AddInParameterGroup("Output")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool IncludeMissingProducts { get; set; }

Property Value

bool

MakeUniqueFileName

[AddInLabel("Append timestamp to filename")]
[AddInParameter("MakeUniqueFileName")]
[AddInParameterGroup("Output")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool MakeUniqueFileName { get; set; }

Property Value

bool

OutputPath

Gets Or sets folder path where the data will be placed.

[AddInLabel("The output file location")]
[AddInParameter("OutputPath")]
[AddInParameterGroup("Output")]
[AddInParameterEditor(typeof(FolderSelectEditor), "")]
public string OutputPath { get; set; }

Property Value

string

ProductPortionSize

The size of product portion to be passed into the open catalog provider using ProcessProducts(List<Product>).

[AddInLabel("Product portion size to process")]
[AddInParameter("ProductPortionSize")]
[AddInParameterEditor(typeof(IntegerNumberParameterEditor), "minValue=1;maxValue=500;")]
public int ProductPortionSize { get; set; }

Property Value

int

QueryId

The index query id used to fetch product collection for open catalog.

[AddInLabel("Query")]
[AddInParameter("QueryId")]
[AddInParameterEditor(typeof(GroupedDropDownParameterEditor), "SortBy=group,value;refreshParameters=true;")]
public string QueryId { get; set; }

Property Value

string

SuccessIntegrationActivity

The integration activity name to be called when product import will be finished successfully.

[AddInLabel("Success integration activity")]
[AddInParameter("SuccessIntegrationActivity")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "")]
public string SuccessIntegrationActivity { get; set; }

Property Value

string

Methods

ExecuteRequest(string, string, string)

Executes web request.

protected string ExecuteRequest(string url, string requestMethod = "GET", string requestBody = "")

Parameters

url string

The url.

requestMethod string

The request method header. 'GET' if not specified.

requestBody string

The request body needed for POST requests. Empty string if not specified.

Returns

string

Responce text

GetAuthHeader()

Gets authorisation header for ExecuteRequest(string, string, string) method. Empty string if not overriden.

protected virtual string GetAuthHeader()

Returns

string

Log(string)

Logs message into System/Log/Scheduledtasks/OpenCatalog.log file

protected void Log(string message)

Parameters

message string

ProcessProducts(List<Product>)

Should be overriden so the passed products collection used for fetching product information for each one.

protected abstract string ProcessProducts(List<Product> products)

Parameters

products List<Product>

The product portion, with size = ProductPortionSize

Returns

string

Product infortaion in string to be appended to output file with ContentType extension.

Run()

Runs the scheduled task, called by windows scheduler or manualy from solution administraion.

public override bool Run()

Returns

bool
To top