Class Branch

  • All Implemented Interfaces:
    Describable<Branch>

    public class Branch
    extends AbstractDescribableImpl<Branch>
    Represents a rule for triggering on a branch of a GerritProject.
    Author:
    Robert Sandell <robert.sandell@sonyericsson.com>
    • Constructor Detail

      • Branch

        public Branch()
        Default empty constructor.
      • Branch

        @DataBoundConstructor
        public Branch​(CompareType compareType,
                      String pattern)
        Default DataBound constructor.
        Parameters:
        compareType - the CompareType to use when comparing with the pattern.
        pattern - the pattern to match on.
    • Method Detail

      • getCompareType

        public CompareType getCompareType()
        The CompareType used.
        Returns:
        the CompareType
      • setCompareType

        public void setCompareType​(CompareType compareType)
        The CompareType used.
        Parameters:
        compareType - the compareType.
      • getPattern

        public String getPattern()
        The pattern to match on.
        Returns:
        the pattern
      • setPattern

        public void setPattern​(String pattern)
        The pattern to match on.
        Parameters:
        pattern - the pattern.
      • isInteresting

        public boolean isInteresting​(String branch)
        Tells if the given branch is matched by this rule.
        Parameters:
        branch - the branch
        Returns:
        true if the branch matches.