Skip to content

Commit

Permalink
updating APIs, removing obsolete API usage, fixing build warnings (#14)
Browse files Browse the repository at this point in the history
* upgrade xbk version, remove build warnings

* Setting ui page's icons with setter

* upgrade 30.0.0
  • Loading branch information
jiri-malec authored Jan 6, 2025
1 parent 9320972 commit aadd876
Show file tree
Hide file tree
Showing 43 changed files with 5,133 additions and 5,200 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,9 @@ segments_2i
**/CMSModules/WebFarm/*

# Files Generated by this integration
**/App_Data/Kentico.Xperience.SalesforceSalesCloud/*
**/App_Data/Kentico.Xperience.SalesforceSalesCloud/*
/examples/DancingGoat/appsettings.Development.json

# Publishing profiles
*.pubxml
*.pubxml.user
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>$(Company)</Authors>
<Copyright>Copyright © $(Company) $([System.DateTime]::Now.Year)</Copyright>
<Trademark>$(Company)™</Trademark>
<VersionPrefix>2.0.0</VersionPrefix>
<VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand All @@ -22,7 +22,7 @@
</ItemGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand Down
48 changes: 24 additions & 24 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Kentico.Xperience.Admin" Version="28.0.0" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="28.0.0" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="28.0.0" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="28.0.0" />
<PackageVersion Include="Kentico.Xperience.Core" Version="28.0.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.17.0.82934" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="NUnit" Version="4.0.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.1.17" />
<PackageVersion Include="Duende.AccessTokenManagement.OpenIdConnect" Version="2.1.0" />
<PackageVersion Include="IdentityModel" Version="6.2.0" />
<PackageVersion Include="NSwag.ApiDescription.Client" Version="[13.20.0, 14.0.0)" />
</ItemGroup>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Kentico.Xperience.Admin" Version="30.0.0" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="30.0.0" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="30.0.0" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="30.0.0" />
<PackageVersion Include="Kentico.Xperience.Core" Version="30.0.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.4.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.2.2" />
<PackageVersion Include="Duende.AccessTokenManagement.OpenIdConnect" Version="2.1.2" />
<PackageVersion Include="IdentityModel" Version="7.0.0" />
<PackageVersion Include="NSwag.ApiDescription.Client" Version="[13.20.0, 14.0.0)" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ The versions of this library are supported by the following versions of Xperienc
|-------------------|-----------------|
| >= 28.0.0 | >= 1.0.0 |
| >= 28.3.1 | >= 2.0.0 |
| >= 30.0.0 | >= 3.0.0 |

### Dependencies

- [ASP.NET Core 6.0](https://dotnet.microsoft.com/en-us/download)
- [ASP.NET Core 8.0](https://dotnet.microsoft.com/en-us/download)
- [Xperience by Kentico](https://docs.xperience.io/xp/changelog)

## Package Installation
Expand Down
2 changes: 1 addition & 1 deletion examples/DancingGoat/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"kentico.xperience.dbmanager": {
"version": "28.0.0",
"version": "30.0.0",
"commands": [
"kentico-xperience-dbmanager"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public class SampleDataGeneratorApplication : OverviewPageBase

private readonly IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer;
private readonly IEventLogService eventLogService;
private readonly IConsentInfoProvider consentInfoProvider;
private readonly IBizFormInfoProvider bizFormInfoProvider;
private readonly IContactGroupInfoProvider contactGroupInfoProvider;
private readonly ISettingsKeyInfoProvider settingsKeyInfoProvider;
private readonly IInfoProvider<ConsentInfo> consentInfoProvider;
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;
private readonly IInfoProvider<ContactGroupInfo> contactGroupInfoProvider;
private readonly IInfoProvider<SettingsKeyInfo> settingsKeyInfoProvider;
private readonly IInfoProvider<WebsiteChannelInfo> websiteChannelInfoProvider;


Expand All @@ -56,10 +56,10 @@ public class SampleDataGeneratorApplication : OverviewPageBase
public SampleDataGeneratorApplication(
IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer,
IEventLogService eventLogService,
IConsentInfoProvider consentInfoProvider,
IBizFormInfoProvider bizFormInfoProvider,
IContactGroupInfoProvider contactGroupInfoProvider,
ISettingsKeyInfoProvider settingsKeyInfoProvider,
IInfoProvider<ConsentInfo> consentInfoProvider,
IInfoProvider<BizFormInfo> bizFormInfoProvider,
IInfoProvider<ContactGroupInfo> contactGroupInfoProvider,
IInfoProvider<SettingsKeyInfo> settingsKeyInfoProvider,
IInfoProvider<WebsiteChannelInfo> websiteChannelInfoProvider)
{
this.formBuilderConfigurationSerializer = formBuilderConfigurationSerializer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CMS.ContactManagement;
using CMS.DataEngine;
using CMS.DataProtection;
using CMS.Websites;
using CMS.Websites.Routing;
Expand All @@ -15,7 +16,7 @@ namespace DancingGoat.ViewComponents
{
public class TrackingConsentViewComponent : ViewComponent
{
private readonly IConsentInfoProvider consentInfoProvider;
private readonly IInfoProvider<ConsentInfo> consentInfoProvider;
private readonly IConsentAgreementService consentAgreementService;
private readonly IPreferredLanguageRetriever currentLanguageRetriever;
private readonly IWebPageDataContextRetriever webPageDataContextRetriever;
Expand All @@ -24,7 +25,7 @@ public class TrackingConsentViewComponent : ViewComponent


public TrackingConsentViewComponent(
IConsentInfoProvider consentInfoProvider,
IInfoProvider<ConsentInfo> consentInfoProvider,
IConsentAgreementService consentAgreementService,
IPreferredLanguageRetriever currentLanguageRetriever,
IWebPageDataContextRetriever webPageDataContextRetriever,
Expand Down
5 changes: 3 additions & 2 deletions examples/DancingGoat/Controllers/ConsentController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CMS.ContactManagement;
using CMS.DataEngine;
using CMS.DataProtection;
using CMS.Helpers;

Expand All @@ -12,10 +13,10 @@ public class ConsentController : Controller
{
private readonly ICurrentCookieLevelProvider cookieLevelProvider;
private readonly IConsentAgreementService consentAgreementService;
private readonly IConsentInfoProvider consentInfoProvider;
private readonly IInfoProvider<ConsentInfo> consentInfoProvider;


public ConsentController(ICurrentCookieLevelProvider cookieLevelProvider, IConsentAgreementService consentAgreementService, IConsentInfoProvider consentInfoProvider)
public ConsentController(ICurrentCookieLevelProvider cookieLevelProvider, IConsentAgreementService consentAgreementService, IInfoProvider<ConsentInfo> consentInfoProvider)
{
this.cookieLevelProvider = cookieLevelProvider;
this.consentAgreementService = consentAgreementService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CMS.ContactManagement;
using CMS.DataEngine;
using CMS.DataProtection;

using DancingGoat;
Expand All @@ -20,7 +21,7 @@ public class DancingGoatPrivacyController : Controller
private const string ERROR_RESULT = "error";

private readonly IConsentAgreementService consentAgreementService;
private readonly IConsentInfoProvider consentInfoProvider;
private readonly IInfoProvider<ConsentInfo> consentInfoProvider;
private readonly IPreferredLanguageRetriever currentLanguageRetriever;
private ContactInfo currentContact;

Expand All @@ -39,7 +40,7 @@ private ContactInfo CurrentContact
}


public DancingGoatPrivacyController(IConsentAgreementService consentAgreementService, IConsentInfoProvider consentInfoProvider, IPreferredLanguageRetriever currentLanguageRetriever)
public DancingGoatPrivacyController(IConsentAgreementService consentAgreementService, IInfoProvider<ConsentInfo> consentInfoProvider, IPreferredLanguageRetriever currentLanguageRetriever)
{
this.consentAgreementService = consentAgreementService;
this.consentInfoProvider = consentInfoProvider;
Expand Down
2 changes: 1 addition & 1 deletion examples/DancingGoat/DancingGoat.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<RootNamespace>DancingGoat</RootNamespace>
<UserSecretsId>7c090b2f-e617-4788-a234-2d7a5e11b80a</UserSecretsId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ internal class DancingGoatSamplesModule : Module
{
private const string DATA_PROTECTION_SAMPLES_ENABLED_SETTINGS_KEY_NAME = "DataProtectionSamplesEnabled";

private IContactInfoProvider contactInfoProvider;
private IInfoProvider<ContactInfo> contactInfoProvider;
private IMemberInfoProvider memberInfoProvider;
private IConsentAgreementInfoProvider consentAgreementInfoProvider;
private IBizFormInfoProvider bizFormInfoProvider;
private IAccountContactInfoProvider accountContactInfoProvider;
private ISettingsKeyInfoProvider settingsKeyInfoProvider;
private IActivityInfoProvider activityInfoProvider;
private ICountryInfoProvider countryInfoProvider;
private IStateInfoProvider stateInfoProvider;
private IAccountInfoProvider accountInfoProvider;
private IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider;
private IInfoProvider<BizFormInfo> bizFormInfoProvider;
private IInfoProvider<AccountContactInfo> accountContactInfoProvider;
private IInfoProvider<SettingsKeyInfo> settingsKeyInfoProvider;
private IInfoProvider<ActivityInfo> activityInfoProvider;
private IInfoProvider<CountryInfo> countryInfoProvider;
private IInfoProvider<StateInfo> stateInfoProvider;
private IInfoProvider<AccountInfo> accountInfoProvider;


/// <summary>
Expand All @@ -54,16 +54,16 @@ protected override void OnInit()
{
base.OnInit();

contactInfoProvider = Service.Resolve<IContactInfoProvider>();
contactInfoProvider = Service.Resolve<IInfoProvider<ContactInfo>>();
memberInfoProvider = Service.Resolve<IMemberInfoProvider>();
consentAgreementInfoProvider = Service.Resolve<IConsentAgreementInfoProvider>();
bizFormInfoProvider = Service.Resolve<IBizFormInfoProvider>();
accountContactInfoProvider = Service.Resolve<IAccountContactInfoProvider>();
settingsKeyInfoProvider = Service.Resolve<ISettingsKeyInfoProvider>();
activityInfoProvider = Service.Resolve<IActivityInfoProvider>();
countryInfoProvider = Service.Resolve<ICountryInfoProvider>();
stateInfoProvider = Service.Resolve<IStateInfoProvider>();
accountInfoProvider = Service.Resolve<IAccountInfoProvider>();
consentAgreementInfoProvider = Service.Resolve<IInfoProvider<ConsentAgreementInfo>>();
bizFormInfoProvider = Service.Resolve<IInfoProvider<BizFormInfo>>();
accountContactInfoProvider = Service.Resolve<IInfoProvider<AccountContactInfo>>();
settingsKeyInfoProvider = Service.Resolve<IInfoProvider<SettingsKeyInfo>>();
activityInfoProvider = Service.Resolve<IInfoProvider<ActivityInfo>>();
countryInfoProvider = Service.Resolve<IInfoProvider<CountryInfo>>();
stateInfoProvider = Service.Resolve<IInfoProvider<StateInfo>>();
accountInfoProvider = Service.Resolve<IInfoProvider<AccountInfo>>();

InitializeSamples();
}
Expand Down Expand Up @@ -104,7 +104,7 @@ internal void RegisterSamples()
accountContactInfoProvider, accountInfoProvider, bizFormInfoProvider));
PersonalDataCollectorRegister.Instance.Add(new SampleMemberDataCollector());

PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider));
PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider));
PersonalDataEraserRegister.Instance.Add(new SampleMemberPersonalDataEraser(memberInfoProvider));

RegisterConsentRevokeHandler();
Expand All @@ -118,7 +118,7 @@ internal void DeleteContactActivities(ContactInfo contact)
{ "deleteActivities", true }
};

new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider)
new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider)
.Erase(new[] { contact }, configuration);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ namespace Samples.DancingGoat
/// </summary>
internal class SampleContactInfoIdentityCollector : IIdentityCollector
{
private readonly IContactInfoProvider contactInfoProvider;
private readonly IInfoProvider<ContactInfo> contactInfoProvider;


/// <summary>
/// Initializes a new instance of the <see cref="SampleContactInfoIdentityCollector"/> class.
/// </summary>
/// <param name="contactInfoProvider">Contact info provider.</param>
public SampleContactInfoIdentityCollector(IContactInfoProvider contactInfoProvider)
public SampleContactInfoIdentityCollector(IInfoProvider<ContactInfo> contactInfoProvider)
{
this.contactInfoProvider = contactInfoProvider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace Samples.DancingGoat
/// </summary>
internal class SampleContactDataCollector : IPersonalDataCollector
{
private readonly IActivityInfoProvider activityInfoProvider;
private readonly ICountryInfoProvider countryInfoProvider;
private readonly IStateInfoProvider stateInfoProvider;
private readonly IConsentAgreementInfoProvider consentAgreementInfoProvider;
private readonly IAccountContactInfoProvider accountContactInfoProvider;
private readonly IAccountInfoProvider accountInfoProvider;
private readonly IBizFormInfoProvider bizFormInfoProvider;
private readonly IInfoProvider<ActivityInfo> activityInfoProvider;
private readonly IInfoProvider<CountryInfo> countryInfoProvider;
private readonly IInfoProvider<StateInfo> stateInfoProvider;
private readonly IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider;
private readonly IInfoProvider<AccountContactInfo> accountContactInfoProvider;
private readonly IInfoProvider<AccountInfo> accountInfoProvider;
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;


/// <summary>
Expand All @@ -32,13 +32,13 @@ internal class SampleContactDataCollector : IPersonalDataCollector
/// <param name="accountInfoProvider">Account info provider.</param>
/// <param name="bizFormInfoProvider">BizForm info provider.</param>
public SampleContactDataCollector(
IActivityInfoProvider activityInfoProvider,
ICountryInfoProvider countryInfoProvider,
IStateInfoProvider stateInfoProvider,
IConsentAgreementInfoProvider consentAgreementInfoProvider,
IAccountContactInfoProvider accountContactInfoProvider,
IAccountInfoProvider accountInfoProvider,
IBizFormInfoProvider bizFormInfoProvider)
IInfoProvider<ActivityInfo> activityInfoProvider,
IInfoProvider<CountryInfo> countryInfoProvider,
IInfoProvider<StateInfo> stateInfoProvider,
IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider,
IInfoProvider<AccountContactInfo> accountContactInfoProvider,
IInfoProvider<AccountInfo> accountInfoProvider,
IInfoProvider<BizFormInfo> bizFormInfoProvider)
{
this.activityInfoProvider = activityInfoProvider;
this.countryInfoProvider = countryInfoProvider;
Expand Down
Loading

0 comments on commit aadd876

Please sign in to comment.