Class GerritProject

    • Constructor Detail

      • 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 compareType
        pattern - the project-name pattern
        branches - the branch-rules
        topics - the topic-rules
        filePaths - the file-path rules.
        forbiddenFilePaths - the forbidden file-path rules.
        disableStrictForbiddenFileVerification - whether to be strict or not.
    • Method Detail

      • 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

        public CompareType getCompareType()
        Which algorithm-type to use with the pattern.
        Returns:
        the compareType
      • setCompareType

        public void setCompareType​(CompareType compareType)
        Which algorithm-type to use with the pattern.
        Parameters:
        compareType - the compareType
      • getPattern

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

        public void setPattern​(String pattern)
        The pattern for the project-name to match on.
        Parameters:
        pattern - the pattern
      • getBranches

        public List<Branch> getBranches()
        The list of branch-rules.
        Returns:
        the branch-rules
      • setBranches

        public void setBranches​(List<Branch> branches)
        The list of branch-rules.
        Parameters:
        branches - the branch-rules
      • getFilePaths

        public List<FilePath> getFilePaths()
        The list of filepath-rules.
        Returns:
        the filepath-rules
      • setFilePaths

        public void setFilePaths​(List<FilePath> filePaths)
        The list of filepath-rules.
        Parameters:
        filePaths - the filepath-rules
      • getTopics

        public List<Topic> getTopics()
        The list of topic-rules.
        Returns:
        the topic-rules
      • setTopics

        public void setTopics​(List<Topic> topics)
        The list of topic-rules.
        Parameters:
        topics - the topic-rules
      • getHashtags

        public List<Hashtag> getHashtags()
        Returns:
        the hashtags-rules
      • setHashtags

        @DataBoundSetter
        public void setHashtags​(List<Hashtag> hashtags)
        The list of the hashtags-rules.
        Parameters:
        hashtags - the hashtags-rules
      • getForbiddenFilePaths

        public List<FilePath> getForbiddenFilePaths()
        The list of the forbidden file-path rules.
        Returns:
        the forbidden file-path rules.
      • setForbiddenFilePaths

        public void setForbiddenFilePaths​(List<FilePath> forbiddenFilePaths)
        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 project
        branch - 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
        public boolean isInteresting​(String project,
                                     String branch,
                                     String topic)
        Deprecated.
        Compares the project and branch to see if the rules specified is a match.
        Parameters:
        project - the Gerrit project
        branch - 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.