diff --git a/build.gradle b/build.gradle index 4282594..5ad035a 100644 --- a/build.gradle +++ b/build.gradle @@ -32,11 +32,13 @@ dependencyManagement { dependencies { if (releaseMode) { + implementation 'com.epam.reportportal:commons-dao' implementation 'com.epam.reportportal:plugin-api' annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:plugin-api:cc3c5c8e' - annotationProcessor 'com.github.reportportal:plugin-api:cc3c5c8e' + implementation 'com.github.reportportal:commons-dao:fa04c1f' + implementation 'com.github.reportportal:plugin-api:20ab960' + annotationProcessor 'com.github.reportportal:plugin-api:20ab960' } compile 'com.squareup.okhttp:okhttp:2.7.5' diff --git a/src/main/java/com/epam/reportportal/extension/azure/AzureExtension.java b/src/main/java/com/epam/reportportal/extension/azure/AzureExtension.java index 7cc6b5e..089445c 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/AzureExtension.java +++ b/src/main/java/com/epam/reportportal/extension/azure/AzureExtension.java @@ -1,7 +1,7 @@ package com.epam.reportportal.extension.azure; -import static com.epam.ta.reportportal.ws.reporting.ErrorType.UNABLE_INTERACT_WITH_INTEGRATION; -import static com.epam.ta.reportportal.ws.reporting.ErrorType.UNABLE_TO_LOAD_BINARY_DATA; +import static com.epam.reportportal.rules.exception.ErrorType.UNABLE_INTERACT_WITH_INTEGRATION; +import static com.epam.reportportal.rules.exception.ErrorType.UNABLE_TO_LOAD_BINARY_DATA; import static java.util.Optional.ofNullable; import com.epam.reportportal.extension.CommonPluginCommand; @@ -39,6 +39,12 @@ import com.epam.reportportal.extension.common.IntegrationTypeProperties; import com.epam.reportportal.extension.event.PluginEvent; import com.epam.reportportal.extension.event.StartLaunchEvent; +import com.epam.reportportal.model.externalsystem.AllowedValue; +import com.epam.reportportal.model.externalsystem.PostFormField; +import com.epam.reportportal.model.externalsystem.PostTicketRQ; +import com.epam.reportportal.model.externalsystem.Ticket; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.epam.ta.reportportal.binary.impl.AttachmentDataStoreService; import com.epam.ta.reportportal.dao.IntegrationRepository; import com.epam.ta.reportportal.dao.IntegrationTypeRepository; @@ -49,13 +55,7 @@ import com.epam.ta.reportportal.entity.integration.Integration; import com.epam.ta.reportportal.entity.item.TestItem; import com.epam.ta.reportportal.entity.log.Log; -import com.epam.ta.reportportal.exception.ReportPortalException; import com.epam.ta.reportportal.filesystem.DataEncoder; -import com.epam.ta.reportportal.ws.model.externalsystem.AllowedValue; -import com.epam.ta.reportportal.ws.model.externalsystem.PostFormField; -import com.epam.ta.reportportal.ws.model.externalsystem.PostTicketRQ; -import com.epam.ta.reportportal.ws.model.externalsystem.Ticket; -import com.epam.ta.reportportal.ws.reporting.ErrorType; import com.google.common.base.Suppliers; import com.google.common.io.ByteStreams; import java.io.IOException; diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/connection/TestConnectionCommand.java b/src/main/java/com/epam/reportportal/extension/azure/command/connection/TestConnectionCommand.java index fb52ca5..659c882 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/connection/TestConnectionCommand.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/connection/TestConnectionCommand.java @@ -2,7 +2,7 @@ import static com.epam.reportportal.extension.azure.AzureExtension.PROJECT; import static com.epam.reportportal.extension.azure.AzureExtension.URL; -import static com.epam.ta.reportportal.ws.reporting.ErrorType.UNABLE_INTERACT_WITH_INTEGRATION; +import static com.epam.reportportal.rules.exception.ErrorType.UNABLE_INTERACT_WITH_INTEGRATION; import com.epam.reportportal.extension.PluginCommand; import com.epam.reportportal.extension.azure.rest.client.ApiClient; @@ -13,8 +13,8 @@ import com.epam.reportportal.extension.azure.rest.client.auth.HttpBasicAuth; import com.epam.reportportal.extension.azure.rest.client.model.TeamProject; import com.epam.reportportal.extension.bugtracking.BtsConstants; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.epam.ta.reportportal.entity.integration.Integration; -import com.epam.ta.reportportal.exception.ReportPortalException; import java.util.Map; import org.jasypt.util.text.BasicTextEncryptor; import org.slf4j.Logger; diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectManagerCommand.java b/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectManagerCommand.java index 13d6d6b..18af560 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectManagerCommand.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectManagerCommand.java @@ -2,13 +2,13 @@ import static java.util.Optional.ofNullable; +import com.epam.reportportal.rules.commons.validation.BusinessRule; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.epam.ta.reportportal.commons.ReportPortalUser; -import com.epam.ta.reportportal.commons.validation.BusinessRule; import com.epam.ta.reportportal.dao.ProjectRepository; import com.epam.ta.reportportal.entity.project.Project; import com.epam.ta.reportportal.entity.project.ProjectRole; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; /** * @author Ivan Budayeu diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectMemberCommand.java b/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectMemberCommand.java index 328a9cf..8fee72a 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectMemberCommand.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/role/ProjectMemberCommand.java @@ -4,12 +4,12 @@ import static com.epam.reportportal.extension.azure.command.utils.CommandParamUtils.retrieveLong; import static java.util.Optional.ofNullable; +import com.epam.reportportal.rules.commons.validation.BusinessRule; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.epam.ta.reportportal.commons.ReportPortalUser; -import com.epam.ta.reportportal.commons.validation.BusinessRule; import com.epam.ta.reportportal.dao.ProjectRepository; import com.epam.ta.reportportal.entity.project.Project; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; import java.util.Map; import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/utils/CommandParamUtils.java b/src/main/java/com/epam/reportportal/extension/azure/command/utils/CommandParamUtils.java index 09b062b..06f2a2d 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/utils/CommandParamUtils.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/utils/CommandParamUtils.java @@ -2,9 +2,9 @@ import static java.util.Optional.ofNullable; -import com.epam.ta.reportportal.commons.validation.Suppliers; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; +import com.epam.reportportal.rules.commons.validation.Suppliers; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import java.util.Iterator; import java.util.Map; import java.util.Set; diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityConverter.java b/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityConverter.java index 7b7b2ed..c446eb3 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityConverter.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityConverter.java @@ -2,9 +2,9 @@ import static java.util.Optional.ofNullable; -import com.epam.ta.reportportal.commons.validation.Suppliers; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; +import com.epam.reportportal.rules.commons.validation.Suppliers; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Map; diff --git a/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityValidator.java b/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityValidator.java index bd25d71..6edfd6e 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityValidator.java +++ b/src/main/java/com/epam/reportportal/extension/azure/command/utils/RequestEntityValidator.java @@ -1,7 +1,7 @@ package com.epam.reportportal.extension.azure.command.utils; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import java.util.List; import java.util.stream.Collectors; import javax.validation.Validation; diff --git a/src/main/java/com/epam/reportportal/extension/azure/info/impl/PluginInfoProviderImpl.java b/src/main/java/com/epam/reportportal/extension/azure/info/impl/PluginInfoProviderImpl.java index a00dbbe..1762a3f 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/info/impl/PluginInfoProviderImpl.java +++ b/src/main/java/com/epam/reportportal/extension/azure/info/impl/PluginInfoProviderImpl.java @@ -3,9 +3,9 @@ import static java.util.Optional.ofNullable; import com.epam.reportportal.extension.azure.info.PluginInfoProvider; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.epam.ta.reportportal.entity.integration.IntegrationType; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; diff --git a/src/main/java/com/epam/reportportal/extension/azure/service/utils/JsonbConverter.java b/src/main/java/com/epam/reportportal/extension/azure/service/utils/JsonbConverter.java index 35292b4..95e35e4 100644 --- a/src/main/java/com/epam/reportportal/extension/azure/service/utils/JsonbConverter.java +++ b/src/main/java/com/epam/reportportal/extension/azure/service/utils/JsonbConverter.java @@ -1,7 +1,7 @@ package com.epam.reportportal.extension.azure.service.utils; -import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.reporting.ErrorType; +import com.epam.reportportal.rules.exception.ErrorType; +import com.epam.reportportal.rules.exception.ReportPortalException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.jooq.JSONB; diff --git a/src/test/java/com/epam/reportportal/extension/azure/AzureExtensionTest.java b/src/test/java/com/epam/reportportal/extension/azure/AzureExtensionTest.java index bcee68b..4f8d02f 100644 --- a/src/test/java/com/epam/reportportal/extension/azure/AzureExtensionTest.java +++ b/src/test/java/com/epam/reportportal/extension/azure/AzureExtensionTest.java @@ -6,6 +6,10 @@ import com.epam.reportportal.extension.azure.rest.client.ApiException; import com.epam.reportportal.extension.azure.rest.client.api.*; import com.epam.reportportal.extension.azure.rest.client.model.workitem.*; +import com.epam.reportportal.model.externalsystem.AllowedValue; +import com.epam.reportportal.model.externalsystem.PostFormField; +import com.epam.reportportal.model.externalsystem.PostTicketRQ; +import com.epam.reportportal.model.externalsystem.Ticket; import com.epam.ta.reportportal.binary.impl.AttachmentDataStoreService; import com.epam.ta.reportportal.dao.*; import com.epam.ta.reportportal.entity.integration.Integration; @@ -16,10 +20,6 @@ import com.epam.ta.reportportal.entity.item.issue.IssueEntity; import com.epam.ta.reportportal.entity.project.Project; import com.epam.ta.reportportal.filesystem.DataEncoder; -import com.epam.ta.reportportal.ws.model.externalsystem.AllowedValue; -import com.epam.ta.reportportal.ws.model.externalsystem.PostFormField; -import com.epam.ta.reportportal.ws.model.externalsystem.PostTicketRQ; -import com.epam.ta.reportportal.ws.model.externalsystem.Ticket; import org.jasypt.util.text.BasicTextEncryptor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;