From c0d71f17e1ab2c060dc12519fe1f8045734f208b Mon Sep 17 00:00:00 2001 From: Pavel Bortnik Date: Tue, 27 Feb 2024 19:47:14 +0300 Subject: [PATCH] EPMRPP-89384 || Replace model lib with commons-reporting --- build.gradle | 4 ++-- .../reportportal/commons/ExceptionMappings.java | 2 +- .../exception/rest/ErrorResponseBuilder.java | 12 ++++++------ .../commons/exception/rest/RestError.java | 16 ++++++++-------- .../exception/rest/RestErrorDefinition.java | 2 +- .../exception/rest/StatusCodeMapping.java | 2 +- .../validation/AlwaysFailRuleValidator.java | 2 +- .../validation/ErrorTypeBasedRuleValidator.java | 2 +- .../exception/ReportPortalException.java | 2 +- .../ws/exception/rest/ExceptionHandlingTest.java | 2 +- .../ws/exception/rest/StatusCodeMappingTest.java | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index 52a1d82..27b86fc 100644 --- a/build.gradle +++ b/build.gradle @@ -39,9 +39,9 @@ dependencyManagement { dependencies { if (releaseMode) { - compile 'com.epam.reportportal:commons-model' + compile 'com.epam.reportportal:commons-reporting' } else { - compile 'com.github.reportportal:commons-model:83f012f' + implementation 'com.github.reportportal:commons-reporting:c324bab' } compile 'org.slf4j:slf4j-api' diff --git a/src/main/java/com/epam/ta/reportportal/commons/ExceptionMappings.java b/src/main/java/com/epam/ta/reportportal/commons/ExceptionMappings.java index faaebe1..51aa31d 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/ExceptionMappings.java +++ b/src/main/java/com/epam/ta/reportportal/commons/ExceptionMappings.java @@ -20,7 +20,7 @@ import com.epam.ta.reportportal.commons.exception.message.ExceptionMessageBuilder; import com.epam.ta.reportportal.commons.exception.rest.RestErrorDefinition; import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import com.google.common.collect.ImmutableMap; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.http.converter.HttpMessageNotReadableException; diff --git a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/ErrorResponseBuilder.java b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/ErrorResponseBuilder.java index 27f5632..0639695 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/ErrorResponseBuilder.java +++ b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/ErrorResponseBuilder.java @@ -12,18 +12,18 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - + */ + package com.epam.ta.reportportal.commons.exception.rest; -import com.epam.ta.reportportal.ws.model.ErrorRS; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorRS; +import com.epam.ta.reportportal.ws.reporting.ErrorType; /** * Error response builder - * + * * @author Andrei Varabyeu - * + * */ public class ErrorResponseBuilder { diff --git a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestError.java b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestError.java index af249aa..312938a 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestError.java +++ b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestError.java @@ -12,20 +12,20 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - + */ + package com.epam.ta.reportportal.commons.exception.rest; -import com.epam.ta.reportportal.ws.model.ErrorRS; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorRS; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import org.springframework.http.HttpStatus; /** * Rest Error representation. Contains rest error template and real exception * data - * + * * @author Andrei Varabyeu - * + * */ public class RestError { @@ -49,9 +49,9 @@ public HttpStatus getHttpStatus() { /** * Builder for Rest Error - * + * * @author Andrei Varabyeu - * + * */ public static class Builder { diff --git a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestErrorDefinition.java b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestErrorDefinition.java index 1b5bcd4..de0bdf4 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestErrorDefinition.java +++ b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/RestErrorDefinition.java @@ -17,7 +17,7 @@ package com.epam.ta.reportportal.commons.exception.rest; import com.epam.ta.reportportal.commons.exception.message.ExceptionMessageBuilder; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import org.springframework.http.HttpStatus; /** diff --git a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java index 384d8c5..333e8c7 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java +++ b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java @@ -16,7 +16,7 @@ package com.epam.ta.reportportal.commons.exception.rest; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import org.springframework.http.HttpStatus; import java.util.HashMap; diff --git a/src/main/java/com/epam/ta/reportportal/commons/validation/AlwaysFailRuleValidator.java b/src/main/java/com/epam/ta/reportportal/commons/validation/AlwaysFailRuleValidator.java index 1473686..f692e86 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/validation/AlwaysFailRuleValidator.java +++ b/src/main/java/com/epam/ta/reportportal/commons/validation/AlwaysFailRuleValidator.java @@ -17,7 +17,7 @@ package com.epam.ta.reportportal.commons.validation; import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; /** * Added for rules which is going to be always fail diff --git a/src/main/java/com/epam/ta/reportportal/commons/validation/ErrorTypeBasedRuleValidator.java b/src/main/java/com/epam/ta/reportportal/commons/validation/ErrorTypeBasedRuleValidator.java index 4f37051..5e5c25b 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/validation/ErrorTypeBasedRuleValidator.java +++ b/src/main/java/com/epam/ta/reportportal/commons/validation/ErrorTypeBasedRuleValidator.java @@ -17,8 +17,8 @@ package com.epam.ta.reportportal.commons.validation; import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import java.util.function.Predicate; public class ErrorTypeBasedRuleValidator extends RuleValidator { diff --git a/src/main/java/com/epam/ta/reportportal/exception/ReportPortalException.java b/src/main/java/com/epam/ta/reportportal/exception/ReportPortalException.java index 37daee8..56035e1 100644 --- a/src/main/java/com/epam/ta/reportportal/exception/ReportPortalException.java +++ b/src/main/java/com/epam/ta/reportportal/exception/ReportPortalException.java @@ -17,7 +17,7 @@ package com.epam.ta.reportportal.exception; import com.epam.ta.reportportal.commons.validation.Suppliers; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import static com.epam.ta.reportportal.commons.validation.Suppliers.trimMessage; diff --git a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java index a459cc1..0ef95bb 100644 --- a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java +++ b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java @@ -21,7 +21,7 @@ import com.epam.ta.reportportal.commons.exception.rest.ErrorResolver; import com.epam.ta.reportportal.commons.exception.rest.RestError; import com.epam.ta.reportportal.exception.ReportPortalException; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import com.google.common.base.Strings; import org.hamcrest.Matchers; import org.junit.Assert; diff --git a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/StatusCodeMappingTest.java b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/StatusCodeMappingTest.java index 49d7b4a..fa845ea 100644 --- a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/StatusCodeMappingTest.java +++ b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/StatusCodeMappingTest.java @@ -17,7 +17,7 @@ package com.epam.ta.reportportal.ws.exception.rest; import com.epam.ta.reportportal.commons.exception.rest.StatusCodeMapping; -import com.epam.ta.reportportal.ws.model.ErrorType; +import com.epam.ta.reportportal.ws.reporting.ErrorType; import org.junit.Assert; import org.junit.Test;