// Copyright 2012 Georg-August-Universität Göttingen, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package de.ugoe.cs.autoquest.tasktrees.treeifc; import java.util.List; import de.ugoe.cs.autoquest.eventcore.Event; /** *

* factory for the different task types *

* * @author Patrick Harms */ public interface ITaskFactory { /** *

* creates a new event task with the given description *

* * @param description the description for the represented events * * @return the event task */ IEventTask createNewEventTask(String description); /** *

* creates a new empty sequence *

* * @return the sequence */ ISequence createNewSequence(); /** *

* creates a new empty iteration *

* * @return the iteration */ IIteration createNewIteration(); /** *

* creates a new empty optional *

* * @return the optional */ IOptional createNewOptional(); /** *

* creates a new empty selection *

* * @return the selection */ ISelection createNewSelection(); /** *

* creates a new task instance with the given task as its model representing the provided event *

* * @param task the model of the task instance to be created * @param event the event represented by the task instance * * @return the task instance */ IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); /** *

* creates a new task instance with the given sequence as its model *

* * @param sequence the model of the task instance to be created * * @return the task instance */ ISequenceInstance createNewTaskInstance(ISequence sequence); /** *

* creates a new task instance with the given iteration as its model *

* * @param iteration the model of the task instance to be created * * @return the task instance */ IIterationInstance createNewTaskInstance(IIteration iteration); /** *

* creates a new task instance with the given optional as its model *

* * @param optional the model of the task instance to be created * * @return the task instance */ IOptionalInstance createNewTaskInstance(IOptional optional); /** *

* creates a new task instance with the given selection as its model *

* * @param selection the model of the task instance to be created * * @return the task instance */ ISelectionInstance createNewTaskInstance(ISelection selection); /** *

* creates a new empty user session *

* * @return the user session */ IUserSession createUserSession(); /** *

* creates a task model based on the provided user sessions *

* * @param userSessions the session based on which the task model shall be created * * @return the task model */ ITaskModel createTaskModel(List userSessions); }