diff --git a/KVA/Migration.Tool.Source/Handlers/MigratePagesCommandHandler.cs b/KVA/Migration.Tool.Source/Handlers/MigratePagesCommandHandler.cs index 0bdc8347..fd6bc105 100644 --- a/KVA/Migration.Tool.Source/Handlers/MigratePagesCommandHandler.cs +++ b/KVA/Migration.Tool.Source/Handlers/MigratePagesCommandHandler.cs @@ -286,7 +286,7 @@ await MigratePageUrlPaths(ksSite.SiteGUID, } } - await ExecDeferredPageBuilderPatch(); + await ExecDeferredVisualBuilderPatch(); return new GenericCommandResult(); } @@ -636,7 +636,7 @@ private void MigrateFormerUrls(ICmsTree ksNode, WebPageItemInfo targetPage) #region Deffered patch - private async Task ExecDeferredPageBuilderPatch() + private async Task ExecDeferredVisualBuilderPatch() { logger.LogInformation("Executing TreePath patch"); @@ -646,10 +646,10 @@ private async Task ExecDeferredPageBuilderPatch() { var contentItemCommonDataInfo = await ContentItemCommonDataInfo.Provider.GetAsync(uniqueId); - contentItemCommonDataInfo.ContentItemCommonDataPageBuilderWidgets = DeferredPatchPageBuilderWidgets( - contentItemCommonDataInfo.ContentItemCommonDataPageBuilderWidgets, webSiteChannelId, out bool anythingChangedW); - contentItemCommonDataInfo.ContentItemCommonDataPageTemplateConfiguration = DeferredPatchPageTemplateConfiguration( - contentItemCommonDataInfo.ContentItemCommonDataPageTemplateConfiguration, webSiteChannelId, out bool anythingChangedC); + contentItemCommonDataInfo.ContentItemCommonDataVisualBuilderWidgets = DeferredPatchVisualBuilderWidgets( + contentItemCommonDataInfo.ContentItemCommonDataVisualBuilderWidgets, webSiteChannelId, out bool anythingChangedW); + contentItemCommonDataInfo.ContentItemCommonDataVisualBuilderTemplateConfiguration = DeferredPatchVisualTemplateConfiguration( + contentItemCommonDataInfo.ContentItemCommonDataVisualBuilderTemplateConfiguration, webSiteChannelId, out bool anythingChangedC); if (anythingChangedC || anythingChangedW) { @@ -659,12 +659,12 @@ private async Task ExecDeferredPageBuilderPatch() else if (className == PageTemplateConfigurationInfo.TYPEINFO.ObjectClassName) { var pageTemplateConfigurationInfo = await PageTemplateConfigurationInfo.Provider.GetAsync(uniqueId); - pageTemplateConfigurationInfo.PageTemplateConfigurationWidgets = DeferredPatchPageBuilderWidgets( + pageTemplateConfigurationInfo.PageTemplateConfigurationWidgets = DeferredPatchVisualBuilderWidgets( pageTemplateConfigurationInfo.PageTemplateConfigurationWidgets, webSiteChannelId, out bool anythingChangedW ); - pageTemplateConfigurationInfo.PageTemplateConfigurationTemplate = DeferredPatchPageTemplateConfiguration( + pageTemplateConfigurationInfo.PageTemplateConfigurationTemplate = DeferredPatchVisualTemplateConfiguration( pageTemplateConfigurationInfo.PageTemplateConfigurationTemplate, webSiteChannelId, out bool anythingChangedC @@ -677,12 +677,12 @@ out bool anythingChangedC } } - private string DeferredPatchPageTemplateConfiguration(string documentPageTemplateConfiguration, int webSiteChannelId, out bool anythingChanged) + private string DeferredPatchVisualTemplateConfiguration(string documentPageTemplateConfiguration, int webSiteChannelId, out bool anythingChanged) { if (!string.IsNullOrWhiteSpace(documentPageTemplateConfiguration)) { var configuration = JObject.Parse(documentPageTemplateConfiguration); - PageBuilderWidgetsPatcher.DeferredPatchProperties(configuration, TreePathConvertor.GetSiteConverter(webSiteChannelId), out anythingChanged); + VisualBuilderWidgetsPatcher.DeferredPatchProperties(configuration, TreePathConvertor.GetSiteConverter(webSiteChannelId), out anythingChanged); return JsonConvert.SerializeObject(configuration); } @@ -690,11 +690,11 @@ private string DeferredPatchPageTemplateConfiguration(string documentPageTemplat return documentPageTemplateConfiguration; } - private string DeferredPatchPageBuilderWidgets(string documentPageBuilderWidgets, int webSiteChannelId, out bool anythingChanged) + private string DeferredPatchVisualBuilderWidgets(string documentPageBuilderWidgets, int webSiteChannelId, out bool anythingChanged) { if (!string.IsNullOrWhiteSpace(documentPageBuilderWidgets)) { - var patched = PageBuilderWidgetsPatcher.DeferredPatchConfiguration( + var patched = VisualBuilderWidgetsPatcher.DeferredPatchConfiguration( JsonConvert.DeserializeObject(documentPageBuilderWidgets), TreePathConvertor.GetSiteConverter(webSiteChannelId), out anythingChanged diff --git a/KVA/Migration.Tool.Source/Helpers/PageBuilderWidgetsPatcher.cs b/KVA/Migration.Tool.Source/Helpers/VisualBuilderWidgetsPatcher.cs similarity index 95% rename from KVA/Migration.Tool.Source/Helpers/PageBuilderWidgetsPatcher.cs rename to KVA/Migration.Tool.Source/Helpers/VisualBuilderWidgetsPatcher.cs index 29b44d5a..8bb3e53d 100644 --- a/KVA/Migration.Tool.Source/Helpers/PageBuilderWidgetsPatcher.cs +++ b/KVA/Migration.Tool.Source/Helpers/VisualBuilderWidgetsPatcher.cs @@ -4,7 +4,7 @@ namespace Migration.Tool.Source.Helpers; -public static class PageBuilderWidgetsPatcher +public static class VisualBuilderWidgetsPatcher { public static EditableAreasConfiguration DeferredPatchConfiguration(EditableAreasConfiguration configuration, TreePathConvertor convertor, out bool anythingChanged) { diff --git a/KVA/Migration.Tool.Source/KsCoreDiExtensions.cs b/KVA/Migration.Tool.Source/KsCoreDiExtensions.cs index 92494567..4efcf563 100644 --- a/KVA/Migration.Tool.Source/KsCoreDiExtensions.cs +++ b/KVA/Migration.Tool.Source/KsCoreDiExtensions.cs @@ -53,7 +53,7 @@ public static IServiceCollection UseKsToolCore(this IServiceCollection services, services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); diff --git a/KVA/Migration.Tool.Source/Mappers/ContentItemMapper.cs b/KVA/Migration.Tool.Source/Mappers/ContentItemMapper.cs index fe6813c2..04bc3603 100644 --- a/KVA/Migration.Tool.Source/Mappers/ContentItemMapper.cs +++ b/KVA/Migration.Tool.Source/Mappers/ContentItemMapper.cs @@ -62,7 +62,7 @@ public class ContentItemMapper( MediaLinkServiceFactory mediaLinkServiceFactory, ToolConfiguration configuration, ClassMappingProvider classMappingProvider, - PageBuilderPatcher pageBuilderPatcher, + VisualBuilderPatcher visualBuilderPatcher, IServiceProvider serviceProvider ) : UmtMapperBase, IUmtMapper { @@ -174,8 +174,8 @@ protected override IEnumerable MapInternal(CmsTreeMapperSource source DateTime? scheduledPublishWhen = null; DateTime? scheduleUnpublishWhen = null; - string? contentItemCommonDataPageBuilderWidgets = null; - string? contentItemCommonDataPageTemplateConfiguration = null; + string? contentItemCommonDataVisualBuilderWidgets = null; + string? contentItemCommonDataVisualBuilderTemplateConfiguration = null; bool ndp = false; if (!migratedAsContentFolder) @@ -214,14 +214,14 @@ protected override IEnumerable MapInternal(CmsTreeMapperSource source } case CmsDocumentK12 doc: { - contentItemCommonDataPageBuilderWidgets = doc.DocumentPageBuilderWidgets; - contentItemCommonDataPageTemplateConfiguration = doc.DocumentPageTemplateConfiguration; + contentItemCommonDataVisualBuilderWidgets = doc.DocumentPageBuilderWidgets; + contentItemCommonDataVisualBuilderTemplateConfiguration = doc.DocumentPageTemplateConfiguration; break; } case CmsDocumentK13 doc: { - contentItemCommonDataPageBuilderWidgets = doc.DocumentPageBuilderWidgets; - contentItemCommonDataPageTemplateConfiguration = doc.DocumentPageTemplateConfiguration; + contentItemCommonDataVisualBuilderWidgets = doc.DocumentPageBuilderWidgets; + contentItemCommonDataVisualBuilderTemplateConfiguration = doc.DocumentPageTemplateConfiguration; break; } @@ -229,7 +229,7 @@ protected override IEnumerable MapInternal(CmsTreeMapperSource source break; } - (contentItemCommonDataPageTemplateConfiguration, contentItemCommonDataPageBuilderWidgets, ndp) = pageBuilderPatcher.PatchJsonDefinitions(source.CmsTree.NodeSiteID, contentItemCommonDataPageTemplateConfiguration, contentItemCommonDataPageBuilderWidgets).GetAwaiter().GetResult(); + (contentItemCommonDataVisualBuilderTemplateConfiguration, contentItemCommonDataVisualBuilderWidgets, ndp) = visualBuilderPatcher.PatchJsonDefinitions(source.CmsTree.NodeSiteID, contentItemCommonDataVisualBuilderTemplateConfiguration, contentItemCommonDataVisualBuilderWidgets).GetAwaiter().GetResult(); } var documentGuid = spoiledGuidContext.EnsureDocumentGuid( @@ -246,8 +246,8 @@ protected override IEnumerable MapInternal(CmsTreeMapperSource source ContentItemCommonDataContentLanguageGuid = languageGuid, // DocumentCulture -> language entity needs to be created and its ID used here ContentItemCommonDataVersionStatus = versionStatus, ContentItemCommonDataIsLatest = !draftMigrated, // Flag for latest record to know what to retrieve for the UI - ContentItemCommonDataPageBuilderWidgets = contentItemCommonDataPageBuilderWidgets, - ContentItemCommonDataPageTemplateConfiguration = contentItemCommonDataPageTemplateConfiguration, + ContentItemCommonDataVisualBuilderWidgets = contentItemCommonDataVisualBuilderWidgets, + ContentItemCommonDataVisualBuilderTemplateConfiguration = contentItemCommonDataVisualBuilderTemplateConfiguration, }; if (ndp) @@ -405,7 +405,7 @@ private IEnumerable MigrateDraft(ICmsVersionHistory checkoutVersion, { string? pageTemplateConfiguration = adapter.DocumentPageTemplateConfiguration; string? pageBuildWidgets = adapter.DocumentPageBuilderWidgets; - (pageTemplateConfiguration, pageBuildWidgets, bool ndp) = pageBuilderPatcher.PatchJsonDefinitions(checkoutVersion.NodeSiteID, pageTemplateConfiguration, pageBuildWidgets).GetAwaiter().GetResult(); + (pageTemplateConfiguration, pageBuildWidgets, bool ndp) = visualBuilderPatcher.PatchJsonDefinitions(checkoutVersion.NodeSiteID, pageTemplateConfiguration, pageBuildWidgets).GetAwaiter().GetResult(); #region Find existing guid @@ -436,8 +436,8 @@ private IEnumerable MigrateDraft(ICmsVersionHistory checkoutVersion, ContentItemCommonDataContentLanguageGuid = contentLanguageGuid, ContentItemCommonDataVersionStatus = VersionStatus.Draft, ContentItemCommonDataIsLatest = true, // Flag for latest record to know what to retrieve for the UI - ContentItemCommonDataPageBuilderWidgets = pageBuildWidgets, - ContentItemCommonDataPageTemplateConfiguration = pageTemplateConfiguration + ContentItemCommonDataVisualBuilderWidgets = pageBuildWidgets, + ContentItemCommonDataVisualBuilderTemplateConfiguration = pageTemplateConfiguration }; if (ndp) @@ -833,8 +833,8 @@ public IEnumerable Map(CustomTableMapperSource source) ContentItemCommonDataContentItemGuid = contentItemGuid, ContentItemCommonDataContentLanguageGuid = contentLanguageInfo.ContentLanguageGUID, ContentItemCommonDataVersionStatus = versionStatus, - ContentItemCommonDataPageBuilderWidgets = contentItemCommonDataPageBuilderWidgets, - ContentItemCommonDataPageTemplateConfiguration = contentItemCommonDataPageTemplateConfiguration, + ContentItemCommonDataVisualBuilderWidgets = contentItemCommonDataPageBuilderWidgets, + ContentItemCommonDataVisualBuilderTemplateConfiguration = contentItemCommonDataPageTemplateConfiguration, }; handler.EnsureContentItemCommonData(commonDataModel, ctms); diff --git a/KVA/Migration.Tool.Source/Mappers/PageTemplateConfigurationMapper.cs b/KVA/Migration.Tool.Source/Mappers/PageTemplateConfigurationMapper.cs index 2fe610d2..09495121 100644 --- a/KVA/Migration.Tool.Source/Mappers/PageTemplateConfigurationMapper.cs +++ b/KVA/Migration.Tool.Source/Mappers/PageTemplateConfigurationMapper.cs @@ -12,7 +12,7 @@ public class PageTemplateConfigurationMapper( ILogger logger, PrimaryKeyMappingContext pkContext, IProtocol protocol, - PageBuilderPatcher pageBuilderPatcher + VisualBuilderPatcher visualBuilderPatcher ) : EntityMapperBase(logger, pkContext, protocol) { @@ -44,7 +44,7 @@ protected override PageTemplateConfigurationInfo MapInternal(ICmsPageTemplateCon string? configurationTemplate = source.PageTemplateConfigurationTemplate; string? configurationWidgets = source.PageTemplateConfigurationWidgets; - (configurationTemplate, configurationWidgets, bool _) = pageBuilderPatcher.PatchJsonDefinitions(source.PageTemplateConfigurationSiteID, configurationTemplate, configurationWidgets).GetAwaiter().GetResult(); + (configurationTemplate, configurationWidgets, bool _) = visualBuilderPatcher.PatchJsonDefinitions(source.PageTemplateConfigurationSiteID, configurationTemplate, configurationWidgets).GetAwaiter().GetResult(); target.PageTemplateConfigurationTemplate = configurationTemplate; target.PageTemplateConfigurationWidgets = configurationWidgets; diff --git a/KVA/Migration.Tool.Source/Migration.Tool.Source.csproj b/KVA/Migration.Tool.Source/Migration.Tool.Source.csproj index 9344a5c2..20bd9bdf 100644 --- a/KVA/Migration.Tool.Source/Migration.Tool.Source.csproj +++ b/KVA/Migration.Tool.Source/Migration.Tool.Source.csproj @@ -12,7 +12,7 @@ - + diff --git a/KVA/Migration.Tool.Source/Services/PageBuilderPatcher.cs b/KVA/Migration.Tool.Source/Services/VisualBuilderPatcher.cs similarity index 97% rename from KVA/Migration.Tool.Source/Services/PageBuilderPatcher.cs rename to KVA/Migration.Tool.Source/Services/VisualBuilderPatcher.cs index 43f604b4..c0c59c74 100644 --- a/KVA/Migration.Tool.Source/Services/PageBuilderPatcher.cs +++ b/KVA/Migration.Tool.Source/Services/VisualBuilderPatcher.cs @@ -17,8 +17,8 @@ namespace Migration.Tool.Source.Services; public record PageBuilderPatchResult(string? Configuration, string? Widgets, bool NeedsDeferredPatch); -public class PageBuilderPatcher( - ILogger logger, +public class VisualBuilderPatcher( + ILogger logger, SourceInstanceContext sourceInstanceContext, WidgetMigrationService widgetMigrationService, ModelFacade modelFacade, diff --git a/Migration.Tool.Common/Migration.Tool.Common.csproj b/Migration.Tool.Common/Migration.Tool.Common.csproj index 8d9b8ca1..d9b6ceb3 100644 --- a/Migration.Tool.Common/Migration.Tool.Common.csproj +++ b/Migration.Tool.Common/Migration.Tool.Common.csproj @@ -17,7 +17,7 @@ - + diff --git a/Migration.Tool.Core.KX13/Migration.Tool.Core.KX13.csproj b/Migration.Tool.Core.KX13/Migration.Tool.Core.KX13.csproj index 9d040107..009bf267 100644 --- a/Migration.Tool.Core.KX13/Migration.Tool.Core.KX13.csproj +++ b/Migration.Tool.Core.KX13/Migration.Tool.Core.KX13.csproj @@ -11,7 +11,7 @@ - + diff --git a/Migration.Tool.KXP.Api/Migration.Tool.KXP.Api.csproj b/Migration.Tool.KXP.Api/Migration.Tool.KXP.Api.csproj index 3c03faa7..78a7b602 100644 --- a/Migration.Tool.KXP.Api/Migration.Tool.KXP.Api.csproj +++ b/Migration.Tool.KXP.Api/Migration.Tool.KXP.Api.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/Migration.Tool.KXP.Extensions/Migration.Tool.KXP.Extensions.csproj b/Migration.Tool.KXP.Extensions/Migration.Tool.KXP.Extensions.csproj index b72a00f7..374360e2 100644 --- a/Migration.Tool.KXP.Extensions/Migration.Tool.KXP.Extensions.csproj +++ b/Migration.Tool.KXP.Extensions/Migration.Tool.KXP.Extensions.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/README.md b/README.md index 7ed0edd9..c346c341 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ View all [project releases](https://github.com/Kentico/xperience-by-kentico-kent | Xperience Version | Library Version | |-------------------|-----------------| +| 30.0.0 | 2.0.0 | | 29.7.0 | 1.6.0 | | 29.6.0 | 1.4.0 | | 29.5.2 | 1.3.0 |