Deleting 'Task' related references and implementations

This commit is contained in:
elitsa
2018-10-08 10:08:04 +02:00
parent e2acc8b447
commit 9ad65e5fa8
12 changed files with 5 additions and 38 deletions

View File

@@ -63,8 +63,6 @@ namespace Umbraco.Core.Composing.CompositionRoots
container.RegisterSingleton<IRelationTypeRepository, RelationTypeRepository>();
container.RegisterSingleton<IServerRegistrationRepository, ServerRegistrationRepository>();
container.RegisterSingleton<ITagRepository, TagRepository>();
container.RegisterSingleton<ITaskRepository, TaskRepository>();
container.RegisterSingleton<ITaskTypeRepository, TaskTypeRepository>();
container.RegisterSingleton<ITemplateRepository, TemplateRepository>();
container.RegisterSingleton<IUserGroupRepository, UserGroupRepository>();
container.RegisterSingleton<IUserRepository, UserRepository>();

View File

@@ -28,7 +28,6 @@ namespace Umbraco.Core.Composing.CompositionRoots
// register the services
container.RegisterSingleton<IKeyValueService, KeyValueService>();
container.RegisterSingleton<IPublicAccessService, PublicAccessService>();
container.RegisterSingleton<ITaskService, TaskService>();
container.RegisterSingleton<IDomainService, DomainService>();
container.RegisterSingleton<IAuditService, AuditService>();
container.RegisterSingleton<ITagService, TagService>();

View File

@@ -69,10 +69,7 @@ namespace Umbraco.Core.Migrations.Install
if (tableName.Equals(Constants.DatabaseSchema.Tables.RelationType))
CreateRelationTypeData();
if (tableName.Equals(Constants.DatabaseSchema.Tables.TaskType))
CreateTaskTypeData();
if (tableName.Equals(Constants.DatabaseSchema.Tables.KeyValue))
CreateKeyValueData();
@@ -319,11 +316,6 @@ namespace Umbraco.Core.Migrations.Install
_database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType);
}
private void CreateTaskTypeData()
{
_database.Insert(Constants.DatabaseSchema.Tables.TaskType, "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
}
private void CreateKeyValueData()
{
// on install, initialize the umbraco migration plan with the final state

View File

@@ -59,8 +59,6 @@ namespace Umbraco.Core.Migrations.Install
typeof (RelationDto),
typeof (TagDto),
typeof (TagRelationshipDto),
typeof (TaskTypeDto),
typeof (TaskDto),
typeof (ContentType2ContentTypeDto),
typeof (ContentTypeAllowedContentTypeDto),
typeof (User2NodeNotifyDto),

View File

@@ -324,9 +324,7 @@ WHERE v1.propertyTypeId=v2.propertyTypeId AND v1.languageId=v2.languageId AND v1
public const string Tag = "cmsTags";
public const string TagRelationship = "cmsTagRelationship";
public const string Task = "cmsTask";
public const string TaskType = "cmsTaskType";
// ReSharper restore UnusedMember.Local
}
}

View File

@@ -69,10 +69,7 @@ namespace Umbraco.Core
public const string Tag = /*TableNamePrefix*/ "cms" + "Tags";
public const string TagRelationship = /*TableNamePrefix*/ "cms" + "TagRelationship";
public const string Task = /*TableNamePrefix*/ "cms" + "Task";
public const string TaskType = /*TableNamePrefix*/ "cms" + "TaskType";
public const string KeyValue = TableNamePrefix + "KeyValue";
public const string AuditEntry = /*TableNamePrefix*/ "umbraco" + "Audit";

View File

@@ -48,7 +48,6 @@ namespace Umbraco.Core.Persistence.Mappers
Add<RelationTypeMapper>();
Add<ServerRegistrationMapper>();
Add<TagMapper>();
Add<TaskTypeMapper>();
Add<TemplateMapper>();
Add<UmbracoEntityMapper>();
Add<UserMapper>();

View File

