Search in sources :

Example 1 with LinkResponse

use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.LinkResponse in project linuxtools by eclipse.

the class OSIOTestRestRequestProvider method postNewLink.

@Override
public LinkResponse postNewLink(IOperationMonitor monitor, CommonHttpClient client, String linkid, String sourceid, String targetid, boolean isForward) throws OSIORestException {
    String query = // $NON-NLS-1$
    "/workitems/" + (isForward ? sourceid : targetid) + "/relationships/links";
    LinkResponse response = (LinkResponse) postMap.get(query);
    WorkItem source = (WorkItem) requestMap.get("/workitems/" + sourceid);
    WorkItem target = (WorkItem) requestMap.get("/workitems/" + targetid);
    String sourceNum = (String) source.getNumber();
    String targetNum = (String) target.getNumber();
    requestMap.put(query, response);
    return response;
}
Also used : WorkItem(org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.WorkItem) LinkResponse(org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.LinkResponse)

Aggregations

LinkResponse (org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.LinkResponse)1 WorkItem (org.eclipse.linuxtools.internal.mylyn.osio.rest.core.response.data.WorkItem)1