Search in sources :

Example 1 with IssueSearchResponseModel

use of com.synopsys.integration.jira.common.server.model.IssueSearchResponseModel in project hub-alert by blackducksoftware.

the class JiraServerGlobalTestActionWrapper method canUserGetIssues.

public boolean canUserGetIssues() throws IntegrationException {
    IssueSearchService issueSearchService = jiraServerServiceFactory.createIssueSearchService();
    IssueSearchResponseModel issueSearchResponseModel = issueSearchService.queryForIssuePage("", 0, 1);
    return !issueSearchResponseModel.getIssues().isEmpty();
}
Also used : IssueSearchService(com.synopsys.integration.jira.common.server.service.IssueSearchService) IssueSearchResponseModel(com.synopsys.integration.jira.common.server.model.IssueSearchResponseModel)

Example 2 with IssueSearchResponseModel

use of com.synopsys.integration.jira.common.server.model.IssueSearchResponseModel in project hub-alert by blackducksoftware.

the class JiraServerGlobalFieldModelTestAction method canUserGetIssues.

@Override
protected boolean canUserGetIssues(FieldUtility fieldUtility) throws IntegrationException {
    JiraServerProperties jiraProperties = createJiraProperties(fieldUtility);
    JiraServerServiceFactory jiraServerServiceFactory = jiraProperties.createJiraServicesServerFactory(logger, gson);
    IssueSearchService issueSearchService = jiraServerServiceFactory.createIssueSearchService();
    IssueSearchResponseModel issueSearchResponseModel = issueSearchService.queryForIssuePage("", 0, 1);
    return issueSearchResponseModel.getIssues().size() > 0;
}
Also used : JiraServerServiceFactory(com.synopsys.integration.jira.common.server.service.JiraServerServiceFactory) IssueSearchService(com.synopsys.integration.jira.common.server.service.IssueSearchService) IssueSearchResponseModel(com.synopsys.integration.jira.common.server.model.IssueSearchResponseModel) JiraServerProperties(com.synopsys.integration.alert.channel.jira.server.JiraServerProperties)

Aggregations

IssueSearchResponseModel (com.synopsys.integration.jira.common.server.model.IssueSearchResponseModel)2 IssueSearchService (com.synopsys.integration.jira.common.server.service.IssueSearchService)2 JiraServerProperties (com.synopsys.integration.alert.channel.jira.server.JiraServerProperties)1 JiraServerServiceFactory (com.synopsys.integration.jira.common.server.service.JiraServerServiceFactory)1