You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
DAM for Sitecore is constructed using pipelines, and it is possible to hook into the pipelines.
Note: Be aware that if you do change the pipelines, you are changing how DAM for Sitecore is supposed to work out of the box, and this may result in undesirable side effects.
The pipelines are defined in the .config files found in this folder: \App_Config\Include\damforsitecore
Below are descriptions of the most important pipelines used in the module.
App_Config/Include/damforsitecore/DFS.Settings.config
Pipeline | Description | PipelineArgs |
---|
DFS.GetAssetFieldValue | This pipeline will return rendering html for an asset item.
- First it will get the html template, determined by the media type and the fieldId (HtmlForAssetType). The html templates are located at:
Sitecore → System → Modules → Digizuite → MedaDataRoot → AssetTypeOutputRoot. - The different processors will replace the stampvalue in the html template.
- The property FieldValue of GetAssetFieldValueArgs will contain the rendering html.
List of processors - DFS.ContentSearch.Pipelines.GetAssetFieldValue.GetAssetTypeOutput
- DFS.Pipelines.GetAssetFieldValue.ReplaceTagsWithSelectedValues
- DFS.Services.Pipelines.GetAssetFieldValue.ReplaceTagsWithAccessValues
- DFS.Pipelines.GetAssetFieldValue.ReplaceTagsWithConfigValues
- DFS.Pipelines.GetAssetFieldValue.ReplaceTagsWithAssetItemFieldValues
- DFS.ContentSearch.Pipelines.GetAssetFieldValue.ReplaceTagsWithAssetIndexValues
- DFS.Pipelines.GetAssetFieldValue.RemoveEmptyAttributes
- DFS.Pipelines.GetAssetFieldValue.AppendTagsWithParameterValues
- DFS.ContentSearch.Pipelines.GetAssetFieldValue.AppendSeo
- DFS.Pipelines.GetAssetFieldValue.SplitFieldValueIntoResult
|
var renderArgs = new GetAssetFieldValueArgs
{
AssetItemId = new ID(this.AssetItemId),
ContextLanguage = Context.Language,
FieldId = DFS.Fields.HtmlForAssetType.FieldAssetMedia,
Quality = this.Quality
};
|
App_Config/Include/damforsitecore/DFS.Services.config
Pipeline | Description | PipelineArgs |
---|
DFS.Services.DFSMedia | This pipeline will return the media stream either from the cache or from Digizuite DAM. - First we check security.
- If the media is in the cache we return that.
- The media was not in the cache, fetch the media from Digizuite DAM.
- We resize the image, if resizing parameters was added.
- Store the media in the cache.
List of processors - DFS.Services.Pipelines.DFSMedia.CheckSecurity
- DFS.Services.Pipelines.DFSMedia.GetMediaFromCache
- DFS.Services.Pipelines.DFSMedia.GetMediaPrerequisites
- DFS.Services.Pipelines.DFSMedia.GetMediaFromDigizuite
- DFS.Services.Pipelines.DFSMedia.ResizeImage
- DFS.Services.Pipelines.DFSMedia.SaveToCache
- DFS.Services.Pipelines.DFSMedia.ResolveDownloadFilename
|
var arguments = new DFSMediaPipelineArgs
{
Request = mediaRequest,
Result = new MediaResult()
};
|
App_Config/Include/damforsitecore/DFS.Connect.config
Pipeline | Description | PipelineArgs |
---|
DFS.Connect.DetectDamChanges | This pipeline will pick up any changes made to assets or metafield in Digizuite DAM. - First we fetch assets that has been changed in a given date range. A list of assets are store on the detectDamChangesArgs.modifiedAssets.
- Then we fetch metafields that has been changed in a given date range. A list of metafield are store on the detectDamChangesArgs.modifiedMetafields.
- The RunSyncDeletedAssets processor will delete sitecore items from the silo bucket, that no longer exists in the DAM for Sitecore channel in Digizuite DAM, the same goes for the RunSyncDeletedMetafields processor.
List of processors - DFS.Connect.Pipelines.DetectDamChanges.RunGetModifiedAssets
- DFS.Connect.Pipelines.DetectDamChanges.RunGetModifiedMetafields
- DFS.Connect.Pipelines.DetectDamChanges.RunSyncDeletedAssets
- DFS.Connect.Pipelines.DetectDamChanges.RunSyncMetagroups
- DFS.Connect.Pipelines.DetectDamChanges.RunSyncDeletedMetafields
|
var detectDamChangesArgs = new DetectDamChangesArgs(assetSilo, LanguageManager.DefaultLanguage.Name, DateTime.Now);
|
DFS.Connect.SynchronizeSilo | This is the full synchronization, is fetches both configurations and assets from Digizuite DAM. The assets are stored in the silo which is a item bucket. - Check if the silo is locked, we can only run one full synchronization at a time. If the silo is not locked, we lock it.
- Then pauses out custom index: dfs_assets_master_index
- Fetch all configuration.
- Fetch all assets that are avaible in Digizuite DAM channel.
- Create/update all (new) Sitecore items from what you have fetched.
- Rebuild the index: dfs_assets_master_index
- Unlock the silo again.
List of processors - DFS.Connect.Pipelines.SynchronizeAssetsSilo.CheckSiloLock
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.LockSilo
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.PauseSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunEnsureMetaDataFolders
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMetaDataLanguages
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssetTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMetaGroupRoots
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssetTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMediaFormatTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeConfig
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeFormats
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.ResumeSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RebuildSearchIndexes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.PauseSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssets
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.ResumeSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RebuildSearchIndexes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.UnLockSilo
|
var synchronizeAssetsSiloRequest = new SynchronizationRequest(0,SiloId)
{
Language = "en",
Direction = Direction.Inbound, PipelineName = "DFS.Connect.SynchronizeSilo"
};
|
DFS.Connect.SynchronizeSiloConfiguration | This will only synchronize the configuration. - Check if the silo is locked, we can only run one full synchronization at a time. If the silo is not locked, we lock it.
- Pause the custom index: dfs_assets_master_index
- Fetch all configuration.
- Create/update all (new) Sitecore items
- Rebuild the index: dfs_assets_master_index
- Unlock the silo again.
List of processors - DFS.Connect.Pipelines.SynchronizeAssetsSilo.CheckSiloLock
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.LockSilo
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.PauseSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunEnsureMetaDataFolders
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMetaDataLanguages
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssetTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMetaGroupRoots
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssetTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeMediaFormatTypes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeConfig
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeFormats
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.ResumeSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RebuildSearchIndexes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.UnLockSilo
|
var synchronizeAssetsSiloRequest = new SynchronizationRequest(0,SiloId)
{
Language = "en",
Direction = Direction.Inbound,
PipelineName = "DFS.Connect.SynchronizeSiloConfiguration"
};
|
DFS.Connect.SynchronizeSiloAssets | This will only synchronize the assets. - Check if the silo is locked, we can only run one full synchronization at a time. If the silo is not locked, we lock it.
- Then pauses out custom index: dfs_assets_master_index
- Fetch all assets.
- Create/build all (new) Sitecore items
- Rebuild the index: dfs_assets_master_index
- Unlock the silo again.
List of processors - DFS.Connect.Pipelines.SynchronizeAssetsSilo.CheckSiloLock
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.LockSilo
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.PauseSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RunSynchronizeAssets
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.ResumeSearchIndexing
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.RebuildSearchIndexes
- DFS.Connect.Pipelines.SynchronizeAssetsSilo.UnLockSilo
|
var synchronizeAssetsSiloRequest = new SynchronizationRequest(0,SiloId)
{
Language = "en",
Direction = Direction.Inbound,
PipelineName = "DFS.Connect.SynchronizeSiloAssets"
};
|
DFS.Connect.SynchronizeAsset | This will re-synchronize one single asset item and update the data from Digizuite DAM. - Find the bucket item in Sitecore.
- Fetch data from Digizuite DAM, for the specific assetId.
- We only update the sitecore item, if there are any changes.
List of processors - DFS.Connect.Pipelines.SynchronizeAsset.GetSitecoreAsset
- DFS.Connect.Digizuite.Pipelines.SynchronizeAsset.GetAsset
- DFS.Connect.Pipelines.SynchronizeAsset.ResolveAssetChanges
- DFS.Connect.Pipelines.SynchronizeAsset.SaveAssetToSitecore
- DFS.Connect.Digizuite.Pipelines.SynchronizeAsset.SaveAsset
|
var synchronizeAssetRequest = new SynchronizationRequest(AssetId, ID.Parse(assetSiloRootId).ToString())
{
Language = language.Name,
Direction = Direction.Inbound,
Path = ID.Parse(assetSiloRootId).ToString()
};
|