use of org.eclipse.che.api.git.shared.BranchCreateRequest in project che by eclipse.
the class GitServiceClientImpl method branchCreate.
@Override
public void branchCreate(DevMachine devMachine, ProjectConfigDto project, String name, String startPoint, AsyncRequestCallback<Branch> callback) {
BranchCreateRequest branchCreateRequest = dtoFactory.createDto(BranchCreateRequest.class).withName(name).withStartPoint(startPoint);
String url = appContext.getDevMachine().getWsAgentBaseUrl() + BRANCH + "?projectPath=" + project.getPath();
asyncRequestFactory.createPostRequest(url, branchCreateRequest).loader(loader).header(ACCEPT, APPLICATION_JSON).send(callback);
}
use of org.eclipse.che.api.git.shared.BranchCreateRequest in project che by eclipse.
the class GitServiceClientImpl method branchCreate.
@Override
public Promise<Branch> branchCreate(DevMachine devMachine, Path project, String name, String startPoint) {
BranchCreateRequest branchCreateRequest = dtoFactory.createDto(BranchCreateRequest.class).withName(name).withStartPoint(startPoint);
String url = appContext.getDevMachine().getWsAgentBaseUrl() + BRANCH + "?projectPath=" + project.toString();
return asyncRequestFactory.createPostRequest(url, branchCreateRequest).loader(loader).header(ACCEPT, APPLICATION_JSON).send(dtoUnmarshallerFactory.newUnmarshaller(Branch.class));
}
Aggregations