Class TopicAssociation
java.lang.Object
hudson.model.AbstractDescribableImpl<TopicAssociation>
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.TopicAssociation
- All Implemented Interfaces:
Describable<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 ClassesModifier and TypeClassDescriptionstatic classThe Descriptor for the Topic Association. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TopicAssociation(boolean ignoreNewChangeStatus, boolean ignoreMergedChangeStatus, boolean ignoreAbandonedChangeStatus) Default data bound constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if a change in state NEW should be ignored otherwise false.booleanReturns true if a change in state NEW should be ignored otherwise false.booleanReturns true if a change in state NEW should be ignored otherwise false.booleanisInterestingChangeStatus(com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change c) Checks if the change state is interesting.voidsetIgnoreAbandonedChangeStatus(boolean ignoreAbandonedChangeStatus) Enable or disable ignoring changes with status ABANDONED.voidsetIgnoreMergedChangeStatus(boolean ignoreMergedChangeStatus) Enable or disable ignoring changes with status MERGED.voidsetIgnoreNewChangeStatus(boolean ignoreNewChangeStatus) Enable or disable ignoring changes with status NEW.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
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 Details
-
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.
-