use of org.eclipse.che.api.git.shared.FetchRequest in project che by eclipse.
the class GitServiceClientImpl method fetch.
@Override
public Promise<Void> fetch(DevMachine devMachine, Path project, String remote, List<String> refspec, boolean removeDeletedRefs) {
FetchRequest fetchRequest = dtoFactory.createDto(FetchRequest.class).withRefSpec(refspec).withRemote(remote).withRemoveDeletedRefs(removeDeletedRefs);
String url = devMachine.getWsAgentBaseUrl() + FETCH + "?projectPath=" + project;
return asyncRequestFactory.createPostRequest(url, fetchRequest).send();
}
use of org.eclipse.che.api.git.shared.FetchRequest in project che by eclipse.
the class GitServiceClientImpl method fetch.
@Override
public void fetch(DevMachine devMachine, ProjectConfigDto project, String remote, List<String> refspec, boolean removeDeletedRefs, RequestCallback<String> callback) throws WebSocketException {
FetchRequest fetchRequest = dtoFactory.createDto(FetchRequest.class).withRefSpec(refspec).withRemote(remote).withRemoveDeletedRefs(removeDeletedRefs);
String url = FETCH + "?projectPath=" + project.getPath();
MessageBuilder builder = new MessageBuilder(POST, url);
builder.data(dtoFactory.toJson(fetchRequest)).header(CONTENTTYPE, APPLICATION_JSON);
Message message = builder.build();
sendMessageToWS(message, callback);
}
Aggregations