Interface ManualTriggerService

All Known Implementing Classes:
ManualTriggerServiceImpl

public interface ManualTriggerService
Helper service to retrieve all manual triggers and execute manual triggers.
  • 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 user
      issue - the issue to fetch manual rules for
      Returns:
      list of rules
    • executeScheduled

      ErrorCollection executeScheduled(ApplicationUser logApplicationUser, Long projectId, Long ruleId)
      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 user
      projectId - project we're executing in
      ruleId - 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 user
      projectId - project we're executing in
      ruleId - the rule to execute
      issueKey - 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 rules
      newRule - the new rule being updated