Class AutomationRuleManagementServiceImpl
java.lang.Object
com.codebarrel.jira.plugin.automation.service.AutomationRuleManagementServiceImpl
- All Implemented Interfaces:
AutomationRuleManagementService
@Component
public class AutomationRuleManagementServiceImpl
extends Object
implements AutomationRuleManagementService
Default
AutomationRuleManagementService implementation.
Replicates the admin checks performed by RuleResource:
- Jira global admin: may manage any rule.
- A4J project admin: may manage a rule restricted to a single project they administer.
- Otherwise: throws
RuleManagementForbiddenException.
Always operates against NativeTenant.GLOBAL_TENANT
since Jira DC is single-tenant.
- Since:
- v10.3
-
Constructor Summary
ConstructorsConstructorDescriptionAutomationRuleManagementServiceImpl(AutomationConfigService configService, GlobalPermissionManager globalPermissionManager, AutomationPermissionService automationPermissionService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteRule(ApplicationUser initiator, long ruleId) Permanently delete the rule with the given ID.voiddisableRule(ApplicationUser initiator, long ruleId, String reason) Disable the rule with the given ID.
-
Constructor Details
-
AutomationRuleManagementServiceImpl
@Inject public AutomationRuleManagementServiceImpl(AutomationConfigService configService, GlobalPermissionManager globalPermissionManager, AutomationPermissionService automationPermissionService)
-
-
Method Details
-
disableRule
Description copied from interface:AutomationRuleManagementServiceDisable the rule with the given ID.- Specified by:
disableRulein interfaceAutomationRuleManagementService- Parameters:
initiator- the user performing the operationruleId- the A4J rule IDreason- optional reason recorded in the audit log
-
deleteRule
Description copied from interface:AutomationRuleManagementServicePermanently delete the rule with the given ID.- Specified by:
deleteRulein interfaceAutomationRuleManagementService- Parameters:
initiator- the user performing the operationruleId- the A4J rule ID
-