From 07abec239d260f366e188af39b395ed7131ae485 Mon Sep 17 00:00:00 2001 From: Nicklas Kramer Date: Mon, 25 Aug 2025 09:37:18 +0200 Subject: [PATCH] V17 - Removed obsoleted code from Cms.Api (#19963) * Removing obsoleted constructor from SubTypesSelector.cs * V17 - Removed obsoleted code from Cms.Api.Delivery (#19964) * Removing obsoleted constructors from AncestorsSelector.cs * Removing obsoleted constructors from ChildrenSelector.cs * Removing obsoleted code from DescendantsSelector.cs * Removing obsoleted code from RequestCultureService.cs * Removing obsoleted code from QueryOptionBase.cs * Removing obsoleted code from BackOfficeApplicationManager.cs & Dependencies * Removing obsoleted code from ByKeyDocumentController.cs * Removing obsoleted code from ContentCollectionControllerBase.cs & dependencies * Removing obsoleted code from DocumentPresentationFactory.cs * Removing obsoleted code from HealthCheckGroupPresentationFactory.cs & dependencies & IBackOfficeApplicationManager.cs * Removing obsoleted code from DocumentPermissionMapper.cs * Removing obsoleted code from DocumentResponseModel.cs * Removing obsoleted code from ExecuteTemplateQueryController.cs * Removing obsoleted code from MediaCollectionControllerBase.cs & Dependencies * Removing the class ReferencesDataTypeController.cs * Removing obsoleted code from RelationTypePresentationFactory.cs * Removing obsoleted code from SearchDocumentTypeItemController.cs * Removing obsoleted code from UserPresentationFactory.cs & Dependencies * Removing obsoleted code from ValidateCreateDocumentController.cs & Dependencies * Removing unused imports and redundant attribute * Removing unused constructor attribute --- .../OpenApi/SubTypesSelector.cs | 14 ---- .../Querying/QueryOptionBase.cs | 27 ------- .../Querying/Selectors/AncestorsSelector.cs | 55 ------------- .../Querying/Selectors/ChildrenSelector.cs | 21 ----- .../Querying/Selectors/DescendantsSelector.cs | 21 ----- .../Services/RequestCultureService.cs | 6 -- .../ContentCollectionControllerBase.cs | 33 -------- .../DataType/ReferencesDataTypeController.cs | 40 ---------- .../Document/ByKeyDocumentController.cs | 28 ------- .../DocumentCollectionControllerBase.cs | 6 -- .../ValidateCreateDocumentController.cs | 14 ---- .../ValidateUpdateDocumentController.cs | 14 ---- .../Item/SearchDocumentTypeItemController.cs | 23 ------ .../MediaCollectionControllerBase.cs | 6 -- .../Security/BackOfficeDefaultController.cs | 6 -- .../Query/ExecuteTemplateQueryController.cs | 35 --------- .../DocumentCollectionPresentationFactory.cs | 9 --- .../Factories/DocumentPresentationFactory.cs | 78 ------------------- .../HealthCheckGroupPresentationFactory.cs | 8 -- .../Factories/IDocumentPresentationFactory.cs | 13 +--- .../IHealthCheckGroupPresentationFactory.cs | 17 +--- .../RelationTypePresentationFactory.cs | 10 --- .../Factories/UserPresentationFactory.cs | 72 ----------------- .../Permissions/DocumentPermissionMapper.cs | 11 --- ...ceAuthorizationInitializationMiddleware.cs | 12 --- .../Security/BackOfficeApplicationManager.cs | 7 +- .../BackOfficeExternalLoginProviders.cs | 13 ---- .../Entities/UserStartNodeEntitiesService.cs | 9 --- .../Document/DocumentResponseModel.cs | 3 - .../ViewModels/Media/MediaResponseModel.cs | 3 - .../DeliveryApi/IRequestCultureService.cs | 3 - 31 files changed, 5 insertions(+), 612 deletions(-) delete mode 100644 src/Umbraco.Cms.Api.Management/Controllers/DataType/ReferencesDataTypeController.cs diff --git a/src/Umbraco.Cms.Api.Common/OpenApi/SubTypesSelector.cs b/src/Umbraco.Cms.Api.Common/OpenApi/SubTypesSelector.cs index 947e7a8197..3e4d1a6295 100644 --- a/src/Umbraco.Cms.Api.Common/OpenApi/SubTypesSelector.cs +++ b/src/Umbraco.Cms.Api.Common/OpenApi/SubTypesSelector.cs @@ -15,20 +15,6 @@ public class SubTypesSelector : ISubTypesSelector private readonly IEnumerable _subTypeHandlers; private readonly IUmbracoJsonTypeInfoResolver _umbracoJsonTypeInfoResolver; - [Obsolete("The settings parameter is not required anymore, use the other constructor instead. Scheduled for removal in Umbraco 17.")] - public SubTypesSelector( - IOptions settings, - IHostingEnvironment hostingEnvironment, - IHttpContextAccessor httpContextAccessor, - IEnumerable subTypeHandlers, - IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver) - { - _hostingEnvironment = hostingEnvironment; - _httpContextAccessor = httpContextAccessor; - _subTypeHandlers = subTypeHandlers; - _umbracoJsonTypeInfoResolver = umbracoJsonTypeInfoResolver; - } - public SubTypesSelector( IHostingEnvironment hostingEnvironment, IHttpContextAccessor httpContextAccessor, diff --git a/src/Umbraco.Cms.Api.Delivery/Querying/QueryOptionBase.cs b/src/Umbraco.Cms.Api.Delivery/Querying/QueryOptionBase.cs index a01f8ee9af..8af09fce6c 100644 --- a/src/Umbraco.Cms.Api.Delivery/Querying/QueryOptionBase.cs +++ b/src/Umbraco.Cms.Api.Delivery/Querying/QueryOptionBase.cs @@ -1,8 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Core.DeliveryApi; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PublishedCache; using Umbraco.Extensions; namespace Umbraco.Cms.Api.Delivery.Querying; @@ -14,30 +11,6 @@ public abstract class QueryOptionBase private readonly IApiDocumentUrlService _apiDocumentUrlService; private readonly IVariationContextAccessor _variationContextAccessor; - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public QueryOptionBase( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService) - : this( - requestRoutingService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public QueryOptionBase( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService, - IRequestPreviewService requestPreviewService, - IRequestCultureService requestCultureService, - IApiDocumentUrlService apiDocumentUrlService, - IVariationContextAccessor variationContextAccessor) - : this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor) - { - } - public QueryOptionBase( IRequestRoutingService requestRoutingService, IRequestPreviewService requestPreviewService, diff --git a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs index b3a8dca0d6..c0a4d4909e 100644 --- a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs +++ b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs @@ -1,9 +1,6 @@ -using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Api.Delivery.Indexing.Selectors; using Umbraco.Cms.Core.DeliveryApi; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Services.Navigation; namespace Umbraco.Cms.Api.Delivery.Querying.Selectors; @@ -13,46 +10,6 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler private readonly IDocumentNavigationQueryService _navigationQueryService; private const string AncestorsSpecifier = "ancestors:"; - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public AncestorsSelector( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService, - IDocumentNavigationQueryService navigationQueryService, - IRequestPreviewService requestPreviewService) - : this( - requestRoutingService, - requestPreviewService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - navigationQueryService) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public AncestorsSelector( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService, - IDocumentNavigationQueryService navigationQueryService) - : this( - requestRoutingService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - navigationQueryService) - { - } - - [Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")] - public AncestorsSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService) - : this( - requestRoutingService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - public AncestorsSelector( IRequestRoutingService requestRoutingService, IRequestPreviewService requestPreviewService, @@ -62,18 +19,6 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler : base(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor) => _navigationQueryService = navigationQueryService; - [Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")] - public AncestorsSelector( - IRequestRoutingService requestRoutingService, - IPublishedContentCache publishedContentCache, - IRequestPreviewService requestPreviewService, - IApiDocumentUrlService apiDocumentUrlService, - IVariationContextAccessor variationContextAccessor, - IDocumentNavigationQueryService navigationQueryService) - : this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor, navigationQueryService) - { - } - /// public bool CanHandle(string query) => query.StartsWith(AncestorsSpecifier, StringComparison.OrdinalIgnoreCase); diff --git a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/ChildrenSelector.cs b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/ChildrenSelector.cs index 4040371f65..7a2fb9323b 100644 --- a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/ChildrenSelector.cs +++ b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/ChildrenSelector.cs @@ -12,27 +12,6 @@ public sealed class ChildrenSelector : QueryOptionBase, ISelectorHandler { private const string ChildrenSpecifier = "children:"; - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public ChildrenSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService) - : this( - requestRoutingService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public ChildrenSelector( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService, - IRequestPreviewService requestPreviewService, - IApiDocumentUrlService apiDocumentUrlService, - IVariationContextAccessor variationContextAccessor) - : this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor) - { - } - public ChildrenSelector( IRequestRoutingService requestRoutingService, IRequestPreviewService requestPreviewService, diff --git a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/DescendantsSelector.cs b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/DescendantsSelector.cs index d46d5499b4..eda9a70beb 100644 --- a/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/DescendantsSelector.cs +++ b/src/Umbraco.Cms.Api.Delivery/Querying/Selectors/DescendantsSelector.cs @@ -12,27 +12,6 @@ public sealed class DescendantsSelector : QueryOptionBase, ISelectorHandler { private const string DescendantsSpecifier = "descendants:"; - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public DescendantsSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService) - : this( - requestRoutingService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public DescendantsSelector( - IPublishedContentCache publishedContentCache, - IRequestRoutingService requestRoutingService, - IRequestPreviewService requestPreviewService, - IApiDocumentUrlService apiDocumentUrlService, - IVariationContextAccessor variationContextAccessor) - : this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor) - { - } - public DescendantsSelector( IRequestRoutingService requestRoutingService, IRequestPreviewService requestPreviewService, diff --git a/src/Umbraco.Cms.Api.Delivery/Services/RequestCultureService.cs b/src/Umbraco.Cms.Api.Delivery/Services/RequestCultureService.cs index 696b8b3953..5f797ff15b 100644 --- a/src/Umbraco.Cms.Api.Delivery/Services/RequestCultureService.cs +++ b/src/Umbraco.Cms.Api.Delivery/Services/RequestCultureService.cs @@ -19,12 +19,6 @@ internal sealed partial class RequestCultureService : RequestHeaderHandler, IReq return ValidLanguageHeaderRegex().IsMatch(acceptLanguage) ? acceptLanguage : null; } - [Obsolete("Use IVariationContextAccessor to manipulate the variation context. Scheduled for removal in V17.")] - public void SetRequestCulture(string culture) - { - // no-op - } - // at the time of writing we're introducing this to get rid of accept-language header values like "en-GB,en-US;q=0.9,en;q=0.8", // so we don't want to be too restrictive in this regex - keep it simple for now. [GeneratedRegex(@"^[\w-]*$")] diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs b/src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs index a38ade6060..f7b540f034 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs @@ -29,39 +29,6 @@ public abstract class ContentCollectionControllerBase()) - { - } - - [Obsolete("This method is no longer used and will be removed in Umbraco 17.")] - protected IActionResult CollectionResult(ListViewPagedModel result) - { - PagedModel collectionItemsResult = result.Items; - ListViewConfiguration collectionConfiguration = result.ListViewConfiguration; - - var collectionPropertyAliases = collectionConfiguration - .IncludeProperties - .Select(p => p.Alias) - .WhereNotNull() - .ToArray(); - - List collectionResponseModels = - _mapper.MapEnumerable(collectionItemsResult.Items, context => - { - context.SetIncludedProperties(collectionPropertyAliases); - }); - - var pageViewModel = new PagedViewModel - { - Items = collectionResponseModels, - Total = collectionItemsResult.Total, - }; - - return Ok(pageViewModel); - } - /// /// Creates a collection result from the provided collection response models and total number of items. /// diff --git a/src/Umbraco.Cms.Api.Management/Controllers/DataType/ReferencesDataTypeController.cs b/src/Umbraco.Cms.Api.Management/Controllers/DataType/ReferencesDataTypeController.cs deleted file mode 100644 index 0eee28e49b..0000000000 --- a/src/Umbraco.Cms.Api.Management/Controllers/DataType/ReferencesDataTypeController.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Asp.Versioning; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Umbraco.Cms.Api.Management.Factories; -using Umbraco.Cms.Api.Management.ViewModels.DataType; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Services; -using Umbraco.Cms.Core.Services.OperationStatus; - -namespace Umbraco.Cms.Api.Management.Controllers.DataType; - -[ApiVersion("1.0")] -[Obsolete("Please use ReferencedByDataTypeController and the referenced-by endpoint. Scheduled for removal in Umbraco 17.")] -public class ReferencesDataTypeController : DataTypeControllerBase -{ - private readonly IDataTypeService _dataTypeService; - private readonly IDataTypeReferencePresentationFactory _dataTypeReferencePresentationFactory; - - public ReferencesDataTypeController(IDataTypeService dataTypeService, IDataTypeReferencePresentationFactory dataTypeReferencePresentationFactory) - { - _dataTypeService = dataTypeService; - _dataTypeReferencePresentationFactory = dataTypeReferencePresentationFactory; - } - - [HttpGet("{id:guid}/references")] - [MapToApiVersion("1.0")] - [ProducesResponseType(typeof(DataTypeReferenceResponseModel[]), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] - public async Task References(CancellationToken cancellationToken, Guid id) - { - Attempt>, DataTypeOperationStatus> result = await _dataTypeService.GetReferencesAsync(id); - if (result.Success == false) - { - return DataTypeOperationStatusResult(result.Status); - } - - DataTypeReferenceResponseModel[] viewModels = _dataTypeReferencePresentationFactory.CreateDataTypeReferenceViewModels(result.Result).ToArray(); - return Ok(viewModels); - } -} diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs index bb90d7f57a..f61fa15408 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Document/ByKeyDocumentController.cs @@ -2,13 +2,10 @@ using Asp.Versioning; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Api.Management.Factories; using Umbraco.Cms.Api.Management.ViewModels.Document; using Umbraco.Cms.Core.Actions; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Security.Authorization; -using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Services.Querying; using Umbraco.Cms.Web.Common.Authorization; using Umbraco.Extensions; @@ -22,31 +19,6 @@ public class ByKeyDocumentController : DocumentControllerBase private readonly IDocumentPresentationFactory _documentPresentationFactory; private readonly IContentQueryService _contentQueryService; - [Obsolete("Scheduled for removal in v17")] - public ByKeyDocumentController( - IAuthorizationService authorizationService, - IContentEditingService contentEditingService, - IDocumentPresentationFactory documentPresentationFactory) - { - _authorizationService = authorizationService; - _documentPresentationFactory = documentPresentationFactory; - _contentQueryService = StaticServiceProvider.Instance.GetRequiredService(); - } - - // needed for greedy selection until other constructor remains in v17 - [Obsolete("Scheduled for removal in v17")] - public ByKeyDocumentController( - IAuthorizationService authorizationService, - IContentEditingService contentEditingService, - IDocumentPresentationFactory documentPresentationFactory, - IContentQueryService contentQueryService) - { - _authorizationService = authorizationService; - _documentPresentationFactory = documentPresentationFactory; - _contentQueryService = contentQueryService; - } - - [ActivatorUtilitiesConstructor] public ByKeyDocumentController( IAuthorizationService authorizationService, IDocumentPresentationFactory documentPresentationFactory, diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Document/Collection/DocumentCollectionControllerBase.cs b/src/Umbraco.Cms.Api.Management/Controllers/Document/Collection/DocumentCollectionControllerBase.cs index 8de4daa401..037308d32f 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Document/Collection/DocumentCollectionControllerBase.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Document/Collection/DocumentCollectionControllerBase.cs @@ -23,12 +23,6 @@ public abstract class DocumentCollectionControllerBase : ContentCollectionContro { } - [Obsolete("Please use the constructor with all parameters. Scheduled to be removed in V18")] - protected DocumentCollectionControllerBase(IUmbracoMapper mapper) - : base(mapper) - { - } - protected IActionResult CollectionOperationStatusResult(ContentCollectionOperationStatus status) => ContentCollectionOperationStatusResult(status, "document"); } diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateCreateDocumentController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateCreateDocumentController.cs index 7087e119f7..2ba44b38ab 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateCreateDocumentController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateCreateDocumentController.cs @@ -21,20 +21,6 @@ public class ValidateCreateDocumentController : CreateDocumentControllerBase private readonly IContentEditingService _contentEditingService; private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor; - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] - public ValidateCreateDocumentController( - IAuthorizationService authorizationService, - IDocumentEditingPresentationFactory documentEditingPresentationFactory, - IContentEditingService contentEditingService) - : this( - authorizationService, - documentEditingPresentationFactory, - contentEditingService, - StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [ActivatorUtilitiesConstructor] public ValidateCreateDocumentController( IAuthorizationService authorizationService, IDocumentEditingPresentationFactory documentEditingPresentationFactory, diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateUpdateDocumentController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateUpdateDocumentController.cs index bf06571c94..e5470de907 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateUpdateDocumentController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Document/ValidateUpdateDocumentController.cs @@ -21,20 +21,6 @@ public class ValidateUpdateDocumentController : UpdateDocumentControllerBase private readonly IDocumentEditingPresentationFactory _documentEditingPresentationFactory; private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor; - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] - public ValidateUpdateDocumentController( - IAuthorizationService authorizationService, - IContentEditingService contentEditingService, - IDocumentEditingPresentationFactory documentEditingPresentationFactory) - : this( - authorizationService, - contentEditingService, - documentEditingPresentationFactory, - StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [ActivatorUtilitiesConstructor] public ValidateUpdateDocumentController( IAuthorizationService authorizationService, IContentEditingService contentEditingService, diff --git a/src/Umbraco.Cms.Api.Management/Controllers/DocumentType/Item/SearchDocumentTypeItemController.cs b/src/Umbraco.Cms.Api.Management/Controllers/DocumentType/Item/SearchDocumentTypeItemController.cs index fd9a9217b0..5e9ceb568a 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/DocumentType/Item/SearchDocumentTypeItemController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/DocumentType/Item/SearchDocumentTypeItemController.cs @@ -16,35 +16,12 @@ public class SearchDocumentTypeItemController : DocumentTypeItemControllerBase private readonly IUmbracoMapper _mapper; private readonly IContentTypeSearchService _contentTypeSearchService; - [Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")] - public SearchDocumentTypeItemController(IEntitySearchService entitySearchService, IContentTypeService contentTypeService, IUmbracoMapper mapper) - : this(mapper, StaticServiceProvider.Instance.GetRequiredService()) - { - } - - [Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")] - // We need to have this constructor, or else we get ambiguous constructor error - public SearchDocumentTypeItemController( - IEntitySearchService entitySearchService, - IContentTypeService contentTypeService, - IUmbracoMapper mapper, - IContentTypeSearchService contentTypeSearchService) - : this(mapper, contentTypeSearchService) - { - } - - [ActivatorUtilitiesConstructor] public SearchDocumentTypeItemController(IUmbracoMapper mapper, IContentTypeSearchService contentTypeSearchService) { _mapper = mapper; _contentTypeSearchService = contentTypeSearchService; } - [NonAction] - [Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")] - public async Task Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100) - => await SearchDocumentType(cancellationToken, query, null, skip, take); - [HttpGet("search")] [MapToApiVersion("1.0")] [ProducesResponseType(typeof(PagedModel), StatusCodes.Status200OK)] diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Media/Collection/MediaCollectionControllerBase.cs b/src/Umbraco.Cms.Api.Management/Controllers/Media/Collection/MediaCollectionControllerBase.cs index 875c65c7ac..23c1b7362a 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Media/Collection/MediaCollectionControllerBase.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Media/Collection/MediaCollectionControllerBase.cs @@ -26,12 +26,6 @@ public abstract class MediaCollectionControllerBase : ContentCollectionControlle { } - [Obsolete("Please use the constructor with all parameters. Scheduled to be removed in Umbraco 18")] - protected MediaCollectionControllerBase(IUmbracoMapper mapper) - : base(mapper) - { - } - protected IActionResult CollectionOperationStatusResult(ContentCollectionOperationStatus status) => ContentCollectionOperationStatusResult(status, "media"); } diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Security/BackOfficeDefaultController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Security/BackOfficeDefaultController.cs index da6ab4b18a..195963ff8e 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Security/BackOfficeDefaultController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Security/BackOfficeDefaultController.cs @@ -17,12 +17,6 @@ public class BackOfficeDefaultController : Controller public BackOfficeDefaultController(IRuntime umbracoRuntime) => _umbracoRuntime = umbracoRuntime; - [Obsolete("Use the non obsoleted constructor instead. Scheduled to be removed in v17")] - public BackOfficeDefaultController() - : this(StaticServiceProvider.Instance.GetRequiredService()) - { - } - [HttpGet] [AllowAnonymous] public async Task Index(CancellationToken cancellationToken) diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Template/Query/ExecuteTemplateQueryController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Template/Query/ExecuteTemplateQueryController.cs index 07063b69f7..7e1fa743fb 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Template/Query/ExecuteTemplateQueryController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Template/Query/ExecuteTemplateQueryController.cs @@ -43,41 +43,6 @@ public class ExecuteTemplateQueryController : TemplateQueryControllerBase _publishedContentStatusFilteringService = publishedContentStatusFilteringService; } - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public ExecuteTemplateQueryController( - IPublishedContentQuery publishedContentQuery, - IVariationContextAccessor variationContextAccessor, - IPublishedValueFallback publishedValueFallback, - IContentTypeService contentTypeService, - IPublishedContentCache contentCache, - IDocumentNavigationQueryService documentNavigationQueryService, - IPublishedContentStatusFilteringService publishedContentStatusFilteringService) - : this( - publishedContentQuery, - publishedValueFallback, - contentTypeService, - documentNavigationQueryService, - publishedContentStatusFilteringService) - { - } - - [Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")] - public ExecuteTemplateQueryController( - IPublishedContentQuery publishedContentQuery, - IVariationContextAccessor variationContextAccessor, - IPublishedValueFallback publishedValueFallback, - IContentTypeService contentTypeService, - IPublishedContentCache contentCache, - IDocumentNavigationQueryService documentNavigationQueryService) - : this( - publishedContentQuery, - publishedValueFallback, - contentTypeService, - documentNavigationQueryService, - StaticServiceProvider.Instance.GetRequiredService()) - { - } - [HttpPost("execute")] [MapToApiVersion("1.0")] [ProducesResponseType(typeof(TemplateQueryResultResponseModel), StatusCodes.Status200OK)] diff --git a/src/Umbraco.Cms.Api.Management/Factories/DocumentCollectionPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/DocumentCollectionPresentationFactory.cs index b63704cbb2..0aadf6893d 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/DocumentCollectionPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/DocumentCollectionPresentationFactory.cs @@ -14,15 +14,6 @@ public class DocumentCollectionPresentationFactory : ContentCollectionPresentati private readonly IPublicAccessService _publicAccessService; private readonly IEntityService _entityService; - [Obsolete("Please use the non-obsolete constructor. Scheduled for removal in V17.")] - public DocumentCollectionPresentationFactory(IUmbracoMapper mapper, IPublicAccessService publicAccessService) - : this( - mapper, - publicAccessService, - StaticServiceProvider.Instance.GetRequiredService()) - { - } - [ActivatorUtilitiesConstructor] public DocumentCollectionPresentationFactory(IUmbracoMapper mapper, IPublicAccessService publicAccessService, IEntityService entityService) : base(mapper) diff --git a/src/Umbraco.Cms.Api.Management/Factories/DocumentPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/DocumentPresentationFactory.cs index f0e3c9901e..51596fb476 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/DocumentPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/DocumentPresentationFactory.cs @@ -40,22 +40,6 @@ internal sealed class DocumentPresentationFactory : IDocumentPresentationFactory _idKeyMap = idKeyMap; } - [Obsolete("Schedule for removal in v17")] - public async Task CreateResponseModelAsync(IContent content) - { - DocumentResponseModel responseModel = _umbracoMapper.Map(content)!; - - Guid? templateKey = content.TemplateId.HasValue - ? _templateService.GetAsync(content.TemplateId.Value).Result?.Key - : null; - - responseModel.Template = templateKey.HasValue - ? new ReferenceByIdModel { Id = templateKey.Value } - : null; - - return responseModel; - } - public async Task CreatePublishedResponseModelAsync(IContent content) { PublishedDocumentResponseModel responseModel = _umbracoMapper.Map(content)!; @@ -148,68 +132,6 @@ internal sealed class DocumentPresentationFactory : IDocumentPresentationFactory public DocumentTypeReferenceResponseModel CreateDocumentTypeReferenceResponseModel(IDocumentEntitySlim entity) => _umbracoMapper.Map(entity)!; - [Obsolete("Use CreateCulturePublishScheduleModels instead. Scheduled for removal in v17")] - public Attempt CreateCultureAndScheduleModel(PublishDocumentRequestModel requestModel) - { - var contentScheduleCollection = new ContentScheduleCollection(); - var culturesToPublishImmediately = new HashSet(); - foreach (CultureAndScheduleRequestModel cultureAndScheduleRequestModel in requestModel.PublishSchedules) - { - if (cultureAndScheduleRequestModel.Schedule is null || (cultureAndScheduleRequestModel.Schedule.PublishTime is null && cultureAndScheduleRequestModel.Schedule.UnpublishTime is null)) - { - culturesToPublishImmediately.Add(cultureAndScheduleRequestModel.Culture ?? Constants.System.InvariantCulture); // API have `null` for invariant, but service layer has "*". - continue; - } - - if (cultureAndScheduleRequestModel.Schedule.PublishTime is not null) - { - if (cultureAndScheduleRequestModel.Schedule.PublishTime <= _timeProvider.GetUtcNow()) - { - return Attempt.FailWithStatus(ContentPublishingOperationStatus.PublishTimeNeedsToBeInFuture, new CultureAndScheduleModel() - { - Schedules = contentScheduleCollection, - CulturesToPublishImmediately = culturesToPublishImmediately, - }); - } - - contentScheduleCollection.Add(new ContentSchedule( - cultureAndScheduleRequestModel.Culture ?? Constants.System.InvariantCulture, - cultureAndScheduleRequestModel.Schedule.PublishTime.Value.UtcDateTime, - ContentScheduleAction.Release)); - } - if (cultureAndScheduleRequestModel.Schedule.UnpublishTime is not null) - { - if (cultureAndScheduleRequestModel.Schedule.UnpublishTime <= cultureAndScheduleRequestModel.Schedule.PublishTime) - { - return Attempt.FailWithStatus(ContentPublishingOperationStatus.UnpublishTimeNeedsToBeAfterPublishTime, new CultureAndScheduleModel() - { - Schedules = contentScheduleCollection, - CulturesToPublishImmediately = culturesToPublishImmediately, - }); - } - - if (cultureAndScheduleRequestModel.Schedule.UnpublishTime <= _timeProvider.GetUtcNow()) - { - return Attempt.FailWithStatus(ContentPublishingOperationStatus.UpublishTimeNeedsToBeInFuture, new CultureAndScheduleModel() - { - Schedules = contentScheduleCollection, - CulturesToPublishImmediately = culturesToPublishImmediately, - }); - } - - contentScheduleCollection.Add(new ContentSchedule( - cultureAndScheduleRequestModel.Culture ?? Constants.System.InvariantCulture, - cultureAndScheduleRequestModel.Schedule.UnpublishTime.Value.UtcDateTime, - ContentScheduleAction.Expire)); - } - } - return Attempt.SucceedWithStatus(ContentPublishingOperationStatus.Success, new CultureAndScheduleModel() - { - Schedules = contentScheduleCollection, - CulturesToPublishImmediately = culturesToPublishImmediately, - }); - } - public Attempt, ContentPublishingOperationStatus> CreateCulturePublishScheduleModels(PublishDocumentRequestModel requestModel) { var model = new List(); diff --git a/src/Umbraco.Cms.Api.Management/Factories/HealthCheckGroupPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/HealthCheckGroupPresentationFactory.cs index 4f092c151c..77d0b5f79b 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/HealthCheckGroupPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/HealthCheckGroupPresentationFactory.cs @@ -41,14 +41,6 @@ public class HealthCheckGroupPresentationFactory : IHealthCheckGroupPresentation return groups; } - [Obsolete("Use CreateHealthCheckGroupWithResultViewModelAsync instead. Will be removed in v17.")] - public HealthCheckGroupWithResultResponseModel CreateHealthCheckGroupWithResultViewModel(IGrouping healthCheckGroup) - => CreateHealthCheckGroupWithResultViewModelAsync(healthCheckGroup).GetAwaiter().GetResult(); - - [Obsolete("Use CreateHealthCheckGroupWithResultViewModelAsync instead. Will be removed in v17.")] - public HealthCheckWithResultPresentationModel CreateHealthCheckWithResultViewModel(HealthCheck healthCheck) => - CreateHealthCheckWithResultViewModelAsync(healthCheck).GetAwaiter().GetResult(); - public async Task CreateHealthCheckGroupWithResultViewModelAsync(IGrouping healthCheckGroup) { var healthChecks = new List(); diff --git a/src/Umbraco.Cms.Api.Management/Factories/IDocumentPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/IDocumentPresentationFactory.cs index 34e0794070..1af214479b 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/IDocumentPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/IDocumentPresentationFactory.cs @@ -14,17 +14,9 @@ namespace Umbraco.Cms.Api.Management.Factories; public interface IDocumentPresentationFactory { - [Obsolete("Schedule for removal in v17")] - Task CreateResponseModelAsync(IContent content); - Task CreatePublishedResponseModelAsync(IContent content); - Task CreateResponseModelAsync(IContent content, ContentScheduleCollection schedule) -#pragma warning disable CS0618 // Type or member is obsolete - // Remove when obsolete CreateResponseModelAsync is removed - => CreateResponseModelAsync(content); -#pragma warning restore CS0618 // Type or member is obsolete - + Task CreateResponseModelAsync(IContent content, ContentScheduleCollection schedule); DocumentItemResponseModel CreateItemResponseModel(IDocumentEntitySlim entity); DocumentBlueprintItemResponseModel CreateBlueprintItemResponseModel(IDocumentEntitySlim entity); @@ -33,9 +25,6 @@ public interface IDocumentPresentationFactory DocumentTypeReferenceResponseModel CreateDocumentTypeReferenceResponseModel(IDocumentEntitySlim entity); - [Obsolete("Use CreateCulturePublishScheduleModels instead. Scheduled for removal in v17")] - Attempt CreateCultureAndScheduleModel(PublishDocumentRequestModel requestModel); - Attempt, ContentPublishingOperationStatus> CreateCulturePublishScheduleModels( PublishDocumentRequestModel requestModel) { diff --git a/src/Umbraco.Cms.Api.Management/Factories/IHealthCheckGroupPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/IHealthCheckGroupPresentationFactory.cs index fa03c2633a..76b472d47a 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/IHealthCheckGroupPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/IHealthCheckGroupPresentationFactory.cs @@ -7,19 +7,8 @@ public interface IHealthCheckGroupPresentationFactory { IEnumerable> CreateGroupingFromHealthCheckCollection(); - [Obsolete("Use CreateHealthCheckGroupWithResultViewModelAsync instead. Will be removed in v17.")] - HealthCheckGroupWithResultResponseModel CreateHealthCheckGroupWithResultViewModel(IGrouping healthCheckGroup); + Task CreateHealthCheckGroupWithResultViewModelAsync( + IGrouping healthCheckGroup); - [Obsolete("Use CreateHealthCheckGroupWithResultViewModelAsync instead. Will be removed in v17.")] - HealthCheckWithResultPresentationModel CreateHealthCheckWithResultViewModel(HealthCheck healthCheck); - - Task CreateHealthCheckGroupWithResultViewModelAsync(IGrouping healthCheckGroup) -#pragma warning disable CS0618 // Type or member is obsolete - => Task.FromResult(CreateHealthCheckGroupWithResultViewModel(healthCheckGroup)); -#pragma warning restore CS0618 // Type or member is obsolete - - Task CreateHealthCheckWithResultViewModelAsync(HealthCheck healthCheck) -#pragma warning disable CS0618 // Type or member is obsolete - => Task.FromResult(CreateHealthCheckWithResultViewModel(healthCheck)); -#pragma warning restore CS0618 // Type or member is obsolete + Task CreateHealthCheckWithResultViewModelAsync(HealthCheck healthCheck); } diff --git a/src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs index 990312845c..34763e6ce5 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs @@ -18,16 +18,6 @@ public class RelationTypePresentationFactory : IRelationTypePresentationFactory private readonly IDocumentPresentationFactory _documentPresentationFactory; private readonly IScopeProvider _scopeProvider; - [Obsolete("Please use the non obsoleted constructor. Scheduled for removal in v17")] - public RelationTypePresentationFactory(IUmbracoMapper umbracoMapper) - : this( - umbracoMapper, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - public RelationTypePresentationFactory( IUmbracoMapper umbracoMapper, IEntityRepository entityRepository, diff --git a/src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs index 80c7b17e78..bf5e085cfa 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs @@ -43,39 +43,6 @@ public class UserPresentationFactory : IUserPresentationFactory /// /// Initializes a new instance of the class. /// - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] - public UserPresentationFactory( - IEntityService entityService, - AppCaches appCaches, - MediaFileManager mediaFileManager, - IImageUrlGenerator imageUrlGenerator, - IUserGroupPresentationFactory userGroupPresentationFactory, - IAbsoluteUrlBuilder absoluteUrlBuilder, - IEmailSender emailSender, - IPasswordConfigurationPresentationFactory passwordConfigurationPresentationFactory, - IOptionsSnapshot securitySettings, - IBackOfficeExternalLoginProviders externalLoginProviders) - : this( - entityService, - appCaches, - mediaFileManager, - imageUrlGenerator, - userGroupPresentationFactory, - absoluteUrlBuilder, - emailSender, - passwordConfigurationPresentationFactory, - securitySettings, - externalLoginProviders, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService>()) - { - } - - /// - /// Initializes a new instance of the class. - /// - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] public UserPresentationFactory( IEntityService entityService, AppCaches appCaches, @@ -87,45 +54,6 @@ public class UserPresentationFactory : IUserPresentationFactory IPasswordConfigurationPresentationFactory passwordConfigurationPresentationFactory, IOptionsSnapshot securitySettings, IBackOfficeExternalLoginProviders externalLoginProviders, - IUserService userService, - IContentService contentService) - : this( - entityService, - appCaches, - mediaFileManager, - imageUrlGenerator, - userGroupPresentationFactory, - absoluteUrlBuilder, - emailSender, - passwordConfigurationPresentationFactory, - securitySettings, - externalLoginProviders, - userService, - contentService, - StaticServiceProvider.Instance.GetRequiredService>()) - { - } - - // TODO (V17): Remove the unused userService and contentService parameters from this constructor. - - /// - /// Initializes a new instance of the class. - /// - public UserPresentationFactory( - IEntityService entityService, - AppCaches appCaches, - MediaFileManager mediaFileManager, - IImageUrlGenerator imageUrlGenerator, - IUserGroupPresentationFactory userGroupPresentationFactory, - IAbsoluteUrlBuilder absoluteUrlBuilder, - IEmailSender emailSender, - IPasswordConfigurationPresentationFactory passwordConfigurationPresentationFactory, - IOptionsSnapshot securitySettings, - IBackOfficeExternalLoginProviders externalLoginProviders, -#pragma warning disable IDE0060 // Remove unused parameter - need to keep these until the next major to avoid breaking changes and/or ambiguous constructor errors - IUserService userService, - IContentService contentService, -#pragma warning restore IDE0060 // Remove unused parameter IEnumerable permissionPresentationMappers) { _entityService = entityService; diff --git a/src/Umbraco.Cms.Api.Management/Mapping/Permissions/DocumentPermissionMapper.cs b/src/Umbraco.Cms.Api.Management/Mapping/Permissions/DocumentPermissionMapper.cs index abab7a7fab..05fffea7ce 100644 --- a/src/Umbraco.Cms.Api.Management/Mapping/Permissions/DocumentPermissionMapper.cs +++ b/src/Umbraco.Cms.Api.Management/Mapping/Permissions/DocumentPermissionMapper.cs @@ -22,17 +22,6 @@ public class DocumentPermissionMapper : IPermissionPresentationMapper, IPermissi private readonly Lazy _entityService; private readonly Lazy _userService; - /// - /// Initializes a new instance of the class. - /// - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] - public DocumentPermissionMapper() - : this( - StaticServiceProvider.Instance.GetRequiredService>(), - StaticServiceProvider.Instance.GetRequiredService>()) - { - } - /// /// Initializes a new instance of the class. /// diff --git a/src/Umbraco.Cms.Api.Management/Middleware/BackOfficeAuthorizationInitializationMiddleware.cs b/src/Umbraco.Cms.Api.Management/Middleware/BackOfficeAuthorizationInitializationMiddleware.cs index 5bf884899c..f5d6ef66f1 100644 --- a/src/Umbraco.Cms.Api.Management/Middleware/BackOfficeAuthorizationInitializationMiddleware.cs +++ b/src/Umbraco.Cms.Api.Management/Middleware/BackOfficeAuthorizationInitializationMiddleware.cs @@ -21,18 +21,6 @@ public class BackOfficeAuthorizationInitializationMiddleware : IMiddleware private readonly IRuntimeState _runtimeState; private readonly WebRoutingSettings _webRoutingSettings; - [Obsolete("Use the non-obsolete constructor. This will be removed in Umbraco 17.")] - public BackOfficeAuthorizationInitializationMiddleware( - UmbracoRequestPaths umbracoRequestPaths, - IServiceProvider serviceProvider, - IRuntimeState runtimeState, - IOptions globalSettings, - IOptions webRoutingSettings, - IHostingEnvironment hostingEnvironment) - : this(umbracoRequestPaths, serviceProvider, runtimeState, webRoutingSettings) - { - } - public BackOfficeAuthorizationInitializationMiddleware( UmbracoRequestPaths umbracoRequestPaths, IServiceProvider serviceProvider, diff --git a/src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs b/src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs index f748a5ab75..53ac13b077 100644 --- a/src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs +++ b/src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs @@ -32,10 +32,6 @@ public class BackOfficeApplicationManager : OpenIdDictApplicationManagerBase, IB _authorizeCallbackLogoutPathName = securitySettings.Value.AuthorizeCallbackLogoutPathName; } - [Obsolete("Please use the overload that allows for multiple back-office hosts. Will be removed in V17.")] - public async Task EnsureBackOfficeApplicationAsync(Uri backOfficeUrl, CancellationToken cancellationToken = default) - => await EnsureBackOfficeApplicationAsync([backOfficeUrl], cancellationToken); - public async Task EnsureBackOfficeApplicationAsync(IEnumerable backOfficeHosts, CancellationToken cancellationToken = default) { // Install is okay without this, because we do not need a token to install, @@ -100,8 +96,7 @@ public class BackOfficeApplicationManager : OpenIdDictApplicationManagerBase, IB public async Task DeleteBackOfficeClientCredentialsApplicationAsync(string clientId, CancellationToken cancellationToken = default) => await Delete(clientId, cancellationToken); - [Obsolete("Do not use - for internal usage only. Will be made internal in V17.")] - public OpenIddictApplicationDescriptor BackofficeOpenIddictApplicationDescriptor(Uri backOfficeUrl) + internal OpenIddictApplicationDescriptor BackofficeOpenIddictApplicationDescriptor(Uri backOfficeUrl) => BackofficeOpenIddictApplicationDescriptor([backOfficeUrl]); internal OpenIddictApplicationDescriptor BackofficeOpenIddictApplicationDescriptor(Uri[] backOfficeHosts) diff --git a/src/Umbraco.Cms.Api.Management/Security/BackOfficeExternalLoginProviders.cs b/src/Umbraco.Cms.Api.Management/Security/BackOfficeExternalLoginProviders.cs index 7ecb178db5..c862e15593 100644 --- a/src/Umbraco.Cms.Api.Management/Security/BackOfficeExternalLoginProviders.cs +++ b/src/Umbraco.Cms.Api.Management/Security/BackOfficeExternalLoginProviders.cs @@ -18,19 +18,6 @@ public class BackOfficeExternalLoginProviders : IBackOfficeExternalLoginProvider private const string ExternalLoginProvidersKey = "Umbraco.Cms.Web.BackOffice.Security.BackOfficeExternalLoginProviders"; - [Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")] - public BackOfficeExternalLoginProviders( - IEnumerable externalLogins, - IAuthenticationSchemeProvider authenticationSchemeProvider) - : this( - externalLogins, - authenticationSchemeProvider, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService>()) - { - } - public BackOfficeExternalLoginProviders( IEnumerable externalLogins, IAuthenticationSchemeProvider authenticationSchemeProvider, diff --git a/src/Umbraco.Cms.Api.Management/Services/Entities/UserStartNodeEntitiesService.cs b/src/Umbraco.Cms.Api.Management/Services/Entities/UserStartNodeEntitiesService.cs index 02adf136e5..6fda490b61 100644 --- a/src/Umbraco.Cms.Api.Management/Services/Entities/UserStartNodeEntitiesService.cs +++ b/src/Umbraco.Cms.Api.Management/Services/Entities/UserStartNodeEntitiesService.cs @@ -17,15 +17,6 @@ public class UserStartNodeEntitiesService : IUserStartNodeEntitiesService private readonly ICoreScopeProvider _scopeProvider; private readonly IIdKeyMap _idKeyMap; - [Obsolete("Please use the non-obsolete constructor. Scheduled for removal in V17.")] - public UserStartNodeEntitiesService(IEntityService entityService) - : this( - entityService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService()) - { - } - public UserStartNodeEntitiesService(IEntityService entityService, ICoreScopeProvider scopeProvider, IIdKeyMap idKeyMap) { _entityService = entityService; diff --git a/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentResponseModel.cs b/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentResponseModel.cs index 8338c2ccf9..33368a2a24 100644 --- a/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentResponseModel.cs +++ b/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentResponseModel.cs @@ -2,9 +2,6 @@ namespace Umbraco.Cms.Api.Management.ViewModels.Document; public class DocumentResponseModel : DocumentResponseModelBase { - [Obsolete("This property is no longer populated. Please use /document/{id}/urls instead to retrieve the URLs for a document. Scheduled for removal in Umbraco 17.")] - public IEnumerable Urls { get; set; } = Enumerable.Empty(); - public ReferenceByIdModel? Template { get; set; } public bool IsTrashed { get; set; } diff --git a/src/Umbraco.Cms.Api.Management/ViewModels/Media/MediaResponseModel.cs b/src/Umbraco.Cms.Api.Management/ViewModels/Media/MediaResponseModel.cs index 522e1a1d0e..2667f50199 100644 --- a/src/Umbraco.Cms.Api.Management/ViewModels/Media/MediaResponseModel.cs +++ b/src/Umbraco.Cms.Api.Management/ViewModels/Media/MediaResponseModel.cs @@ -5,9 +5,6 @@ namespace Umbraco.Cms.Api.Management.ViewModels.Media; public class MediaResponseModel : ContentResponseModelBase { - [Obsolete("This property is no longer populated. Please use /media/{id}/urls instead to retrieve the URLs for a document. Scheduled for removal in Umbraco 17.")] - public IEnumerable Urls { get; set; } = Enumerable.Empty(); - public bool IsTrashed { get; set; } public MediaTypeReferenceResponseModel MediaType { get; set; } = new(); diff --git a/src/Umbraco.Core/DeliveryApi/IRequestCultureService.cs b/src/Umbraco.Core/DeliveryApi/IRequestCultureService.cs index 431ad7e5b1..7295d865b6 100644 --- a/src/Umbraco.Core/DeliveryApi/IRequestCultureService.cs +++ b/src/Umbraco.Core/DeliveryApi/IRequestCultureService.cs @@ -6,7 +6,4 @@ public interface IRequestCultureService /// Gets the requested culture from the "Accept-Language" header, if present. /// string? GetRequestedCulture(); - - [Obsolete("Use IVariationContextAccessor to manipulate the variation context. Scheduled for removal in V17.")] - void SetRequestCulture(string culture); }