Class RefOperationValidators
- java.lang.Object
-
- com.google.gerrit.server.git.validators.RefOperationValidators
-
public class RefOperationValidators extends Object
Collection of validation listeners that are called before a ref update is performed with the command to be run. This is called from the git push path as well as Gerrit's handlers for creating or deleting refs. Calls out toRefOperationValidationListener
provided by plugins.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RefOperationValidators.Factory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.eclipse.jgit.transport.ReceiveCommand
getCommand(org.eclipse.jgit.lib.RefUpdate update, org.eclipse.jgit.transport.ReceiveCommand.Type type)
List<ValidationMessage>
validateForRefOperation()
Returns informational validation messages and throws aRefOperationValidationException
when the first validator fails.
-
-
-
Method Detail
-
getCommand
public static org.eclipse.jgit.transport.ReceiveCommand getCommand(org.eclipse.jgit.lib.RefUpdate update, org.eclipse.jgit.transport.ReceiveCommand.Type type)
-
validateForRefOperation
public List<ValidationMessage> validateForRefOperation() throws RefOperationValidationException
Returns informational validation messages and throws aRefOperationValidationException
when the first validator fails. Will not process any more validators after the first failure was encountered.- Throws:
RefOperationValidationException
-
-