Search in sources :

Example 1 with BranchCreateRequest

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);
}
Also used : BranchCreateRequest(org.eclipse.che.api.git.shared.BranchCreateRequest)

Example 2 with BranchCreateRequest

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));
}
Also used : BranchCreateRequest(org.eclipse.che.api.git.shared.BranchCreateRequest) Branch(org.eclipse.che.api.git.shared.Branch)

Aggregations

BranchCreateRequest (org.eclipse.che.api.git.shared.BranchCreateRequest)2 Branch (org.eclipse.che.api.git.shared.Branch)1