Class DecisionMaker
- java.lang.Object
-
- jenkins.plugins.office365connector.DecisionMaker
-
public class DecisionMaker extends Object
Provides methods that help to decide if the notification should be sent or skipped.- Author:
- Damian Szczepanik (damianszczepanik@github)
-
-
Constructor Summary
Constructors Constructor Description DecisionMaker(Run run, TaskListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAtLeastOneRuleMatched(Webhook webhook)
Iterates over each macro for passed webhook and checks if at least one template matches to expected value.boolean
isStatusMatched(Webhook webhook)
Checks if notification should be passed by comparing current status and webhook configuration
-
-
-
Constructor Detail
-
DecisionMaker
public DecisionMaker(Run run, TaskListener listener)
-
-
Method Detail
-
isAtLeastOneRuleMatched
public boolean isAtLeastOneRuleMatched(Webhook webhook)
Iterates over each macro for passed webhook and checks if at least one template matches to expected value.- Parameters:
webhook
- webhook that should be examined- Returns:
true
if at least one macro has matched,false
otherwise
-
isStatusMatched
public boolean isStatusMatched(Webhook webhook)
Checks if notification should be passed by comparing current status and webhook configuration- Parameters:
webhook
- webhook that will be verified- Returns:
true
if current status matches to webhook configuration
-
-