@@ -167,7 +167,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var list = new List<string>
{
"DELETE FROM " + Constants.DatabaseSchema.Tables.RedirectUrl + " WHERE contentKey IN (SELECT uniqueId FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id)",
"DELETE FROM " + Constants.DatabaseSchema.Tables.Task + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id",

View File

@@ -137,7 +137,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
var list = new List<string>
{
"DELETE FROM " + Constants.DatabaseSchema.Tables.Task + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id",
"DELETE FROM " + Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id",

View File

@@ -8,7 +8,6 @@ namespace Umbraco.Core.Services
public class ServiceContext
{
private readonly Lazy<IPublicAccessService> _publicAccessService;
private readonly Lazy<ITaskService> _taskService;
private readonly Lazy<IDomainService> _domainService;
private readonly Lazy<IAuditService> _auditService;
private readonly Lazy<ILocalizedTextService> _localizedTextService;
@@ -40,10 +39,9 @@ namespace Umbraco.Core.Services
/// Initializes a new instance of the <see cref="ServiceContext"/> class with lazy services.
/// </summary>
/// <remarks>Used by IoC. Note that LightInject will favor lazy args when picking a constructor.</remarks>
public ServiceContext(Lazy<IPublicAccessService> publicAccessService, Lazy<ITaskService> taskService, Lazy<IDomainService> domainService, Lazy<IAuditService> auditService, Lazy<ILocalizedTextService> localizedTextService, Lazy<ITagService> tagService, Lazy<IContentService> contentService, Lazy<IUserService> userService, Lazy<IMemberService> memberService, Lazy<IMediaService> mediaService, Lazy<IContentTypeService> contentTypeService, Lazy<IMediaTypeService> mediaTypeService, Lazy<IDataTypeService> dataTypeService, Lazy<IFileService> fileService, Lazy<ILocalizationService> localizationService, Lazy<IPackagingService> packagingService, Lazy<IServerRegistrationService> serverRegistrationService, Lazy<IEntityService> entityService, Lazy<IRelationService> relationService, Lazy<IApplicationTreeService> treeService, Lazy<ISectionService> sectionService, Lazy<IMacroService> macroService, Lazy<IMemberTypeService> memberTypeService, Lazy<IMemberGroupService> memberGroupService, Lazy<INotificationService> notificationService, Lazy<IExternalLoginService> externalLoginService, Lazy<IRedirectUrlService> redirectUrlService, Lazy<IConsentService> consentService)
public ServiceContext(Lazy<IPublicAccessService> publicAccessService, Lazy<IDomainService> domainService, Lazy<IAuditService> auditService, Lazy<ILocalizedTextService> localizedTextService, Lazy<ITagService> tagService, Lazy<IContentService> contentService, Lazy<IUserService> userService, Lazy<IMemberService> memberService, Lazy<IMediaService> mediaService, Lazy<IContentTypeService> contentTypeService, Lazy<IMediaTypeService> mediaTypeService, Lazy<IDataTypeService> dataTypeService, Lazy<IFileService> fileService, Lazy<ILocalizationService> localizationService, Lazy<IPackagingService> packagingService, Lazy<IServerRegistrationService> serverRegistrationService, Lazy<IEntityService> entityService, Lazy<IRelationService> relationService, Lazy<IApplicationTreeService> treeService, Lazy<ISectionService> sectionService, Lazy<IMacroService> macroService, Lazy<IMemberTypeService> memberTypeService, Lazy<IMemberGroupService> memberGroupService, Lazy<INotificationService> notificationService, Lazy<IExternalLoginService> externalLoginService, Lazy<IRedirectUrlService> redirectUrlService, Lazy<IConsentService> consentService)
{
_publicAccessService = publicAccessService;
_taskService = taskService;
_domainService = domainService;
_auditService = auditService;
_localizedTextService = localizedTextService;
@@ -97,7 +95,6 @@ namespace Umbraco.Core.Services
ILocalizedTextService localizedTextService = null,
IAuditService auditService = null,
IDomainService domainService = null,
ITaskService taskService = null,
IMacroService macroService = null,
IPublicAccessService publicAccessService = null,
IExternalLoginService externalLoginService = null,
@@ -128,7 +125,6 @@ namespace Umbraco.Core.Services
if (userService != null) _userService = new Lazy<IUserService>(() => userService);
if (notificationService != null) _notificationService = new Lazy<INotificationService>(() => notificationService);
if (domainService != null) _domainService = new Lazy<IDomainService>(() => domainService);
if (taskService != null) _taskService = new Lazy<ITaskService>(() => taskService);
if (macroService != null) _macroService = new Lazy<IMacroService>(() => macroService);
if (publicAccessService != null) _publicAccessService = new Lazy<IPublicAccessService>(() => publicAccessService);
if (redirectUrlService != null) _redirectUrlService = new Lazy<IRedirectUrlService>(() => redirectUrlService);
@@ -139,12 +135,7 @@ namespace Umbraco.Core.Services
/// Gets the <see cref="IPublicAccessService"/>
/// </summary>
public IPublicAccessService PublicAccessService => _publicAccessService.Value;
/// <summary>
/// Gets the <see cref="ITaskService"/>
/// </summary>
public ITaskService TaskService => _taskService.Value;
/// <summary>
/// Gets the <see cref="IDomainService"/>
/// </summary>

View File

@@ -77,7 +77,6 @@ namespace Umbraco.Tests.TestHelpers
MockService<ILocalizedTextService>(),
MockService<IAuditService>(),
MockService<IDomainService>(),
MockService<ITaskService>(),
MockService<IMacroService>());
}

View File

@@ -120,7 +120,6 @@ namespace Umbraco.Tests.TestHelpers
var externalLoginService = GetLazyService<IExternalLoginService>(container, c => new ExternalLoginService(scopeProvider, logger, eventMessagesFactory, GetRepo<IExternalLoginRepository>(c)));
var publicAccessService = GetLazyService<IPublicAccessService>(container, c => new PublicAccessService(scopeProvider, logger, eventMessagesFactory, GetRepo<IPublicAccessRepository>(c)));
var taskService = GetLazyService<ITaskService>(container, c => new TaskService(scopeProvider, logger, eventMessagesFactory, GetRepo<ITaskTypeRepository>(c), GetRepo<ITaskRepository>(c)));
var domainService = GetLazyService<IDomainService>(container, c => new DomainService(scopeProvider, logger, eventMessagesFactory, GetRepo<IDomainRepository>(c)));
var auditService = GetLazyService<IAuditService>(container, c => new AuditService(scopeProvider, logger, eventMessagesFactory, GetRepo<IAuditRepository>(c), GetRepo<IAuditEntryRepository>(c)));
@@ -190,7 +189,6 @@ namespace Umbraco.Tests.TestHelpers
return new ServiceContext(
publicAccessService,
taskService,
domainService,
auditService,
localizedTextService,