Class FilePath
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<FilePath>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath
-
- All Implemented Interfaces:
Describable<FilePath>
public class FilePath extends AbstractDescribableImpl<FilePath>
Represents a rule for triggering on a filepath of a GerritProject.- Author:
- Tomas Westling <thomas.westling@sonyericsson.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FilePath.DescriptorImpl
The Descriptor for the FilePath.
-
Constructor Summary
Constructors Constructor Description FilePath()
Default empty constructor.FilePath(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 file)
Tells if the given file is matched by this rule.boolean
isInteresting(List<String> files)
Tells if the given files are 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
-
FilePath
public FilePath()
Default empty constructor.
-
FilePath
@DataBoundConstructor public FilePath(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(List<String> files)
Tells if the given files are matched by this rule.- Parameters:
files
- the files in the patch set.- Returns:
- true if the files match.
-
isInteresting
public boolean isInteresting(String file)
Tells if the given file is matched by this rule.- Parameters:
file
- the file in the patch set.- Returns:
- true if the files match.
-
-