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 | |
---|
15 | package de.ugoe.cs.autoquest.tasktrees.treeifc; |
---|
16 | |
---|
17 | import java.util.List; |
---|
18 | |
---|
19 | import de.ugoe.cs.autoquest.eventcore.Event; |
---|
20 | |
---|
21 | /** |
---|
22 | * <p> |
---|
23 | * factory for the different task types |
---|
24 | * </p> |
---|
25 | * |
---|
26 | * @author Patrick Harms |
---|
27 | */ |
---|
28 | public interface ITaskFactory { |
---|
29 | |
---|
30 | /** |
---|
31 | * <p> |
---|
32 | * creates a new event task with the given description |
---|
33 | * </p> |
---|
34 | * |
---|
35 | * @param description the description for the represented events |
---|
36 | * |
---|
37 | * @return the event task |
---|
38 | */ |
---|
39 | IEventTask createNewEventTask(String description); |
---|
40 | |
---|
41 | /** |
---|
42 | * <p> |
---|
43 | * creates a new empty sequence |
---|
44 | * </p> |
---|
45 | * |
---|
46 | * @return the sequence |
---|
47 | */ |
---|
48 | ISequence createNewSequence(); |
---|
49 | |
---|
50 | /** |
---|
51 | * <p> |
---|
52 | * creates a new empty iteration |
---|
53 | * </p> |
---|
54 | * |
---|
55 | * @return the iteration |
---|
56 | */ |
---|
57 | IIteration createNewIteration(); |
---|
58 | |
---|
59 | /** |
---|
60 | * <p> |
---|
61 | * creates a new empty optional |
---|
62 | * </p> |
---|
63 | * |
---|
64 | * @return the optional |
---|
65 | */ |
---|
66 | IOptional createNewOptional(); |
---|
67 | |
---|
68 | /** |
---|
69 | * <p> |
---|
70 | * creates a new empty selection |
---|
71 | * </p> |
---|
72 | * |
---|
73 | * @return the selection |
---|
74 | */ |
---|
75 | ISelection createNewSelection(); |
---|
76 | |
---|
77 | /** |
---|
78 | * <p> |
---|
79 | * creates a new task instance with the given task as its model representing the provided event |
---|
80 | * </p> |
---|
81 | * |
---|
82 | * @param task the model of the task instance to be created |
---|
83 | * @param event the event represented by the task instance |
---|
84 | * |
---|
85 | * @return the task instance |
---|
86 | */ |
---|
87 | IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); |
---|
88 | |
---|
89 | /** |
---|
90 | * <p> |
---|
91 | * creates a new task instance with the given sequence as its model |
---|
92 | * </p> |
---|
93 | * |
---|
94 | * @param sequence the model of the task instance to be created |
---|
95 | * |
---|
96 | * @return the task instance |
---|
97 | */ |
---|
98 | ISequenceInstance createNewTaskInstance(ISequence sequence); |
---|
99 | |
---|
100 | /** |
---|
101 | * <p> |
---|
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> |
---|
135 | * creates a new empty user session |
---|
136 | * </p> |
---|
137 | * |
---|
138 | * @return the user session |
---|
139 | */ |
---|
140 | IUserSession createUserSession(); |
---|
141 | |
---|
142 | /** |
---|
143 | * <p> |
---|
144 | * creates a task model based on the provided user sessions |
---|
145 | * </p> |
---|
146 | * |
---|
147 | * @param userSessions the session based on which the task model shall be created |
---|
148 | * |
---|
149 | * @return the task model |
---|
150 | */ |
---|
151 | ITaskModel createTaskModel(List<IUserSession> userSessions); |
---|
152 | |
---|
153 | } |
---|