[1113] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany |
---|
| 2 | // |
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 4 | // you may not use this file except in compliance with the License. |
---|
| 5 | // You may obtain a copy of the License at |
---|
| 6 | // |
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 8 | // |
---|
| 9 | // Unless required by applicable law or agreed to in writing, software |
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 12 | // See the License for the specific language governing permissions and |
---|
| 13 | // limitations under the License. |
---|
| 14 | |
---|
[922] | 15 | package de.ugoe.cs.autoquest.tasktrees.treeifc; |
---|
[439] | 16 | |
---|
[1146] | 17 | import java.util.List; |
---|
| 18 | |
---|
[1294] | 19 | import de.ugoe.cs.autoquest.eventcore.Event; |
---|
[439] | 20 | |
---|
| 21 | /** |
---|
[1191] | 22 | * <p> |
---|
| 23 | * factory for the different task types |
---|
| 24 | * </p> |
---|
[439] | 25 | * |
---|
[1191] | 26 | * @author Patrick Harms |
---|
[439] | 27 | */ |
---|
[1146] | 28 | public interface ITaskFactory { |
---|
[439] | 29 | |
---|
[1733] | 30 | /** |
---|
| 31 | * <p> |
---|
| 32 | * creates a new event task with the given description |
---|
| 33 | * </p> |
---|
| 34 | * |
---|
| 35 | * @param description |
---|
| 36 | * the description for the represented events |
---|
| 37 | * |
---|
| 38 | * @return the event task |
---|
| 39 | */ |
---|
| 40 | IEventTask createNewEventTask(String description); |
---|
[439] | 41 | |
---|
[1733] | 42 | /** |
---|
| 43 | * <p> |
---|
| 44 | * creates a new empty iteration |
---|
| 45 | * </p> |
---|
| 46 | * |
---|
| 47 | * @return the iteration |
---|
| 48 | */ |
---|
| 49 | IIteration createNewIteration(); |
---|
[439] | 50 | |
---|
[1733] | 51 | /** |
---|
| 52 | * <p> |
---|
| 53 | * creates a new empty optional |
---|
| 54 | * </p> |
---|
| 55 | * |
---|
| 56 | * @return the optional |
---|
| 57 | */ |
---|
| 58 | IOptional createNewOptional(); |
---|
[439] | 59 | |
---|
[1733] | 60 | /** |
---|
| 61 | * <p> |
---|
| 62 | * creates a new empty selection |
---|
| 63 | * </p> |
---|
| 64 | * |
---|
| 65 | * @return the selection |
---|
| 66 | */ |
---|
| 67 | ISelection createNewSelection(); |
---|
[1126] | 68 | |
---|
[1733] | 69 | /** |
---|
| 70 | * <p> |
---|
| 71 | * creates a new empty sequence |
---|
| 72 | * </p> |
---|
| 73 | * |
---|
| 74 | * @return the sequence |
---|
| 75 | */ |
---|
| 76 | ISequence createNewSequence(); |
---|
[439] | 77 | |
---|
[1733] | 78 | /** |
---|
| 79 | * <p> |
---|
| 80 | * creates a new task instance with the given task as its model representing |
---|
| 81 | * the provided event |
---|
| 82 | * </p> |
---|
| 83 | * |
---|
| 84 | * @param task |
---|
| 85 | * the model of the task instance to be created |
---|
| 86 | * @param event |
---|
| 87 | * the event represented by the task instance |
---|
| 88 | * |
---|
| 89 | * @return the task instance |
---|
| 90 | */ |
---|
| 91 | IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); |
---|
[439] | 92 | |
---|
[1733] | 93 | /** |
---|
| 94 | * <p> |
---|
| 95 | * creates a new task instance with the given iteration as its model |
---|
| 96 | * </p> |
---|
| 97 | * |
---|
| 98 | * @param iteration |
---|
| 99 | * the model of the task instance to be created |
---|
| 100 | * |
---|
| 101 | * @return the task instance |
---|
| 102 | */ |
---|
| 103 | IIterationInstance createNewTaskInstance(IIteration iteration); |
---|
[1146] | 104 | |
---|
[1733] | 105 | /** |
---|
| 106 | * <p> |
---|
| 107 | * creates a new task instance with the given optional as its model |
---|
| 108 | * </p> |
---|
| 109 | * |
---|
| 110 | * @param optional |
---|
| 111 | * the model of the task instance to be created |
---|
| 112 | * |
---|
| 113 | * @return the task instance |
---|
| 114 | */ |
---|
| 115 | IOptionalInstance createNewTaskInstance(IOptional optional); |
---|
[1294] | 116 | |
---|
[1733] | 117 | /** |
---|
| 118 | * <p> |
---|
| 119 | * creates a new task instance with the given selection as its model |
---|
| 120 | * </p> |
---|
| 121 | * |
---|
| 122 | * @param selection |
---|
| 123 | * the model of the task instance to be created |
---|
| 124 | * |
---|
| 125 | * @return the task instance |
---|
| 126 | */ |
---|
| 127 | ISelectionInstance createNewTaskInstance(ISelection selection); |
---|
[1294] | 128 | |
---|
[1733] | 129 | /** |
---|
| 130 | * <p> |
---|
| 131 | * creates a new task instance with the given sequence as its model |
---|
| 132 | * </p> |
---|
| 133 | * |
---|
| 134 | * @param sequence |
---|
| 135 | * the model of the task instance to be created |
---|
| 136 | * |
---|
| 137 | * @return the task instance |
---|
| 138 | */ |
---|
| 139 | ISequenceInstance createNewTaskInstance(ISequence sequence); |
---|
[1294] | 140 | |
---|
[1733] | 141 | /** |
---|
| 142 | * <p> |
---|
| 143 | * creates a task model based on the provided user sessions |
---|
| 144 | * </p> |
---|
| 145 | * |
---|
| 146 | * @param userSessions |
---|
| 147 | * the session based on which the task model shall be created |
---|
| 148 | * |
---|
| 149 | * @return the task model |
---|
| 150 | */ |
---|
| 151 | ITaskModel createTaskModel(List<IUserSession> userSessions); |
---|
[1146] | 152 | |
---|
[1733] | 153 | /** |
---|
| 154 | * <p> |
---|
| 155 | * creates a new empty user session |
---|
| 156 | * </p> |
---|
| 157 | * |
---|
| 158 | * @return the user session |
---|
| 159 | */ |
---|
| 160 | IUserSession createUserSession(); |
---|
[1146] | 161 | |
---|
[439] | 162 | } |
---|