Class ManualTriggerServiceImpl

java.lang.Object
com.codebarrel.jira.plugin.automation.service.ManualTriggerServiceImpl
All Implemented Interfaces:
ManualTriggerService

@Component public class ManualTriggerServiceImpl extends Object implements ManualTriggerService
  • Constructor Details

  • Method Details

    • getManualRulesForUser

      public List<com.codebarrel.automation.api.config.RuleConfigBean> getManualRulesForUser(ApplicationUser loggedInUser, Issue issue)
      Description copied from interface: ManualTriggerService
      Retrieves all manual rules the provided user is allowed to see.
      Specified by:
      getManualRulesForUser in interface ManualTriggerService
      Parameters:
      loggedInUser - the logged in user
      issue - the issue to fetch manual rules for
      Returns:
      list of rules
    • executeScheduled

      public ErrorCollection executeScheduled(ApplicationUser loggedInUser, Long projectId, Long ruleId)
      Description copied from interface: ManualTriggerService
      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
      Specified by:
      executeScheduled in interface ManualTriggerService
      Parameters:
      loggedInUser - the logged in user
      projectId - project we're executing in
      ruleId - the rule to execute
      Returns:
      Errors when executing
    • executeRule

      public ErrorCollection executeRule(ApplicationUser loggedInUser, Long projectId, Long ruleId, String issueKey)
      Description copied from interface: ManualTriggerService
      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.

      Specified by:
      executeRule in interface ManualTriggerService
      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

      public void ruleModified(com.codebarrel.automation.api.config.RuleConfigBean existingRule, com.codebarrel.automation.api.config.RuleConfigBean newRule)
      Description copied from interface: ManualTriggerService
      Notifies the service when a rule is edited. THis can be used to clear caches etc.
      Specified by:
      ruleModified in interface ManualTriggerService
      Parameters:
      existingRule - The old rule config. May be null for deleted rules/created rules
      newRule - the new rule being updated