[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 | |
---|
[1146] | 30 | /** |
---|
[1191] | 31 | * <p> |
---|
[1294] | 32 | * creates a new event task with the given description |
---|
[1191] | 33 | * </p> |
---|
[1146] | 34 | * |
---|
[1294] | 35 | * @param description the description for the represented events |
---|
[1191] | 36 | * |
---|
| 37 | * @return the event task |
---|
[1146] | 38 | */ |
---|
[1294] | 39 | IEventTask createNewEventTask(String description); |
---|
[439] | 40 | |
---|
[1146] | 41 | /** |
---|
[1191] | 42 | * <p> |
---|
| 43 | * creates a new empty sequence |
---|
| 44 | * </p> |
---|
[1146] | 45 | * |
---|
[1191] | 46 | * @return the sequence |
---|
[1146] | 47 | */ |
---|
| 48 | ISequence createNewSequence(); |
---|
[439] | 49 | |
---|
[1146] | 50 | /** |
---|
[1191] | 51 | * <p> |
---|
| 52 | * creates a new empty iteration |
---|
| 53 | * </p> |
---|
[1146] | 54 | * |
---|
[1191] | 55 | * @return the iteration |
---|
[1146] | 56 | */ |
---|
| 57 | IIteration createNewIteration(); |
---|
[439] | 58 | |
---|
[1146] | 59 | /** |
---|
[1191] | 60 | * <p> |
---|
| 61 | * creates a new empty optional |
---|
| 62 | * </p> |
---|
[1146] | 63 | * |
---|
[1191] | 64 | * @return the optional |
---|
[1146] | 65 | */ |
---|
| 66 | IOptional createNewOptional(); |
---|
[1126] | 67 | |
---|
[1146] | 68 | /** |
---|
[1191] | 69 | * <p> |
---|
| 70 | * creates a new empty selection |
---|
| 71 | * </p> |
---|
[1146] | 72 | * |
---|
[1191] | 73 | * @return the selection |
---|
[1146] | 74 | */ |
---|
| 75 | ISelection createNewSelection(); |
---|
[439] | 76 | |
---|
[1146] | 77 | /** |
---|
[1191] | 78 | * <p> |
---|
[1294] | 79 | * creates a new task instance with the given task as its model representing the provided event |
---|
[1191] | 80 | * </p> |
---|
[1146] | 81 | * |
---|
[1294] | 82 | * @param task the model of the task instance to be created |
---|
| 83 | * @param event the event represented by the task instance |
---|
[1191] | 84 | * |
---|
| 85 | * @return the task instance |
---|
[1146] | 86 | */ |
---|
[1294] | 87 | IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); |
---|
[439] | 88 | |
---|
[1146] | 89 | /** |
---|
[1191] | 90 | * <p> |
---|
[1294] | 91 | * creates a new task instance with the given sequence as its model |
---|
[1191] | 92 | * </p> |
---|
| 93 | * |
---|
[1294] | 94 | * @param sequence the model of the task instance to be created |
---|
| 95 | * |
---|
| 96 | * @return the task instance |
---|
[1146] | 97 | */ |
---|
[1294] | 98 | ISequenceInstance createNewTaskInstance(ISequence sequence); |
---|
[1146] | 99 | |
---|
| 100 | /** |
---|
[1191] | 101 | * <p> |
---|
[1294] | 102 | * creates a new task instance with the given iteration as its model |
---|
| 103 | * </p> |
---|
| 104 | * |
---|
| 105 | * @param iteration the model of the task instance to be created |
---|
| 106 | * |
---|
| 107 | * @return the task instance |
---|
| 108 | */ |
---|
| 109 | IIterationInstance createNewTaskInstance(IIteration iteration); |
---|
| 110 | |
---|
| 111 | /** |
---|
| 112 | * <p> |
---|
| 113 | * creates a new task instance with the given optional as its model |
---|
| 114 | * </p> |
---|
| 115 | * |
---|
| 116 | * @param optional the model of the task instance to be created |
---|
| 117 | * |
---|
| 118 | * @return the task instance |
---|
| 119 | */ |
---|
| 120 | IOptionalInstance createNewTaskInstance(IOptional optional); |
---|
| 121 | |
---|
| 122 | /** |
---|
| 123 | * <p> |
---|
| 124 | * creates a new task instance with the given selection as its model |
---|
| 125 | * </p> |
---|
| 126 | * |
---|
| 127 | * @param selection the model of the task instance to be created |
---|
| 128 | * |
---|
| 129 | * @return the task instance |
---|
| 130 | */ |
---|
| 131 | ISelectionInstance createNewTaskInstance(ISelection selection); |
---|
| 132 | |
---|
| 133 | /** |
---|
| 134 | * <p> |
---|
[1191] | 135 | * creates a new empty user session |
---|
| 136 | * </p> |
---|
[1146] | 137 | * |
---|
[1191] | 138 | * @return the user session |
---|
[1146] | 139 | */ |
---|
| 140 | IUserSession createUserSession(); |
---|
| 141 | |
---|
| 142 | /** |
---|
[1191] | 143 | * <p> |
---|
| 144 | * creates a task model based on the provided user sessions |
---|
| 145 | * </p> |
---|
[1146] | 146 | * |
---|
[1191] | 147 | * @param userSessions the session based on which the task model shall be created |
---|
| 148 | * |
---|
| 149 | * @return the task model |
---|
[1146] | 150 | */ |
---|
| 151 | ITaskModel createTaskModel(List<IUserSession> userSessions); |
---|
| 152 | |
---|
[439] | 153 | } |
---|