Interface ManualTriggerService
- All Known Implementing Classes:
ManualTriggerServiceImpl
public interface ManualTriggerService
Helper service to retrieve all manual triggers and execute manual triggers.
-
Method Summary
Modifier and TypeMethodDescriptionexecuteRule(ApplicationUser loggedInUser, Long projectId, Long ruleId, String issueKey) Attempts to execute a rule with a manual trigger.executeScheduled(ApplicationUser logApplicationUser, Long projectId, Long ruleId) Used to test scheduled rules in the admin section.List<com.codebarrel.automation.api.config.RuleConfigBean> getManualRulesForUser(ApplicationUser user, Issue issue) Retrieves all manual rules the provided user is allowed to see.voidruleModified(com.codebarrel.automation.api.config.RuleConfigBean existingRule, com.codebarrel.automation.api.config.RuleConfigBean newRule) Notifies the service when a rule is edited.
-
Method Details
-
getManualRulesForUser
List<com.codebarrel.automation.api.config.RuleConfigBean> getManualRulesForUser(ApplicationUser user, Issue issue) Retrieves all manual rules the provided user is allowed to see.- Parameters:
user- the logged in userissue- the issue to fetch manual rules for- Returns:
- list of rules
-
executeScheduled
Used to test scheduled rules in the admin section. Checks the user is a project admin. if project is null, it assumes global context and checks for Admin permission- Parameters:
logApplicationUser- the logged in userprojectId- project we're executing inruleId- the rule to execute- Returns:
- Errors when executing
-
executeRule
ErrorCollection executeRule(ApplicationUser loggedInUser, Long projectId, Long ruleId, String issueKey) Attempts to execute a rule with a manual trigger.The user needs to be able to browse to the issue and the rule has to exist.
- Parameters:
loggedInUser- the logged in userprojectId- project we're executing inruleId- the rule to executeissueKey- the key to execute against- Returns:
- Errors when executing
-
ruleModified
void ruleModified(com.codebarrel.automation.api.config.RuleConfigBean existingRule, com.codebarrel.automation.api.config.RuleConfigBean newRule) Notifies the service when a rule is edited. THis can be used to clear caches etc.- Parameters:
existingRule- The old rule config. May be null for deleted rules/created rulesnewRule- the new rule being updated
-