Search in sources :

Example 1 with RemoteAddRequest

use of org.eclipse.che.api.git.shared.RemoteAddRequest in project che by eclipse.

the class GitServiceClientImpl method remoteAdd.

@Override
public Promise<Void> remoteAdd(DevMachine devMachine, Path project, String name, String url) {
    RemoteAddRequest remoteAddRequest = dtoFactory.createDto(RemoteAddRequest.class).withName(name).withUrl(url);
    String requestUrl = appContext.getDevMachine().getWsAgentBaseUrl() + REMOTE + "?projectPath=" + project.toString();
    return asyncRequestFactory.createPutRequest(requestUrl, remoteAddRequest).loader(loader).send();
}
Also used : RemoteAddRequest(org.eclipse.che.api.git.shared.RemoteAddRequest)

Example 2 with RemoteAddRequest

use of org.eclipse.che.api.git.shared.RemoteAddRequest in project che by eclipse.

the class GitServiceClientImpl method remoteAdd.

@Override
public void remoteAdd(DevMachine devMachine, ProjectConfig project, String name, String repositoryURL, AsyncRequestCallback<String> callback) {
    RemoteAddRequest remoteAddRequest = dtoFactory.createDto(RemoteAddRequest.class).withName(name).withUrl(repositoryURL);
    String url = appContext.getDevMachine().getWsAgentBaseUrl() + REMOTE + "?projectPath=" + project.getPath();
    asyncRequestFactory.createPutRequest(url, remoteAddRequest).loader(loader).send(callback);
}
Also used : RemoteAddRequest(org.eclipse.che.api.git.shared.RemoteAddRequest)

Aggregations

RemoteAddRequest (org.eclipse.che.api.git.shared.RemoteAddRequest)2