Class TopicAssociation
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<TopicAssociation>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TopicAssociation.DescriptorImpl
The Descriptor for the Topic Association.
-
Constructor Summary
Constructors Constructor Description TopicAssociation()
Default constructor.TopicAssociation(boolean ignoreNewChangeStatus, boolean ignoreMergedChangeStatus, boolean ignoreAbandonedChangeStatus)
Default data bound constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isIgnoreAbandonedChangeStatus()
Returns true if a change in state NEW should be ignored otherwise false.boolean
isIgnoreMergedChangeStatus()
Returns true if a change in state NEW should be ignored otherwise false.boolean
isIgnoreNewChangeStatus()
Returns true if a change in state NEW should be ignored otherwise false.boolean
isInterestingChangeStatus(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change c)
Checks if the change state is interesting.void
setIgnoreAbandonedChangeStatus(boolean ignoreAbandonedChangeStatus)
Enable or disable ignoring changes with status ABANDONED.void
setIgnoreMergedChangeStatus(boolean ignoreMergedChangeStatus)
Enable or disable ignoring changes with status MERGED.void
setIgnoreNewChangeStatus(boolean ignoreNewChangeStatus)
Enable or disable ignoring changes with status NEW.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
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 ignoredignoreMergedChangeStatus
- If changes with status MERGED should be ignoredignoreAbandonedChangeStatus
- 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.
-
-