Search in sources :

Example 6 with JiraCloudProperties

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);
}
Also used : IssueService(com.synopsys.integration.jira.common.cloud.service.IssueService) FieldService(com.synopsys.integration.jira.common.cloud.service.FieldService) JiraCustomFieldResolver(com.synopsys.integration.alert.api.channel.jira.distribution.custom.JiraCustomFieldResolver) JiraErrorMessageUtility(com.synopsys.integration.alert.api.channel.jira.distribution.JiraErrorMessageUtility) JiraIssueCreationRequestCreator(com.synopsys.integration.alert.api.channel.jira.distribution.JiraIssueCreationRequestCreator) JiraCloudServiceFactory(com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory) IssuePropertyService(com.synopsys.integration.jira.common.rest.service.IssuePropertyService) JiraCloudProperties(com.synopsys.integration.alert.channel.jira.cloud.JiraCloudProperties) ProjectService(com.synopsys.integration.jira.common.cloud.service.ProjectService) JiraIssueAlertPropertiesManager(com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraIssueAlertPropertiesManager)

Aggregations

JiraCloudProperties (com.synopsys.integration.alert.channel.jira.cloud.JiraCloudProperties)6 JiraCloudServiceFactory (com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory)6 JiraErrorMessageUtility (com.synopsys.integration.alert.api.channel.jira.distribution.JiraErrorMessageUtility)2 JiraIssueCreationRequestCreator (com.synopsys.integration.alert.api.channel.jira.distribution.JiraIssueCreationRequestCreator)2 JiraCustomFieldResolver (com.synopsys.integration.alert.api.channel.jira.distribution.custom.JiraCustomFieldResolver)2 JiraIssueAlertPropertiesManager (com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraIssueAlertPropertiesManager)2 FieldService (com.synopsys.integration.jira.common.cloud.service.FieldService)2 IssueSearchService (com.synopsys.integration.jira.common.cloud.service.IssueSearchService)2 IssueService (com.synopsys.integration.jira.common.cloud.service.IssueService)2 ProjectService (com.synopsys.integration.jira.common.cloud.service.ProjectService)2 IssuePropertyService (com.synopsys.integration.jira.common.rest.service.IssuePropertyService)2 PluginManagerService (com.synopsys.integration.jira.common.rest.service.PluginManagerService)2 IssueTrackerModelExtractor (com.synopsys.integration.alert.api.channel.issue.IssueTrackerModelExtractor)1 IssueTrackerProcessor (com.synopsys.integration.alert.api.channel.issue.IssueTrackerProcessor)1 JiraIssueStatusCreator (com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraIssueStatusCreator)1 JiraSearcherFactory (com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraSearcherFactory)1 ActionResponse (com.synopsys.integration.alert.common.action.ActionResponse)1 IntegrationException (com.synopsys.integration.exception.IntegrationException)1 IssueSearchResponseModel (com.synopsys.integration.jira.common.cloud.model.IssueSearchResponseModel)1 MyPermissionsService (com.synopsys.integration.jira.common.cloud.service.MyPermissionsService)1