After installation of the NuGet package, it's time to setup the connection to you Digizuite DAM instance. You have 2 options to add the settings. Eather through code in the startup class or in a json settings file.
...
Code Block | ||
---|---|---|
| ||
services.AddDigizuiteDAM(new Action<DAMIntegrationConfiguration>(configuration => { configuration.Connection = new Digizuite.Models.DigizuiteConfiguration() { BaseUrl = new Uri("https://[DAM url]"), SystemUsername = "Episerver Editor", SystemPassword = "36b2a0e1d5d2a4bd45975951366ea26b" }; configuration.MediaManager = new MediaManagerElement() { Url = "https://[MediaManager url]" }; configuration.MainSearchFolderId = 136; configuration.PollyResilienceElement = new PollyResilienceElement() { ExceptionsAllowedBeforeBreaking = 10, DurationOfBreak = 20, TimeoutRequest = 20 }; })); |
Option 2 - Json settings
...
Code Block |
---|
{ "DigizuiteDamSettings": { "Connection": { "BaseUrl": "https://[DAM url]", "SystemUsername": "DFO System", "SystemPassword": "P74nR658TEhh" }, "MediaManager": { "Url": "https://[MediaManager url]" }, "MainSearchFolderId": 126, "PollyResilienceElement": { "ExceptionsAllowedBeforeBreaking": 10, "DurationOfBreak": 20, "TimeoutRequest": 20 } } } |
Add the DAMIntegrationConfiguration to your startup class. The configuration should be added after the AddCms due to TinyMCE initialization.
...
DAMIntegrationConfiguration parameters
Name | Type | Required | Default | Description |
---|
DatabaseName
string
Yes
The databaseName is the name of the database that you are running your Optimizely application in. We have experienced in some applications that it is not enougt to only add the name of the database, but it should have the hole connection string. You can get the connection string like this:
_configuration.GetConnectionString("EPiServerDB")Connection | DigizuiteConfiguration | Yes | This object contains the connection parameters to the Digizuite DAM instance. | |
MediaManager | MediaManagerElement | Yes | The Url parameter has to be set. This is used for embedding the MediaManager into Optimizely. | |
MainSearchFolderId | int | Yes | This is the channel folder in Digizuite. Request the id from your Digizuite consultant. |
DatabaseName |
FallbackIconMappings
List<IconMappingElement>
No
string | No |
Code Block | ||
---|---|---|
| ||
new RoleMappingElement()
{
DigizuiteUser = new DigizuiteUser()
{
Name = "Episerver Editor",
Password = 36b2a0e1d5d2a4bd45975951366ea26b",
IsSystemUser = true
},
EpiserverRoles = new List<string>()
{
"DigizuiteEditor"
}
},
new RoleMappingElement()
{
DigizuiteUser = new DigizuiteUser()
{
Name = "Episerver User",
Password = "292ad587521cc6c4c26e1c32991c2afd"
},
EpiserverRoles = new List<string>()
{
"DigizuiteUser"
}
} |
configuration["ConnectionStrings:EPiServerDB"] | This module requires access to the database for Resilience. The value must be a connection string to the database. By default it will use the Episerver DB connection string. | |||
VideoPlaybackType | VideoPlaybackType | No | VideoPlaybackType.Streaming | The connector comes with 3 different option for video playback. You can read about the it at DFO 4.0.0 - 13 Video playback |
VideoCdnBaseUrl | string | No | ||
DigizuiteWebhookElement | DigizuiteWebhookElement | No | Listening for Digizuite asset update events. When someone make a change to an asset in Digizuite DAM and event is raised which your Optimizely instanc gets and all cached data about the asset will be cleared. | |
FullSearchBatchSize | int | no | 200 | |
ValidVideoExtensions | List<string> | no | "mp4", "m4v", "ogv", "webm" | |
DisableNotifications | bool | no | false | |
DefaultLanguageId | int | no | 3 | |
DefaultLanguageName | string | no | en | |
ForceDefaultLanguage | bool | no | false | |
Cache | CacheElement | no | TimeOut = "10:00" | |
AssetInUseGuid | Guid | no | This is a metafield in Digizutite thats gets updated every time an asset is added or removed from a page. | |
MediaElements | MediaElement | no | ||
IndividualUserLogin | bool | no | true | If true the user will have to login with a username and password. When access Digizuite asset browser. |
RoleMappings | List<RoleMappingElement> | no | ||
PollyResilienceElement | PollyResilienceElement | no | Setting for resilience strategy. |
Child element: RoleMappingElement
The connection is the most important child element. This is where the main connection setting pointing to the DAM is specified. Typically you will replace this with connections settings you have gotten from your own DAM Center.
Name | Type | Required | Default | Description |
---|---|---|---|---|
DigizuiteUser | DigizuiteUser | Yes | Digizuite user | |
EpiserverRoles | List<string> | Yes | A list of Optimizely roles, that should map to this Digizuite user |
Child element: DigizuiteUser
The connection is the most important child element. This is where the main connection setting pointing to the DAM is specified. Typically you will replace this with connections settings you have gotten from your own DAM Center.
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | string | Yes | Digizuite username | |
Password | string | Yes | Password of the Digizuite user |
Child element: DigizuiteConfiguration
The connection is the most important child element. This is where the main connection setting pointing to the DAM is specified. Typically you will replace this with connections settings you have gotten from your own DAM Center.
Name | Type | Required | Default | Description |
---|---|---|---|---|
BaseUrl | Uri | Yes | Base url to the DAM Center | |
SystemUsername | string | Yes | Sync user that the integration can use in the DAM Center | |
SystemPassword | string | Yes | The hashed secret that the integrations sync user should use. |
Child element:
...
MediaElements
The url is used for embedding the MediaManager into Optimizely in an IFrame.
Name | Type | Required | Default | Description |
---|
Url
string
Yes
DefaultImageFormat | MediaElement | No | { MediaFormatId = 2, Extension = "jpg", PropertyName= "Preview" } | The default image quality format used, if no valid quality has been set. |
DefaultVideoFormat | MediaElement | No | { MediaFormatId = 10079, Extension = "mp4" } | The default video format used, if no valid quality has been set. |
Child element:
...
MediaElement
The url is used for embedding the MediaManager into Optimizely in an IFrame.
Name | Type | Required | Default | Description |
---|
MediaFormatId |
int | Yes | The |
mediaFormatId of the |
EpiserverRoles
quality to use | ||
Extension | string | Yes |
The file extension of the format used in MediaFormatId | ||||
PropertyName | string | No | If the format are also added to the media model, then type the Property name |
Child element:
...
MediaManagerElement
The url is used for embedding the MediaManager into Optimizely in an IFrame.
Name | Type | Required | Default | Description |
---|
Url | string | Yes |
Digizuite username
Password
string
Yes
Digizuite password in the format md5
IsSystemUser
bool
No
false
Base url to the MediaManager |
Child element: FallbackIconMappings
...
Each element in this list has the settings below:
Name | Type | Required | Default | Description |
---|---|---|---|---|
DocumentType | string | Yes | The icon for the document type - for instance "video" for a video icon. | |
Extensions | List<string> | Yes | A list of file extensions to map for the above document type. |
Child element: DigizuiteWebhookElement
The DigizuiteWebhookElement for seting up the connection between Digizuite DAM and your Optimizely instance. So you will recive update notification when assets change.
Name | Type | Required | Default | Description |
---|---|---|---|---|
SiteUrl | string | Yes | This is the url that Digizuite use to send the notification to. We will append the routing to the controller to the url. [siteUrl]/episerver/digizuite/DigizuiteWebhook/Update | |
Guid | string | Yes | This is the unique identifier for the endpoint in Digizuite DAM. Just generate a new guid. | |
Subscriptions | List<int> | No | new List<int> { 1 } | A list of changeTypes. Possible values are: AssetChanged = 1, MetafieldChanged = 2, TreeValueChanged = 4, ComboValueChanged = 8 |
DeleteBlob | bool | No | False | By default this is false. Enable this if each instance of a loadbalanced enviroment has its own local blob storage. |
Child element: CacheElement
Name | Type | Required | Default | Description |
---|---|---|---|---|
TimeOut | string | No | 10.00 | Use in the Digizuite Content provider. When building IContent, then it will by dedault cached for 10 minutes. |
ImageCDNCacheControl | string | No | ||
CDNCacheControl | string | No |
Child element: PollyResilienceElement
Name | Type | Required | Default | Description |
---|---|---|---|---|
ExceptionsAllowedBeforeBreaking | int | No | 1 | The number of exceptions that are allowed before opening the circuit. |
DurationOfBreak | int | No | 20 | The duration the circuit will stay open before resetting. The value is in seconds. |
TimeoutRequest | int | No | 20 | Time to wait for a asynchronously delegate to complete. |