use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.SingleTaskDataCollector in project linuxtools by eclipse.
the class OSIORestHarness method getTaskFromServer.
public TaskData getTaskFromServer(String taskId) throws OSIORestException, CoreException {
Set<String> taskIds = new HashSet<String>();
taskIds.add(taskId);
SingleTaskDataCollector singleTaskDataCollector = new SingleTaskDataCollector();
connector().getClient(repository()).getTaskData(taskIds, repository(), singleTaskDataCollector, null);
TaskData taskDataGet = singleTaskDataCollector.getTaskData();
assertNotNull(taskDataGet);
assertNotNull(taskDataGet.getRoot());
return taskDataGet;
}
use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.SingleTaskDataCollector in project linuxtools by eclipse.
the class OSIORestTaskDataHandler method getTaskData.
public TaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor) throws CoreException {
Set<String> taskIds = new HashSet<String>();
taskIds.add(taskId);
SingleTaskDataCollector singleTaskDataCollector = new SingleTaskDataCollector();
getMultiTaskData(repository, taskIds, singleTaskDataCollector, monitor);
if (singleTaskDataCollector.getTaskData() == null) {
throw new CoreException(new Status(IStatus.ERROR, OSIORestCore.ID_PLUGIN, // $NON-NLS-1$
"Task data could not be retrieved. Please re-synchronize task"));
}
return singleTaskDataCollector.getTaskData();
}
Aggregations