Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

let talk about what the controller does when it recives an notification. The data comming coming from Digizuite will be serilized in to an object of this typertype:

Code Block
public class UpdateNotification
{
    public int ChangeType { get; set; }
    public ChangeData Data { get; set; }
}
public class ChangeData
{
    public int AssetId { get; set; }
    public int ComboValueId { get; set; }
    public int MetafieldId { get; set; }
    public int TreeValueId { get; set; }
    public int ItemId { get; set; }
}

The property ChangeType indicates wheter it is and AssetChanged, MetafieldChanged, ComboValueChanged or TreeValueChanged. If it is an AssetChanged we do the following:

  1. Delete blobs for the notified assetid.

  2. Delete database enties for the notified assetid.

The last thing we do it to raise an episerver event with the UpdateNotification object.

Code Block
languagec#
_eventRegistry.Get(GlobalConstants.ContentEventRegistry.DigizuiteAssetChangeEventId).RaiseAsync(
                GlobalConstants.ContentEventRegistry.DigizuiteAssetChangeRaiserId, messageContent, EventRaiseOption.RaiseBroadcast);