Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2020 (original work) Open Assessment Technologies SA;
19 *
20 */
21
22namespace oat\taoDelivery\model\execution;
23
24use core_kernel_classes_Resource;
25use oat\oatbox\user\User;
26use oat\taoDelivery\model\execution\Delete\DeliveryExecutionDelete;
27
28/**
29 * Service to manage the execution of deliveries
30 *
31 * @access public
32 * @author Joel Bout, <joel@taotesting.com>
33 * @package taoDelivery
34 */
35interface DeliveryExecutionService extends DeliveryExecutionDelete
36{
37    public const SERVICE_ID = 'taoDelivery/execution_service';
38
39    /**
40     * Returns the executions the user has of a specified assembly
41     *
42     * @param core_kernel_classes_Resource $assembly
43     * @param string $userUri
44     * @return array
45     * @internal param core_kernel_classes_Resource $compiled
46     */
47    public function getUserExecutions(core_kernel_classes_Resource $assembly, $userUri);
48
49    /**
50     * Returns all Delivery Executions of a User with a specific status
51     *
52     * @param string $userUri
53     * @param string $status
54     * @return array
55     */
56    public function getDeliveryExecutionsByStatus($userUri, $status);
57
58    /**
59     * Generate a new delivery execution
60     *
61     * @param core_kernel_classes_Resource $assembly
62     * @param User $user
63     * @return core_kernel_classes_Resource the delivery execution
64     */
65    public function initDeliveryExecution(core_kernel_classes_Resource $assembly, $user);
66
67    /**
68     * Returns the delivery execution instance associated to the implementation
69     *
70     * @param string $identifier
71     * @return DeliveryExecution
72     */
73    public function getDeliveryExecution($identifier);
74}