Search in sources :

Example 1 with Arguments

use of com.google.gerrit.server.git.validators.OnSubmitValidationListener.Arguments in project gerrit by GerritCodeReview.

the class OnSubmitValidators method validate.

public void validate(Project.NameKey project, ObjectReader objectReader, ChainedReceiveCommands commands) throws IntegrationConflictException {
    try (RevWalk rw = new RevWalk(objectReader)) {
        Arguments args = new Arguments(project, rw, commands);
        listeners.runEach(l -> l.preBranchUpdate(args), ValidationException.class);
    } catch (ValidationException e) {
        throw new IntegrationConflictException(e.getMessage(), e);
    }
}
Also used : ValidationException(com.google.gerrit.server.validators.ValidationException) Arguments(com.google.gerrit.server.git.validators.OnSubmitValidationListener.Arguments) IntegrationConflictException(com.google.gerrit.server.submit.IntegrationConflictException) RevWalk(org.eclipse.jgit.revwalk.RevWalk)

Aggregations

Arguments (com.google.gerrit.server.git.validators.OnSubmitValidationListener.Arguments)1 IntegrationConflictException (com.google.gerrit.server.submit.IntegrationConflictException)1 ValidationException (com.google.gerrit.server.validators.ValidationException)1 RevWalk (org.eclipse.jgit.revwalk.RevWalk)1