Changeset 1191 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java
- Timestamp:
- 04/29/13 17:18:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java
r1146 r1191 16 16 17 17 /** 18 * TODO comment 19 * 20 * @version $Revision: $ $Date: 21.02.2012$ 21 * @author 2012, last modified by $Author: patrick$ 18 * <p> 19 * Builder for task models. Can be used to create and edit task models. May perform integrity 20 * checks, though they may be incomplete as the integrity of a task model can not be ensured during 21 * creation. 22 * </p> 22 23 */ 23 24 public interface ITaskBuilder { 24 25 25 26 /** 26 * @param taskInstance 27 * @param child 27 * <p> 28 * adds a child to a task instance. May ensure, that the child is a valid child considering 29 * the task model of the parent. In that case, an IllegalArgumentException is thrown. 30 * </p> 31 * 32 * @param taskInstance the instance of add the child to 33 * @param child the child to be added 34 * 35 * @throws IllegalArgumentException as described 28 36 */ 29 37 void addChild(ITaskInstance taskInstance, ITaskInstance child) throws IllegalArgumentException; … … 31 39 /** 32 40 * <p> 33 * TODO: comment41 * adds a task instance to a user session 34 42 * </p> 35 43 * 36 * @param session 37 * @param taskInstance 44 * @param session the session to add the task instance to 45 * @param taskInstance the task instance to add 38 46 */ 39 47 void addExecutedTask(IUserSession session, ITaskInstance taskInstance); 40 48 41 49 /** 42 * 43 * @param parent 44 * @param i 50 * <p> 51 * adds a task instance to a task instance list 52 * </p> 53 * 54 * @param taskInstanceList the list to add the task instance to 55 * @param taskInstance the task instance to add 45 56 */ 46 57 void addTaskInstance(ITaskInstanceList taskInstanceList, ITaskInstance taskInstance); 47 58 48 59 /** 49 * 50 * @param parent 51 * @param i 52 */ 53 void addTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance); 54 55 /** 56 * 57 * @param parent 58 * @param i 59 */ 60 void setTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance); 61 62 /** 63 * <p> 64 * TODO: comment 65 * </p> 66 * 67 * @param instance2 68 * @param task 60 * <p> 61 * adds a task instance to a task instance list at a specific position. Subsequent task 62 * instances will be moved one index forward 63 * </p> 64 * 65 * @param taskInstanceList the list to add the task instance to 66 * @param index the index of the task instance to add 67 * @param taskInstance the task instance to add 68 * 69 * @throws IndexOutOfBoundsException if the index is invalid 70 */ 71 void addTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance) 72 throws IndexOutOfBoundsException; 73 74 /** 75 * <p> 76 * sets a task instance in a task instance list at a specific position 77 * </p> 78 * 79 * @param taskInstanceList the list to set the task instance in 80 * @param index the index of the task instance to replace 81 * @param taskInstance the replacement for the task instance at the index 82 * 83 * @throws IndexOutOfBoundsException if the index is invalid 84 */ 85 void setTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance) 86 throws IndexOutOfBoundsException; 87 88 /** 89 * <p> 90 * sets the task model of a task instance 91 * </p> 92 * 93 * @param taskInstance the task instance to set the task model for 94 * @param task the task model of the instance 69 95 */ 70 96 void setTask(ITaskInstance taskInstance, ITask task); 71 97 72 98 /** 73 * 99 * <p> 100 * adds a child task to the end of a sequence 101 * </p> 102 * 103 * @param parent the sequence to add the child to 104 * @param child the child to be added 74 105 */ 75 106 void addChild(ISequence parent, ITask child); 76 107 77 108 /** 78 * 79 */ 80 void addChild(ISequence parent, int index, ITask child); 81 82 /** 83 * 84 * @param parent 85 * @param i 86 */ 87 void setChild(ISequence parent, int index, ITask child); 88 89 /** 90 * @param sequence 91 * @param task 109 * <p> 110 * adds a child task to a specific index of a sequence 111 * </p> 112 * 113 * @param parent the sequence to add the child to 114 * @param index the index to set the child at 115 * @param child the child to be added 116 * 117 * @throws IndexOutOfBoundsException if the index is invalid 118 */ 119 void addChild(ISequence parent, int index, ITask child) 120 throws IndexOutOfBoundsException; 121 122 /** 123 * <p> 124 * replaces the child task of a sequence at a specific position 125 * </p> 126 * 127 * @param parent the sequence to replace the child in 128 * @param index the index to replace the child at 129 * @param child the child to be added 130 * 131 * @throws IndexOutOfBoundsException if the index is invalid 132 */ 133 void setChild(ISequence parent, int index, ITask child) 134 throws IndexOutOfBoundsException; 135 136 /** 137 * <p> 138 * adds a child task to a selection 139 * </p> 140 * 141 * @param parent the selection to add the child to 142 * @param child the child to be added 92 143 */ 93 144 void addChild(ISelection parent, ITask child); 94 145 95 146 /** 96 * 97 * @param iteration 98 * @param newChild 99 */ 100 void setMarkedTask(IIteration iteration, ITask newChild); 101 102 /** 103 * 104 * @param optional 105 * @param newChild 106 */ 107 void setMarkedTask(IOptional optional, ITask newChild); 108 109 /** 110 * 111 * @param parent 112 * @param i 113 */ 114 void removeChild(ISequence parent, int index); 115 116 /** 117 * 118 * @param parent 119 * @param i 147 * <p> 148 * sets the child task of an iteration 149 * </p> 150 * 151 * @param parent the iteration to set the child of 152 * @param child the child to be set 153 */ 154 void setMarkedTask(IIteration iteration, ITask child); 155 156 /** 157 * <p> 158 * sets the child task of an optional 159 * </p> 160 * 161 * @param parent the optional to set the child of 162 * @param child the child to be set 163 */ 164 void setMarkedTask(IOptional optional, ITask child); 165 166 /** 167 * <p> 168 * removes the child of a sequence at a specific position 169 * </p> 170 * 171 * @param parent the sequence of which the child must be removed 172 * @param index the index of the child to be removed 173 * 174 * @throws IndexOutOfBoundsException if the index is invalid 175 */ 176 void removeChild(ISequence parent, int index) 177 throws IndexOutOfBoundsException; 178 179 /** 180 * <p> 181 * removes a child of a selection. Ignores the call, if the child is not found 182 * (comparison using equals). 183 * </p> 184 * 185 * @param parent the selection of which the child must be removed 186 * @param child the child to be removes 120 187 */ 121 188 void removeChild(ISelection parent, ITask child); 122 189 123 190 /** 124 * 125 * @param parent 126 * @param i 127 */ 128 void removeTaskInstance(ITaskInstanceList taskInstanceList, int index); 129 130 /** 131 * 132 * @param parent 133 * @param i 191 * <p> 192 * removes the entry of a task instance list at a specific position 193 * </p> 194 * 195 * @param taskInstanceList the task instance list of which the entry must be removed 196 * @param index the index of the entry to be removed 197 * 198 * @throws IndexOutOfBoundsException if the index is invalid 199 */ 200 void removeTaskInstance(ITaskInstanceList taskInstanceList, int index) 201 throws IndexOutOfBoundsException; 202 203 /** 204 * <p> 205 * replaces a child of a selection. Throws an IllegalArgumentException if the child is not 206 * found (comparison using equals). 207 * </p> 208 * 209 * @param parent the selection of which the child must be replace 210 * @param oldChild the child to replace 211 * @param newChild the replacement for the child 212 * 213 * @throws as described 134 214 */ 135 215 void replaceChild(ISelection parent, ITask oldChild, ITask newChild); 136 216 137 217 /** 138 * 139 * @param parent 140 * @param i 218 * <p> 219 * sets the description of a task 220 * </p> 221 * 222 * @param task the task to set the description of 223 * @param description the new description of the task 141 224 */ 142 225 void setDescription(ITask task, String description);
Note: See TracChangeset
for help on using the changeset viewer.