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) 2015 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | namespace oat\taoDelivery\model\execution; |
| 24 | |
| 25 | use common_exception_NotFound; |
| 26 | use core_kernel_classes_Resource; |
| 27 | |
| 28 | /** |
| 29 | * New interface for delivery executions |
| 30 | * |
| 31 | * @access public |
| 32 | * @author Joel Bout, <joel@taotesting.com> |
| 33 | * @package taoDelivery |
| 34 | */ |
| 35 | interface DeliveryExecutionInterface |
| 36 | { |
| 37 | /** |
| 38 | * Indicates that a test-taker is currently taking a delivery |
| 39 | * @var string |
| 40 | */ |
| 41 | public const STATE_ACTIVE = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusActive'; |
| 42 | |
| 43 | /** |
| 44 | * Indicates that a delivery is in progress, but the test-taker is not actively taking it |
| 45 | * @var string |
| 46 | */ |
| 47 | public const STATE_PAUSED = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusPaused'; |
| 48 | |
| 49 | /** |
| 50 | * Indicates that a delivery has been finished successfully and the results should be considered |
| 51 | * @var string |
| 52 | */ |
| 53 | public const STATE_FINISHED = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusFinished'; |
| 54 | |
| 55 | /** |
| 56 | * @deprecated |
| 57 | */ |
| 58 | public const STATE_FINISHIED = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusFinished'; |
| 59 | |
| 60 | /** |
| 61 | * Indicates that a delivery has been terminated and the results might not be valid |
| 62 | * @var string |
| 63 | */ |
| 64 | public const STATE_TERMINATED = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusTerminated'; |
| 65 | |
| 66 | public const CLASS_URI = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecution'; |
| 67 | |
| 68 | public const PROPERTY_DELIVERY = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionDelivery'; |
| 69 | |
| 70 | public const PROPERTY_SUBJECT = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionSubject'; |
| 71 | |
| 72 | public const PROPERTY_TIME_START = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStart'; |
| 73 | |
| 74 | public const PROPERTY_TIME_END = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionEnd'; |
| 75 | |
| 76 | public const PROPERTY_STATUS = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#StatusOfDeliveryExecution'; |
| 77 | |
| 78 | public const PROPERTY_METADATA = 'http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionMetadata'; |
| 79 | |
| 80 | /** |
| 81 | * Returns the identifier of the delivery execution |
| 82 | * |
| 83 | * @throws common_exception_NotFound |
| 84 | * @return string |
| 85 | */ |
| 86 | public function getIdentifier(); |
| 87 | |
| 88 | /** |
| 89 | * Returns a human readable test representation of the delivery execution |
| 90 | * Should respect the current user's language |
| 91 | * |
| 92 | * @throws common_exception_NotFound |
| 93 | * @return string |
| 94 | */ |
| 95 | public function getLabel(); |
| 96 | |
| 97 | /** |
| 98 | * Returns when the delivery execution was started |
| 99 | * |
| 100 | * @throws common_exception_NotFound |
| 101 | * @return string |
| 102 | */ |
| 103 | public function getStartTime(); |
| 104 | |
| 105 | /** |
| 106 | * Returns when the delivery execution was finished |
| 107 | * or null if not yet finished |
| 108 | * |
| 109 | * @throws common_exception_NotFound |
| 110 | * * @return string | null if the execution is not yet finished |
| 111 | */ |
| 112 | public function getFinishTime(); |
| 113 | |
| 114 | /** |
| 115 | * Returns the delivery execution state as resource |
| 116 | * |
| 117 | * @throws common_exception_NotFound |
| 118 | * @return core_kernel_classes_Resource |
| 119 | */ |
| 120 | public function getState(); |
| 121 | |
| 122 | /** |
| 123 | * |
| 124 | * @param string $state |
| 125 | * @return boolean success |
| 126 | */ |
| 127 | public function setState($state); |
| 128 | |
| 129 | /** |
| 130 | * Returns the delivery execution delivery as resource |
| 131 | * |
| 132 | * @throws common_exception_NotFound |
| 133 | * @return core_kernel_classes_Resource |
| 134 | */ |
| 135 | public function getDelivery(); |
| 136 | |
| 137 | /** |
| 138 | * Returns the delivery executions user identifier |
| 139 | * |
| 140 | * @throws common_exception_NotFound |
| 141 | * @return string |
| 142 | */ |
| 143 | public function getUserIdentifier(); |
| 144 | } |