Class OutgoingWebhookValidationService
java.lang.Object
com.codebarrel.automation.rulecomponent.jira.service.webhook.OutgoingWebhookValidationService
The purpose of this service is to make outgoing webhook requests *outside* of any rule execution context.
This is required because we have a feature to validate (test) outgoing webhook configuration. To test the config,
we simply make the outgoing webhook request and present users with the response.
Because the outgoing webhook request is made outside of any rule execution context, support for smart value
substitution is limited. The substitution is limited to issue related smart values only. Users can specify the issue
to use when making the validation request.
-
Constructor Summary
ConstructorsConstructorDescriptionOutgoingWebhookValidationService(OutgoingWebhookActionValidator outgoingWebhookActionValidator, ClientFactory<JIRAClient> jiraClientFactory, SmartBeanFactory smartBeanFactory, IssueInputSubstitutionRenderer renderer, SandboxedHttpSender sandboxedHttpSender, I18nFactory i18nFactory, RuleSecretService secretService) -
Method Summary
Modifier and TypeMethodDescriptionvalidate(RemoteConnectUser remoteUser, TenantContext tenantContext, OutgoingWebhookValidationRequest validationRequest) Make the outgoing webhook request and perform required smart value substitutions.
-
Constructor Details
-
OutgoingWebhookValidationService
@Inject public OutgoingWebhookValidationService(OutgoingWebhookActionValidator outgoingWebhookActionValidator, ClientFactory<JIRAClient> jiraClientFactory, SmartBeanFactory smartBeanFactory, IssueInputSubstitutionRenderer renderer, SandboxedHttpSender sandboxedHttpSender, I18nFactory i18nFactory, RuleSecretService secretService)
-
-
Method Details
-
validate
public ServiceOutcome<OutgoingWebhookValidationResult> validate(RemoteConnectUser remoteUser, TenantContext tenantContext, OutgoingWebhookValidationRequest validationRequest) Make the outgoing webhook request and perform required smart value substitutions.- Parameters:
remoteUser- user requesting the validationtenantContext- tenant in which we're operating invalidationRequest- validation request containing outgoing webhook config and (optional) issue key to use for smart value substitution.- Returns:
- a service outcome containing the response object, which is made up of the request executed (with smart values substituted where applicable) and the webhook response.
-