use of org.eclipse.mylyn.tasks.core.data.TaskAttribute in project linuxtools by eclipse.
the class OSIOTestRestRequestProvider method getTaskLinks.
@Override
public TaskAttribute getTaskLinks(IOperationMonitor monitor, CommonHttpClient client, OSIORestClient restClient, Space space, TaskData taskData, OSIORestConfiguration config) throws OSIORestException {
TaskAttribute links = (TaskAttribute) requestMap.get("/workitems/" + taskData.getRoot().getAttribute(OSIORestTaskSchema.getDefault().UUID.getKey()).getValue() + "/relationships/links");
taskData.getRoot().deepAddCopy(links);
return links;
}
use of org.eclipse.mylyn.tasks.core.data.TaskAttribute in project linuxtools by eclipse.
the class OSIOTestRestRequestProvider method getTaskComments.
@SuppressWarnings("unchecked")
@Override
public List<TaskAttribute> getTaskComments(IOperationMonitor monitor, CommonHttpClient client, Space space, TaskData taskData) throws OSIORestException {
List<TaskAttribute> comments = (List<TaskAttribute>) requestMap.get("/workitems/" + taskData.getRoot().getAttribute(OSIORestTaskSchema.getDefault().UUID.getKey()).getValue() + "/comments");
TaskAttribute root = taskData.getRoot();
for (TaskAttribute comment : comments) {
root.deepAddCopy(comment);
}
return comments;
}
use of org.eclipse.mylyn.tasks.core.data.TaskAttribute in project linuxtools by eclipse.
the class OSIOTestRestRequestProvider method getTaskCreator.
@Override
public TaskAttribute getTaskCreator(IOperationMonitor monitor, CommonHttpClient client, TaskData taskData) throws OSIORestException {
TaskAttribute creator = (TaskAttribute) requestMap.get("/users/" + taskData.getRoot().getAttribute(OSIORestTaskSchema.getDefault().CREATOR_ID.getKey()).getValue());
taskData.getRoot().deepAddCopy(creator);
return creator;
}
use of org.eclipse.mylyn.tasks.core.data.TaskAttribute in project linuxtools by eclipse.
the class OSIOTestRestRequestProvider method getTaskLabels.
@Override
public TaskAttribute getTaskLabels(IOperationMonitor monitor, CommonHttpClient client, Space space, TaskData taskData) throws OSIORestException {
TaskAttribute labels = (TaskAttribute) requestMap.get("/workitems/" + taskData.getRoot().getAttribute(OSIORestTaskSchema.getDefault().UUID.getKey()).getValue() + "/labels");
taskData.getRoot().deepAddCopy(labels);
return labels;
}
use of org.eclipse.mylyn.tasks.core.data.TaskAttribute in project linuxtools by eclipse.
the class OSIORestClient method setTaskAssignees.
private void setTaskAssignees(TaskData taskData) throws OSIORestException {
TaskAttribute assigneeIDs = taskData.getRoot().getAttribute(OSIORestTaskSchema.getDefault().ASSIGNEE_IDS.getKey());
List<String> ids = assigneeIDs.getValues();
for (String id : ids) {
restRequestProvider.getTaskAssignee(new NullOperationMonitor(), getClient(), id, taskData);
}
}
Aggregations