Class TopicAssociation

  • All Implemented Interfaces:
    Describable<TopicAssociation>

    public class TopicAssociation
    extends AbstractDescribableImpl<TopicAssociation>
    Topic Association Option. If this option is enabled the job matching the topic configuration is triggered. Since changes assigned to a topic could be in an inappropriate state we check if changes in state NEW, MERGED or ABANDONED should be ignored. In general this shouldn't happen since changes can only be merged together. However, if someone adds a change to an already merged topic the jobs for the merged changes shouldn't be triggered again if not required.
    • Constructor Detail

      • TopicAssociation

        @DataBoundConstructor
        public TopicAssociation​(boolean ignoreNewChangeStatus,
                                boolean ignoreMergedChangeStatus,
                                boolean ignoreAbandonedChangeStatus)
        Default data bound constructor.
        Parameters:
        ignoreNewChangeStatus - If changes with status NEW should be ignored
        ignoreMergedChangeStatus - If changes with status MERGED should be ignored
        ignoreAbandonedChangeStatus - If changes with status ABANDONED should be ignored
      • TopicAssociation

        public TopicAssociation()
        Default constructor.
    • Method Detail

      • isIgnoreNewChangeStatus

        public boolean isIgnoreNewChangeStatus()
        Returns true if a change in state NEW should be ignored otherwise false.
        Returns:
        true if it should be ignored otherwise false
      • setIgnoreNewChangeStatus

        public void setIgnoreNewChangeStatus​(boolean ignoreNewChangeStatus)
        Enable or disable ignoring changes with status NEW.
        Parameters:
        ignoreNewChangeStatus - true or false.
      • isIgnoreMergedChangeStatus

        public boolean isIgnoreMergedChangeStatus()
        Returns true if a change in state NEW should be ignored otherwise false. Used for jelly file.
        Returns:
        true if it should be ignored otherwise false
      • setIgnoreMergedChangeStatus

        public void setIgnoreMergedChangeStatus​(boolean ignoreMergedChangeStatus)
        Enable or disable ignoring changes with status MERGED.
        Parameters:
        ignoreMergedChangeStatus - true or false.
      • isIgnoreAbandonedChangeStatus

        public boolean isIgnoreAbandonedChangeStatus()
        Returns true if a change in state NEW should be ignored otherwise false. Used for jelly file.
        Returns:
        true if it should be ignored otherwise false
      • setIgnoreAbandonedChangeStatus

        public void setIgnoreAbandonedChangeStatus​(boolean ignoreAbandonedChangeStatus)
        Enable or disable ignoring changes with status ABANDONED.
        Parameters:
        ignoreAbandonedChangeStatus - true or false.
      • isInterestingChangeStatus

        public boolean isInterestingChangeStatus​(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change c)
        Checks if the change state is interesting.
        Parameters:
        c - the change.
        Returns:
        true if the change is interesting otherwise false.