Kentico CMS 6.0 Integration Guide

Important types

Important types

Previous topic Next topic Mail us feedback on this topic!  

Important types

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

This chapter gives you general overview of data types that you can be confronted with during implementation.

 

Classes

 

BaseInfo - represents any site‑related or global data object in Kentico CMS (e.g. a page template or a poll).

TreeNode - represents a document in Kentico CMS.

 

Interfaces

 

ICMSObject - interface identifying BaseInfo or TreeNode.

 

Enumerations

 

TaskTypeEnum

 

This enumeration is located in the CMS.SettingsProvider namespace. It always accompanies a processed object or document. The value has a slightly different meaning for outgoing and incoming tasks:

 

for outgoing tasks, the value is used only to create subscriptions and it says which actions should be handled. E.g. when you subscribe to CreateObject, the Integration bus will react only when object inheriting from BaseInfo is created.

for incoming task, it says what should happen with the given object. E.g. when you pass a document object and task type DeleteDocument, Kentico CMS will delete the document.

 

The most common values for objects are:

 

CreateObject

UpdateObject

DeleteObject

AddToSite (not applicable for global objects)

RemoveFromSite (not applicable for global objects)

All - this value gives sense only for outbound direction (during subscribing). It indicates that integration bus should create tasks whenever change to document or object is made.

 

The most common values of documents are:

 

CreateDocument

UpdateDocument

DeleteDocument

PublishDocument

ArchiveDocument

All – this value gives sense only for outbound direction (during subscribing). It indicates that integration bus should create tasks whenever change to document or object is made.

 

To see the whole list of values, please explore the enumeration in Visual Studio. You can use object browser if you don’t have source code.

 

Please note that there is no task type indicating a change of documents' worklow steps (except special types like PublishDocument or ArchiveDocument). This is one of the known limitations which are likely to be fixed in one of the future versions.

 

TaskProcessTypeEnum

 

Values of this enumeration represent all supported combinations of synchronicity and data modes. Please note that when the system looks for connectors that have a matching subscription and one connector has more of them, the system takes the first one according to the following priority (highest to lowest):

 

SyncSnapshot

AsyncSnapshot

AsyncSimpleSnapshot

AsyncSimple

 

As you can notice, there is only one Sync option — SyncSnapshot. This is given by the nature of synchronous processing where you can always access related objects (parent, children, etc.).

 

TaskDataTypeEnum

 

You can notice the usage of TaskDataTypeEnum across whole integration module. This enumeration gives additional information about the content of the currently synchronized object. For outbound direction, the value also specifies whether the object is being accompanied with the translation data — this applies only to asynchronous processing. For inbound direction, it says whether the translations should be prepared during task logging and whether the system should try to process child objects. Translation data are data enabling translation of foreign keys between Kentico CMS and the external system. When using synchronous processing, the required data can be obtained directly within the context of the application.

 

There are three options:

 

Value

Object data

Translation data (only for asynchronous processing)

Include child objects, bindings, categories, etc.

Snapshot

Approve

Approve

Approve

SimpleSnapshot

Approve

Approve


Simple

Approve



 

 

 

Snapshot mode does not support documents

 

Please note that the Snapshot mode is not supported for synchronization of documents. This is one of the limitations that will be fixed in one of the future Kentico CMS versions.

 

 

IntegrationProcessResultEnum

 

This enumeration is used for indicating the result of processing outgoing task by 3rd party applications. The result determines what happens after processing a single task.

 

Possible values are:

 

Value

Meaning

Asynchronous processing

Synchronous processing

OK

Processing succeeded

Task (or relation between task and connector) is deleted.Processing continues with the next task in queue.

Processing continues with the next task in queue.

Error

Critical error occurred

Error is logged to the synchronization log. Processing stops for the current connector.

Error is logged to event log. Task data are lost. Processing stops for all connectors.

ErrorAndSkip

Noncritical error occurred

Error is logged to the synchronization log. Processing continues.

Error is logged to the event log. Task data are lost. Processing stops for the current connector.

SkipNow

Process the task during next iteration

Processing continues with the next task in queue.

Task data are lost.

 

IntegrationProcessTypeEnum

 

Values of this enumeration are used during processing of incoming tasks. Generally, it says whether to process the task immediately or not and how to behave when an error occurs.

 

Value

Meaning

Default

Processes the task immediately. If an error occurs, the processing stops and the type is set to Error.

SkipOnce

Does not process the task during the first processing (just sets the type to Default so it is going to be processed during next processing).

SkipOnError

Processes the task immediately. If an error occurs, the task is skipped and the processing continues.

DeleteOnError

Processes the task immediately. If an error occurs, the task is deleted and the processing continues.

Error

Processing should not continue due to a critical error.