Search in sources :

Example 1 with ParentInput

use of com.google.gerrit.extensions.api.projects.ParentInput in project gerrit by GerritCodeReview.

the class ProjectApiImpl method parent.

@Override
public void parent(String parent) throws RestApiException {
    try {
        ParentInput input = new ParentInput();
        input.parent = parent;
        setParent.apply(checkExists(), input);
    } catch (Exception e) {
        throw asRestApiException("Cannot set parent", e);
    }
}
Also used : ParentInput(com.google.gerrit.extensions.api.projects.ParentInput) ResourceNotFoundException(com.google.gerrit.extensions.restapi.ResourceNotFoundException) ApiUtil.asRestApiException(com.google.gerrit.server.api.ApiUtil.asRestApiException) BadRequestException(com.google.gerrit.extensions.restapi.BadRequestException) NotImplementedException(com.google.gerrit.extensions.restapi.NotImplementedException) RestApiException(com.google.gerrit.extensions.restapi.RestApiException) ResourceConflictException(com.google.gerrit.extensions.restapi.ResourceConflictException)

Example 2 with ParentInput

use of com.google.gerrit.extensions.api.projects.ParentInput in project gerrit by GerritCodeReview.

the class SetParentCommand method parentInput.

private static ParentInput parentInput(String parent) {
    ParentInput input = new ParentInput();
    input.parent = parent;
    return input;
}
Also used : ParentInput(com.google.gerrit.extensions.api.projects.ParentInput)

Aggregations

ParentInput (com.google.gerrit.extensions.api.projects.ParentInput)2 BadRequestException (com.google.gerrit.extensions.restapi.BadRequestException)1 NotImplementedException (com.google.gerrit.extensions.restapi.NotImplementedException)1 ResourceConflictException (com.google.gerrit.extensions.restapi.ResourceConflictException)1 ResourceNotFoundException (com.google.gerrit.extensions.restapi.ResourceNotFoundException)1 RestApiException (com.google.gerrit.extensions.restapi.RestApiException)1 ApiUtil.asRestApiException (com.google.gerrit.server.api.ApiUtil.asRestApiException)1