use of org.eclipse.che.plugin.svn.shared.CLIOutputResponse in project che by eclipse.
the class SubversionClientServiceImpl method copy.
@Override
public Promise<CLIOutputResponse> copy(Path project, Path source, Path destination, String comment, Credentials credentials) {
final CopyRequest request = dtoFactory.createDto(CopyRequest.class).withProjectPath(project.toString()).withSource(source.toString()).withDestination(destination.toString()).withComment(comment);
if (credentials != null) {
request.setUsername(credentials.getUsername());
request.setPassword(credentials.getPassword());
}
return asyncRequestFactory.createPostRequest(getBaseUrl() + "/copy", request).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(CLIOutputResponse.class));
}
use of org.eclipse.che.plugin.svn.shared.CLIOutputResponse in project che by eclipse.
the class SubversionClientServiceImpl method unlock.
@Override
public Promise<CLIOutputResponse> unlock(Path project, Path[] paths, boolean force, Credentials credentials) {
final String url = getBaseUrl() + "/unlock";
final LockRequest request = dtoFactory.createDto(LockRequest.class).withProjectPath(project.toString()).withTargets(toList(paths)).withForce(force);
if (credentials != null) {
request.setUsername(credentials.getUsername());
request.setPassword(credentials.getPassword());
}
return asyncRequestFactory.createPostRequest(url, request).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(CLIOutputResponse.class));
}
use of org.eclipse.che.plugin.svn.shared.CLIOutputResponse in project che by eclipse.
the class SubversionClientServiceImpl method showDiff.
@Override
public Promise<CLIOutputResponse> showDiff(Path project, Path[] paths, String revision, Credentials credentials) {
final String url = getBaseUrl() + "/showdiff";
final ShowDiffRequest request = dtoFactory.createDto(ShowDiffRequest.class).withProjectPath(project.toString()).withPaths(toList(paths)).withRevision(revision);
if (credentials != null) {
request.setUsername(credentials.getUsername());
request.setPassword(credentials.getPassword());
}
return asyncRequestFactory.createPostRequest(url, request).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(CLIOutputResponse.class));
}
use of org.eclipse.che.plugin.svn.shared.CLIOutputResponse in project che by eclipse.
the class SubversionClientServiceImpl method lock.
@Override
public Promise<CLIOutputResponse> lock(Path project, Path[] paths, boolean force, Credentials credentials) {
final String url = getBaseUrl() + "/lock";
final LockRequest request = dtoFactory.createDto(LockRequest.class).withProjectPath(project.toString()).withTargets(toList(paths)).withForce(force);
if (credentials != null) {
request.setUsername(credentials.getUsername());
request.setPassword(credentials.getPassword());
}
return asyncRequestFactory.createPostRequest(url, request).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(CLIOutputResponse.class));
}
use of org.eclipse.che.plugin.svn.shared.CLIOutputResponse in project che by eclipse.
the class SubversionClientServiceImpl method move.
@Override
public Promise<CLIOutputResponse> move(Path project, Path source, Path destination, String comment, Credentials credentials) {
final MoveRequest request = dtoFactory.createDto(MoveRequest.class).withProjectPath(project.toString()).withSource(Collections.singletonList(source.toString())).withDestination(destination.toString()).withComment(comment);
if (credentials != null) {
request.setUsername(credentials.getUsername());
request.setPassword(credentials.getPassword());
}
return asyncRequestFactory.createPostRequest(getBaseUrl() + "/move", request).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(CLIOutputResponse.class));
}
Aggregations