use of com.synopsys.integration.alert.channel.jira.cloud.JiraCloudProperties in project hub-alert by blackducksoftware.
the class JiraCloudMessageSenderFactory method createMessageSender.
@Override
public IssueTrackerMessageSender<String> createMessageSender(JiraCloudJobDetailsModel distributionDetails) throws AlertException {
JiraCloudProperties jiraCloudProperties = jiraCloudPropertiesFactory.createJiraProperties();
JiraCloudServiceFactory jiraCloudServiceFactory = jiraCloudProperties.createJiraServicesCloudFactory(logger, gson);
// Jira Services
IssueService issueService = jiraCloudServiceFactory.createIssueService();
IssuePropertyService issuePropertyService = jiraCloudServiceFactory.createIssuePropertyService();
// Common Helpers
JiraIssueAlertPropertiesManager issuePropertiesManager = new JiraIssueAlertPropertiesManager(gson, issuePropertyService);
ProjectService projectService = jiraCloudServiceFactory.createProjectService();
FieldService fieldService = jiraCloudServiceFactory.createFieldService();
JiraCustomFieldResolver customFieldResolver = new JiraCustomFieldResolver(fieldService::getUserVisibleFields);
JiraIssueCreationRequestCreator issueCreationRequestCreator = new JiraIssueCreationRequestCreator(customFieldResolver);
JiraErrorMessageUtility jiraErrorMessageUtility = new JiraErrorMessageUtility(gson, customFieldResolver);
return createMessageSender(issueService, distributionDetails, projectService, issueCreationRequestCreator, issuePropertiesManager, jiraErrorMessageUtility);
}
Aggregations