Class GerritProject
java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject
- All Implemented Interfaces:
Describable<GerritProject>
Base settings for one matcher rule of a Gerrit project.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDescriptor allowing for communication within the Repeatable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe list of branch-rules.Which algorithm-type to use with the pattern.The list of filepath-rules.The list of the forbidden file-path rules.The pattern for the project-name to match on.The list of topic-rules.booleanWhether to disable strict verification of forbidden files.booleanisInteresting(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change) Compares the project and branch to see if the rules specified is a match.booleanisInteresting(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change, Supplier<List<String>> files) Compares the project, branch and files to see if the rules specified is a match.booleanisInteresting(String project, String branch, String topic) Deprecated.booleanDeprecated.voidsetBranches(List<Branch> branches) The list of branch-rules.voidsetCompareType(CompareType compareType) Which algorithm-type to use with the pattern.voidsetDisableStrictForbiddenFileVerification(boolean disableStrictForbiddenFileVerification) Set whether to disable strict verification of forbidden files.voidsetFilePaths(List<FilePath> filePaths) The list of filepath-rules.voidsetForbiddenFilePaths(List<FilePath> forbiddenFilePaths) The list of the forbidden file-path rules.voidsetHashtags(List<Hashtag> hashtags) The list of the hashtags-rules.voidsetPattern(String pattern) The pattern for the project-name to match on.voidThe list of topic-rules.
-
Constructor Details
-
GerritProject
public GerritProject()Default empty constructor. -
GerritProject
@DataBoundConstructor public GerritProject(CompareType compareType, String pattern, List<Branch> branches, List<Topic> topics, List<FilePath> filePaths, List<FilePath> forbiddenFilePaths, boolean disableStrictForbiddenFileVerification) DataBound Constructor.- Parameters:
compareType- the compareTypepattern- the project-name patternbranches- the branch-rulestopics- the topic-rulesfilePaths- the file-path rules.forbiddenFilePaths- the forbidden file-path rules.disableStrictForbiddenFileVerification- whether to be strict or not.
-
-
Method Details
-
isDisableStrictForbiddenFileVerification
public boolean isDisableStrictForbiddenFileVerification()Whether to disable strict verification of forbidden files.- Returns:
- true if disabled.
-
setDisableStrictForbiddenFileVerification
public void setDisableStrictForbiddenFileVerification(boolean disableStrictForbiddenFileVerification) Set whether to disable strict verification of forbidden files.- Parameters:
disableStrictForbiddenFileVerification- true to disable.
-
getCompareType
Which algorithm-type to use with the pattern.- Returns:
- the compareType
-
setCompareType
Which algorithm-type to use with the pattern.- Parameters:
compareType- the compareType
-
getPattern
The pattern for the project-name to match on.- Returns:
- the pattern
-
setPattern
The pattern for the project-name to match on.- Parameters:
pattern- the pattern
-
getBranches
The list of branch-rules.- Returns:
- the branch-rules
-
setBranches
The list of branch-rules.- Parameters:
branches- the branch-rules
-
getFilePaths
The list of filepath-rules.- Returns:
- the filepath-rules
-
setFilePaths
The list of filepath-rules.- Parameters:
filePaths- the filepath-rules
-
getTopics
The list of topic-rules.- Returns:
- the topic-rules
-
setTopics
The list of topic-rules.- Parameters:
topics- the topic-rules
-
getHashtags
- Returns:
- the hashtags-rules
-
setHashtags
The list of the hashtags-rules.- Parameters:
hashtags- the hashtags-rules
-
getForbiddenFilePaths
The list of the forbidden file-path rules.- Returns:
- the forbidden file-path rules.
-
setForbiddenFilePaths
The list of the forbidden file-path rules.- Parameters:
forbiddenFilePaths- the forbidden file-path rules.
-
isInteresting
@Deprecated public boolean isInteresting(String project, String branch, String topic, Supplier<List<String>> files) Deprecated.Compares the project, branch and files to see if the rules specified is a match.- Parameters:
project- the Gerrit projectbranch- the branch.topic- the topic.files- a closure which returns the list of files in the change.- Returns:
- true is the rules match.
-
isInteresting
Deprecated.Compares the project and branch to see if the rules specified is a match.- Parameters:
project- the Gerrit projectbranch- the branch.topic- the topic.- Returns:
- true is the rules match.
-
isInteresting
public boolean isInteresting(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change, Supplier<List<String>> files) Compares the project, branch and files to see if the rules specified is a match.- Parameters:
change- gerrit change info.files- a closure which returns the list of files in the change.- Returns:
- true is the rules match.
-
isInteresting
public boolean isInteresting(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change) Compares the project and branch to see if the rules specified is a match.- Parameters:
change- gerrit change info.- Returns:
- true is the rules match.
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<GerritProject>
-