Class Branch
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Branch>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.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>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Branch.DescriptorImpl
The Descriptor for the Branch.
-
Constructor Summary
Constructors Constructor Description Branch()
Default empty constructor.Branch(CompareType compareType, String pattern)
Default DataBound constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompareType
getCompareType()
The CompareType used.String
getPattern()
The pattern to match on.boolean
isInteresting(String branch)
Tells if the given branch is matched by this rule.void
setCompareType(CompareType compareType)
The CompareType used.void
setPattern(String pattern)
The pattern to match on.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
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.
-
-