use of com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory in project hub-alert by blackducksoftware.
the class JiraCloudPropertiesTest method testServerServiceFactory.
@Test
public void testServerServiceFactory() {
try {
JiraCloudProperties properties = new JiraCloudProperties("http://localhost:2990", "token", "user", false, ProxyInfo.NO_PROXY_INFO);
JiraCloudServiceFactory serviceFactory = properties.createJiraServicesCloudFactory(LoggerFactory.getLogger(getClass()), new Gson());
assertNotNull(serviceFactory);
} catch (IssueTrackerException ex) {
ex.printStackTrace();
fail();
}
}
use of com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory in project hub-alert by blackducksoftware.
the class JiraCloudProperties method createJiraServicesCloudFactory.
public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException {
JiraCloudRestConfig jiraServerConfig = createJiraServerConfig();
Slf4jIntLogger intLogger = new Slf4jIntLogger(logger);
JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogger);
return new JiraCloudServiceFactory(intLogger, jiraHttpClient, gson);
}
use of com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory 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