MCPcopy Create free account
hub / github.com/Rello/analytics / DataloadService

Class DataloadService

lib/Service/DataloadService.php:21–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19use Psr\Log\LoggerInterface;
20
21class DataloadService
22{
23 private $userId;
24 private $logger;
25 private $StorageService;
26 private $DatasourceController;
27 private $ActivityManager;
28 private $ReportService;
29 private $DatasetService;
30 private $VariableService;
31 private $l10n;
32 private $DataloadMapper;
33 private $NotificationManager;
34
35 public function __construct(
36 $userId,
37 IL10N $l10n,
38 LoggerInterface $logger,
39 ActivityManager $ActivityManager,
40 DatasourceController $DatasourceController,
41 ReportService $ReportService,
42 DatasetService $DatasetService,
43 StorageService $StorageService,
44 VariableService $VariableService,
45 NotificationManager $NotificationManager,
46 DataloadMapper $DataloadMapper
47 )
48 {
49 $this->userId = $userId;
50 $this->l10n = $l10n;
51 $this->logger = $logger;
52 $this->StorageService = $StorageService;
53 $this->ActivityManager = $ActivityManager;
54 $this->DatasourceController = $DatasourceController;
55 $this->ReportService = $ReportService;
56 $this->DatasetService = $DatasetService;
57 $this->VariableService = $VariableService;
58 $this->NotificationManager = $NotificationManager;
59 $this->DataloadMapper = $DataloadMapper;
60 }
61
62 // Data loads
63 // Data loads
64 // Data loads
65
66 /**
67 * create a new data load
68 *
69 * @param $datasetId
70 * @param $reportId
71 * @param int $datasourceId
72 * @return int
73 * @throws \OCP\DB\Exception
74 */
75 public function create($datasetId, int $datasourceId)
76 {
77 if (empty($this->DatasetService->readOwn((int)$datasetId))) {
78 return 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected