Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Digizuite DAM integration service provides an API where integration endpoints can register for notifications regarding asset and metadata changes. We have made it easy to setup the connection between Episerver and Digizuite. All you have to do it to add some configuration in the web.config and you Episerver instance will recive notifications from Digizuite whenever and asset changes.

In Episerver we have created a new ApiController, which is located at the following route [siteUrl]/digizuite/integration, this it the endpoint that recives the notifications from Digizuite. An important note here is that the endpoint should be reachable from the Digizuite server otherwise Digizuite wont be able to send the notifications. This is usually the case for developers on their local environment.

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

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.

_eventRegistry.Get(GlobalConstants.ContentEventRegistry.DigizuiteAssetChangeEventId).RaiseAsync(
                GlobalConstants.ContentEventRegistry.DigizuiteAssetChangeRaiserId, updateNotification, EventRaiseOption.RaiseBroadcast);

We also listning for these events and for AssetChanged we clear the in-memory cache and if the RaiserId is coming from another instance (broadcast) and the configuration “DeleteBlob” is true, then we delete the blobs and database entries for the notified assetid.

var digizuiteIntegrationEvent = _eventRegistry.Get(GlobalConstants.ContentEventRegistry.DigizuiteAssetChangeEventId);
digizuiteIntegrationEvent.Raised += DigizuiteIntegrationEvent_Raised;

As an developer you can also build you own logic around the notifications from Digizuite, as you can listening for the event by register to the events, just as we do above.

1. Setup the endpoint

dsfdfsd fsdf sdfs,mfn,cxn,ds ns,n ,dxnv dlkgm lk jglkddg

2. Verify connection

  • No labels