Search in sources :

Example 1 with LockRequest

use of org.eclipse.che.plugin.svn.shared.LockRequest 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));
}
Also used : CLIOutputResponse(org.eclipse.che.plugin.svn.shared.CLIOutputResponse) LockRequest(org.eclipse.che.plugin.svn.shared.LockRequest)

Example 2 with LockRequest

use of org.eclipse.che.plugin.svn.shared.LockRequest 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));
}
Also used : CLIOutputResponse(org.eclipse.che.plugin.svn.shared.CLIOutputResponse) LockRequest(org.eclipse.che.plugin.svn.shared.LockRequest)

Aggregations

CLIOutputResponse (org.eclipse.che.plugin.svn.shared.CLIOutputResponse)2 LockRequest (org.eclipse.che.plugin.svn.shared.LockRequest)2