Class CommentValidationContext

java.lang.Object
com.google.gerrit.extensions.validators.CommentValidationContext

public abstract class CommentValidationContext extends Object
Holds a comment validators context in order to pass it to a validation plugin.

This is used to provided additional context around that comment that can be used by the validator to determine what validations should be run. For example, a comment validator may only want to validate a comment if it's on a change in the project foo.

See Also:
  • Constructor Details

    • CommentValidationContext

      public CommentValidationContext()
  • Method Details

    • getChangeId

      public abstract int getChangeId()
      Returns the change id the comment is being added to.
    • getProject

      public abstract String getProject()
      Returns the project the comment is being added to.
    • getRefName

      public abstract String getRefName()
      Returns the ref name the comment is being added to.
    • create

      public static CommentValidationContext create(int changeId, String project, String refName)