/*
* File: TaskInfo.java
* Author: Daniel Rogers
* Created on Jan 16, 2008
*
*/
package gri.tasks.managers;
import gri.tasks.Task;
import gri.tasks.AsyncTask;
import gri.tasks.AsyncTaskWrapper;
/**
* An object used to group a Task with an ID and description. The
* task is made available as a synchronous or asynchronous task.
*
* @author dan.rogers
*/
public class TaskEntry {
String taskId;
Task task;
AsyncTask asyncTask;
TaskDescription taskDescription;
// ----------------------------------------------------- Constructors
public TaskEntry(String id, Task task, AsyncTask aTask, TaskDescription desc) {
this.taskId = id;
this.task = task;
this.asyncTask = aTask;
this.taskDescription = desc;
}
public TaskEntry(String id, Task task, TaskDescription desc) {
this(id, task, new AsyncTaskWrapper(task), desc);
}
// -------------------------------------------------------- Accessors
public String getTaskId() {return taskId;}
public TaskDescription getTaskDescription() {return taskDescription;}
public Task getTask() {return task;}
public AsyncTask getAsyncTask() {return asyncTask;}
}