• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 6658089448

26 Oct 2023 06:10PM UTC coverage: 56.911% (-0.07%) from 56.985%
6658089448

push

github

web-flow
RDMP-15 Use .bak files as Data Loads (#1656)

* basic ui triggers
* working dl

---------

Co-authored-by: James A Sutherland <j@sutherland.pw>

10695 of 20239 branches covered (0.0%)

Branch coverage included in aggregate %.

89 of 89 new or added lines in 6 files covered. (100.0%)

30536 of 52209 relevant lines covered (58.49%)

7341.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/Rdmp.Core/DataLoad/Engine/LoadExecution/Components/Runtime/RuntimeTaskFactory.cs
1
// Copyright (c) The University of Dundee 2018-2019
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
using System;
8
using System.Linq;
9
using Rdmp.Core.Curation.Data.DataLoad;
10
using Rdmp.Core.DataLoad.Engine.LoadExecution.Components.Arguments;
11
using Rdmp.Core.Repositories;
12

13
namespace Rdmp.Core.DataLoad.Engine.LoadExecution.Components.Runtime;
14

15
/// <summary>
16
/// Translates a data load engine ProcessTask (design time template) configured by the user into the correct RuntimeTask (realisation) based on the
17
/// ProcessTaskType (Attacher, Executable etc).  See DataLoadEngine.cd
18
/// </summary>
19
public class RuntimeTaskFactory
20
{
21
    public RuntimeTaskFactory(ICatalogueRepository repository)
68✔
22
    {
23
    }
68✔
24

25
    public static RuntimeTask Create(IProcessTask task, IStageArgs stageArgs)
26
    {
27
        //get the user configured Design Time arguments + stage specific arguments
28
        var args = new RuntimeArgumentCollection(task.GetAllArguments().ToArray(), stageArgs);
172✔
29

30
        //Create an instance of the the appropriate ProcessTaskType
31
        return task.ProcessTaskType switch
172!
32
        {
172✔
33
            ProcessTaskType.Executable => new ExecutableRuntimeTask(task, args),
12✔
34
            ProcessTaskType.SQLFile => new ExecuteSqlFileRuntimeTask(task, args),
6✔
35
            ProcessTaskType.Attacher => new AttacherRuntimeTask(task, args),
132✔
36
            ProcessTaskType.DataProvider => new DataProviderRuntimeTask(task, args),
10✔
37
            ProcessTaskType.MutilateDataTable => new MutilateDataTablesRuntimeTask(task, args),
12✔
38
            ProcessTaskType.SQLBakFile => new ExecuteSqlBakFileRuntimeTask(task, args),
×
39
            _ => throw new Exception($"Cannot create runtime task: Unknown process task type '{task.ProcessTaskType}'")
×
40
        };
172✔
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc