From 90f4353c3e7cd71d5a7932b278c4737a9f5a1a37 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Wed, 6 Sep 2023 15:34:09 +0300 Subject: [PATCH 01/19] EPMRPP-86199 || Add common not found error --- .../ta/reportportal/ws/model/ErrorType.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java index c6f9000a..c52c1f64 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java @@ -24,24 +24,24 @@ public enum ErrorType { /** - * Access Denied + * Incorrect Report Portal WS Request */ - ADDRESS_LOCKED(4004, "Address is locked due to several incorrect login attempts"), + INCORRECT_REQUEST(4001, "Incorrect Request. {}"), /** - * Access Denied + * Incorrect Report Portal WS Request */ - ACCESS_DENIED(4003, "You do not have enough permissions. {}"), + BINARY_DATA_CANNOT_BE_SAVED(4002, "Binary data cannot be saved. {}"), /** - * Incorrect Report Portal WS Request + * Access Denied */ - INCORRECT_REQUEST(4001, "Incorrect Request. {}"), + ACCESS_DENIED(4003, "You do not have enough permissions. {}"), /** - * Incorrect Report Portal WS Request + * Access Denied */ - BINARY_DATA_CANNOT_BE_SAVED(4002, "Binary data cannot be saved. {}"), + ADDRESS_LOCKED(4004, "Address is locked due to several incorrect login attempts"), /** * If specified by id Project or by ProjectName not found @@ -189,6 +189,8 @@ public enum ErrorType { */ CLUSTER_NOT_FOUND(40428, "Cluster '{}' not found"), + NOT_FOUND(40430, "'{}' not found. Did you use correct ID?"), + /** * If provided filtering parameters are incorrect */ From c94a39116f8dcc1fe069562472b8f14749665120 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Wed, 6 Sep 2023 15:48:59 +0300 Subject: [PATCH 02/19] EPMRPP-86199 || Add common not found error --- src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java index c52c1f64..09d024d5 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java @@ -189,6 +189,9 @@ public enum ErrorType { */ CLUSTER_NOT_FOUND(40428, "Cluster '{}' not found"), + /** + * Common error in case if object not found + */ NOT_FOUND(40430, "'{}' not found. Did you use correct ID?"), /** From c86571e09e4cfde5f8a6f82b66ab22c1cef5089a Mon Sep 17 00:00:00 2001 From: APiankouski <109206864+APiankouski@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:09:51 +0300 Subject: [PATCH 03/19] Add common not found Error (#352) * EPMRPP-86199 || Add common not found error * EPMRPP-86199 || Add common not found error --- .../ta/reportportal/ws/model/ErrorType.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java index c6f9000a..09d024d5 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java @@ -24,24 +24,24 @@ public enum ErrorType { /** - * Access Denied + * Incorrect Report Portal WS Request */ - ADDRESS_LOCKED(4004, "Address is locked due to several incorrect login attempts"), + INCORRECT_REQUEST(4001, "Incorrect Request. {}"), /** - * Access Denied + * Incorrect Report Portal WS Request */ - ACCESS_DENIED(4003, "You do not have enough permissions. {}"), + BINARY_DATA_CANNOT_BE_SAVED(4002, "Binary data cannot be saved. {}"), /** - * Incorrect Report Portal WS Request + * Access Denied */ - INCORRECT_REQUEST(4001, "Incorrect Request. {}"), + ACCESS_DENIED(4003, "You do not have enough permissions. {}"), /** - * Incorrect Report Portal WS Request + * Access Denied */ - BINARY_DATA_CANNOT_BE_SAVED(4002, "Binary data cannot be saved. {}"), + ADDRESS_LOCKED(4004, "Address is locked due to several incorrect login attempts"), /** * If specified by id Project or by ProjectName not found @@ -189,6 +189,11 @@ public enum ErrorType { */ CLUSTER_NOT_FOUND(40428, "Cluster '{}' not found"), + /** + * Common error in case if object not found + */ + NOT_FOUND(40430, "'{}' not found. Did you use correct ID?"), + /** * If provided filtering parameters are incorrect */ From e9c131fa1b10f171dea69886e06c956abb2b2c6f Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 7 Apr 2022 12:36:45 +0300 Subject: [PATCH 04/19] EPMRPP-86221 || Fix missed fields --- .../ws/model/ValidationConstraints.java | 1 + .../ws/model/project/email/SenderCaseDTO.java | 30 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ValidationConstraints.java b/src/main/java/com/epam/ta/reportportal/ws/model/ValidationConstraints.java index f77b7dba..bc8d871c 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ValidationConstraints.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/ValidationConstraints.java @@ -25,6 +25,7 @@ public class ValidationConstraints { /* 1 always exists as predefined type */ + public static final int MAX_ISSUE_TYPES_AND_SUBTYPES = 75; public static final int MAX_ISSUE_SUBTYPES = 15; public static final int MIN_COLLECTION_SIZE = 1; public static final int MAX_NUMBER_OF_FILTER_ENTITIES = 20; diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java index 557fff7b..ddc3b423 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java @@ -44,6 +44,13 @@ public class SenderCaseDTO implements Serializable { */ private static final long serialVersionUID = -3546546654348861010L; + @JsonProperty("id") + private Long id; + + @NotEmpty + @JsonProperty("ruleName") + private String ruleName; + @NotEmpty @NotBlankStringCollection @JsonProperty(value = "recipients") @@ -75,17 +82,34 @@ public class SenderCaseDTO implements Serializable { public SenderCaseDTO() { } - public SenderCaseDTO(List recs, String sendMode, List laNames, Set attributes, boolean enabled, - String attributesOperator) { + public SenderCaseDTO(Long id, String ruleName, List recs, String sendMode, + List laNames, Set attributes, boolean enabled) { + this.id = id; + this.ruleName = ruleName; this.recipients = recs; this.sendCase = sendMode; this.launchNames = laNames; this.attributes = attributes; this.enabled = enabled; - this.attributesOperator = attributesOperator; } /* Getters and setters block */ + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + public void setRecipients(List recipients) { this.recipients = recipients; } From 07815af774c8c24faef00cc53043ecdeb08a39fe Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Fri, 29 Sep 2023 09:10:13 +0300 Subject: [PATCH 05/19] EPMRPP-86250 || Update Analyzer settings. Provide the base for analysis: Current launch and Current launch+previous --- .../epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java | 4 ++-- .../epam/ta/reportportal/ws/model/project/AnalyzerConfig.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java index 3a476771..63a86b94 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java @@ -37,8 +37,8 @@ public class AnalyzeLaunchRQ { @NotNull @JsonProperty(value = "analyzerMode", required = true) - @In(allowedValues = { "all", "launch_name", "current_launch" }) - @ApiModelProperty(allowableValues = "ALL, LAUNCH_NAME, CURRENT_LAUNCH") + @In(allowedValues = { "all", "launch_name", "current_launch", "previous_launch", "current_and_the_same_name" }) + @ApiModelProperty(allowableValues = "ALL, LAUNCH_NAME, CURRENT_LAUNCH, PREVIOUS_LAUNCH, CURRENT_AND_THE_SAME_NAME") private String analyzerHistoryMode; @NotNull diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/AnalyzerConfig.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/AnalyzerConfig.java index 804935ec..4f1314ac 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/AnalyzerConfig.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/project/AnalyzerConfig.java @@ -51,8 +51,8 @@ public class AnalyzerConfig { private Boolean isAutoAnalyzerEnabled; @JsonProperty(value = "analyzerMode") - @In(allowedValues = { "all", "launch_name", "current_launch" }) - @ApiModelProperty(allowableValues = "ALL, LAUNCH_NAME") + @In(allowedValues = { "all", "launch_name", "current_launch", "previous_launch", "current_and_the_same_name" }) + @ApiModelProperty(allowableValues = "ALL, LAUNCH_NAME, CURRENT_LAUNCH, PREVIOUS_LAUNCH, CURRENT_AND_THE_SAME_NAME") private String analyzerMode; @JsonProperty(value = "indexingRunning") From b866410d92c1e6c5851ad029a055c8b3ae8f4e82 Mon Sep 17 00:00:00 2001 From: Siarhei Hrabko <45555481+grabsefx@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:32:00 +0300 Subject: [PATCH 06/19] EPMRPP-86742 add lombok support (#355) EPMRPP-86742 extended response for launch import --- build.gradle | 5 ++ gradle.properties | 1 + .../ws/model/LaunchImportCompletionRS.java | 41 ++++++++++++++++ .../ws/model/LaunchImportData.java | 47 +++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java diff --git a/build.gradle b/build.gradle index e5c47b44..fe597305 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,11 @@ dependencies { compile "org.apache.commons:commons-lang3:${commonsLangVersion}" compile group: 'com.google.guava', name: 'guava', version: '28.2-jre' + // add lombok support + compileOnly "org.projectlombok:lombok:${lombokVersion}" + annotationProcessor "org.projectlombok:lombok:${lombokVersion}" + testCompileOnly "org.projectlombok:lombok:${lombokVersion}" + testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}" testImplementation "junit:junit:${junitVersion}" testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunitJupiter}" diff --git a/gradle.properties b/gradle.properties index d6e64955..54f4a148 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,3 +8,4 @@ swaggerAnnotationsVersion=1.6.0 commonsLangVersion=3.9 mockitoJunitJupiter=2.23.0 jacksonVersion=2.10.2 +lombokVersion=1.18.30 diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java new file mode 100644 index 00000000..022184a2 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * Operation completion response for launch import. + * + * @author Siarhei Hrabko + */ +@Getter +@Setter +@ToString +@AllArgsConstructor +@NoArgsConstructor +public class LaunchImportCompletionRS extends OperationCompletionRS { + + @JsonProperty(value = "data") + private LaunchImportData data; + +} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java new file mode 100644 index 00000000..dcc18b77 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * Operation completion response extension for launch import. + * + * @author Siarhei Hrabko + */ +@Getter +@Setter +@ToString +@AllArgsConstructor +@NoArgsConstructor +public class LaunchImportData { + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("number") + private Long number; + +} From 2cdb3e2619c5dce50b91fa55cd32e952307a9a2d Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Wed, 25 Oct 2023 19:42:03 +0300 Subject: [PATCH 07/19] EPMRPP-86743 || Add new launch import rq (#356) * EPMRPP-86743 || Add new launch import rq * EPMRPP-86743 || Remove start time constraint * EPMRPP-86743 || Add author --- .../ws/model/launch/LaunchImportRQ.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java new file mode 100644 index 00000000..8259b365 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model.launch; + +import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; + +import com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import java.util.Set; +import javax.validation.Valid; +import javax.validation.constraints.Size; +import lombok.Data; + +/** + * @author Pavel Bortnik + */ +@Data +public class LaunchImportRQ { + + @JsonProperty(value = "name") + @ApiModelProperty + protected String name; + + @JsonProperty(value = "description") + private String description; + + @Size(max = MAX_PARAMETERS_LENGTH) + @Valid + @JsonProperty("attributes") + @JsonAlias({"attributes", "tags"}) + private Set attributes; + + @JsonProperty + @JsonAlias({"startTime", "start_time"}) + @ApiModelProperty + private Date startTime; + + @JsonProperty("mode") + private Mode mode; +} From 67c5f505b8d5dfe79004fad25ca199de78b37e94 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Thu, 2 Nov 2023 13:36:30 +0300 Subject: [PATCH 08/19] EPMRPP-87332 || Send launchNumber to analyzer --- .../reportportal/ws/model/analyzer/IndexLaunch.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java index 03648990..d0f4f9d3 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java @@ -53,6 +53,9 @@ public class IndexLaunch { @JsonProperty("clusters") private Map clusters; + @JsonProperty("launchNumber") + private Long launchNumber; + public IndexLaunch() { } @@ -111,4 +114,12 @@ public Map getClusters() { public void setClusters(Map clusters) { this.clusters = clusters; } + + public Long getLaunchNumber() { + return launchNumber; + } + + public void setLaunchNumber(Long launchNumber) { + this.launchNumber = launchNumber; + } } From 55ec35635b3c98b5224a79bd160849d4243d3943 Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Fri, 10 Nov 2023 10:25:43 +0300 Subject: [PATCH 09/19] EPMRPP-87316 || Update PostFromField model (#358) * EPMRPP-87316 || Update post form fields * EPMRPP-87316 || Add command name to PostFormField * EPMRPP-87316 || Add command name to PostFormField * EPMRPP-87316 || Update named value object --- .../ws/model/externalsystem/NamedValue.java | 16 + .../model/externalsystem/PostFormField.java | 344 ++++++++++-------- 2 files changed, 213 insertions(+), 147 deletions(-) create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/NamedValue.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/NamedValue.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/NamedValue.java new file mode 100644 index 00000000..c79dd5d0 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/NamedValue.java @@ -0,0 +1,16 @@ +package com.epam.ta.reportportal.ws.model.externalsystem; + +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Represents value that consists of id for making request and human readable name + */ +@Data +@NoArgsConstructor +public class NamedValue implements Serializable { + + private Long id; + private String name; +} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java index 0ca97c82..2f7cedf7 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java @@ -12,166 +12,216 @@ * 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.ws.model.externalsystem; -import java.io.Serializable; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; /** * Basic representation of single post ticket form field
- * + *

* NOTE: representation based on JIRA post ticket form - * + * * @author Andrei_Ramanchuk */ @JsonInclude(Include.NON_NULL) public class PostFormField implements Comparable, Serializable { - /** - * Field name on JIRA form - */ - @JsonProperty(value = "fieldName") - private String fieldName; - - /** - * Field ID for post ticket request in JIRA - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Field type for UI representation for user - */ - @JsonProperty(value = "fieldType") - private String fieldType; - - /** - * Is field required for ticket post - */ - @JsonProperty(value = "required", required = true) - private boolean isRequired; - - /** - * Field value(s) - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Values for fields with pre-defined set - */ - @JsonProperty(value = "definedValues") - private List definedValues; - - public PostFormField() { - } - - public PostFormField(String id, String name, String type, boolean isReq, List values, List defValues) { - this.id = id; - this.fieldName = name; - this.fieldType = type; - this.isRequired = isReq; - this.value = values; - this.definedValues = defValues; - } - - public void setFieldName(String name) { - this.fieldName = name; - } - - public String getFieldName() { - return fieldName; - } - - public void setId(String value) { - this.id = value; - } - - public String getId() { - return id; - } - - public void setFieldType(String type) { - this.fieldType = type; - } - - public String getFieldType() { - return fieldType; - } - - public void setIsRequired(boolean value) { - this.isRequired = value; - } - - public boolean getIsRequired() { - return isRequired; - } - - public void setValue(List value) { - this.value = value; - } - - public List getValue() { - return value; - } - - public List getDefinedValues() { - return definedValues; - } - - public void setDefinedValues(List values) { - this.definedValues = values; - } - - @Override - public String toString() { - return "PostFormField{" + "fieldName='" + fieldName + '\'' + ", id='" + id + '\'' + ", fieldType='" + fieldType + '\'' - + ", isRequired=" + isRequired + ", value=" + value + ", definedValues=" + definedValues + '}'; - } - - @Override - public int compareTo(PostFormField field) { - Boolean current = this.isRequired; - Boolean byField = field.isRequired; - return byField.compareTo(current); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (o == null || getClass() != o.getClass()) - return false; - - PostFormField that = (PostFormField) o; - - if (isRequired != that.isRequired) - return false; - if (fieldName != null ? !fieldName.equals(that.fieldName) : that.fieldName != null) - return false; - if (id != null ? !id.equals(that.id) : that.id != null) - return false; - if (fieldType != null ? !fieldType.equals(that.fieldType) : that.fieldType != null) - return false; - if (value != null ? !value.equals(that.value) : that.value != null) - return false; - return definedValues != null ? definedValues.equals(that.definedValues) : that.definedValues == null; - } - - @Override - public int hashCode() { - int result = fieldName != null ? fieldName.hashCode() : 0; - result = 31 * result + (id != null ? id.hashCode() : 0); - result = 31 * result + (fieldType != null ? fieldType.hashCode() : 0); - result = 31 * result + (isRequired ? 1 : 0); - result = 31 * result + (value != null ? value.hashCode() : 0); - result = 31 * result + (definedValues != null ? definedValues.hashCode() : 0); - return result; - } + /** + * Field name on JIRA form + */ + @JsonProperty(value = "fieldName") + private String fieldName; + + /** + * Field ID for post ticket request in JIRA + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Field type for UI representation for user + */ + @JsonProperty(value = "fieldType") + private String fieldType; + + /** + * Is field required for ticket post + */ + @JsonProperty(value = "required", required = true) + private boolean isRequired; + + /** + * Field value(s) + */ + @JsonProperty(value = "value") + private List value; + + /** + * id - name representation of value + */ + @JsonProperty(value = "namedValue") + private List namedValue; + + /** + * Command name that can be executed in plugin for current field + */ + @JsonProperty(value = "commandName") + private String commandName; + + /** + * Values for fields with pre-defined set + */ + @JsonProperty(value = "definedValues") + private List definedValues; + + public PostFormField() { + } + + public PostFormField(String id, String fieldName, String fieldType, boolean isRequired, + String commandName) { + this.id = id; + this.fieldName = fieldName; + this.fieldType = fieldType; + this.isRequired = isRequired; + this.commandName = commandName; + } + + public PostFormField(String fieldName, String id, String fieldType, boolean isRequired, + List value, List namedValue, String commandName, + List definedValues) { + this.fieldName = fieldName; + this.id = id; + this.fieldType = fieldType; + this.isRequired = isRequired; + this.value = value; + this.namedValue = namedValue; + this.commandName = commandName; + this.definedValues = definedValues; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String name) { + this.fieldName = name; + } + + public String getId() { + return id; + } + + public void setId(String value) { + this.id = value; + } + + public String getFieldType() { + return fieldType; + } + + public void setFieldType(String type) { + this.fieldType = type; + } + + public boolean getIsRequired() { + return isRequired; + } + + public void setIsRequired(boolean value) { + this.isRequired = value; + } + + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + public List getNamedValue() { + return namedValue; + } + + public void setNamedValue(List namedValue) { + this.namedValue = namedValue; + } + + public String getCommandName() { + return commandName; + } + + public void setCommandName(String commandName) { + this.commandName = commandName; + } + + public List getDefinedValues() { + return definedValues; + } + + public void setDefinedValues(List values) { + this.definedValues = values; + } + + @Override + public String toString() { + return "PostFormField{" + "fieldName='" + fieldName + '\'' + ", id='" + id + '\'' + + ", fieldType='" + fieldType + '\'' + + ", isRequired=" + isRequired + ", value=" + value + ", definedValues=" + definedValues + + '}'; + } + + @Override + public int compareTo(PostFormField field) { + Boolean current = this.isRequired; + Boolean byField = field.isRequired; + return byField.compareTo(current); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + PostFormField that = (PostFormField) o; + + if (isRequired != that.isRequired) { + return false; + } + if (fieldName != null ? !fieldName.equals(that.fieldName) : that.fieldName != null) { + return false; + } + if (id != null ? !id.equals(that.id) : that.id != null) { + return false; + } + if (fieldType != null ? !fieldType.equals(that.fieldType) : that.fieldType != null) { + return false; + } + if (value != null ? !value.equals(that.value) : that.value != null) { + return false; + } + return definedValues != null ? definedValues.equals(that.definedValues) + : that.definedValues == null; + } + + @Override + public int hashCode() { + int result = fieldName != null ? fieldName.hashCode() : 0; + result = 31 * result + (id != null ? id.hashCode() : 0); + result = 31 * result + (fieldType != null ? fieldType.hashCode() : 0); + result = 31 * result + (isRequired ? 1 : 0); + result = 31 * result + (value != null ? value.hashCode() : 0); + result = 31 * result + (definedValues != null ? definedValues.hashCode() : 0); + return result; + } } \ No newline at end of file From 2a346aa0ed550c41afe101a1add4e8c563f2d9f0 Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Fri, 10 Nov 2023 19:59:18 +0300 Subject: [PATCH 10/19] EPMRPP-87493 || Add description of the field (#360) --- .../model/externalsystem/PostFormField.java | 143 ++---------------- 1 file changed, 14 insertions(+), 129 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java index 2f7cedf7..0fb97151 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java @@ -21,6 +21,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * Basic representation of single post ticket form field
@@ -29,6 +33,10 @@ * * @author Andrei_Ramanchuk */ +@Builder +@Data +@AllArgsConstructor +@NoArgsConstructor @JsonInclude(Include.NON_NULL) public class PostFormField implements Comparable, Serializable { @@ -38,6 +46,12 @@ public class PostFormField implements Comparable, Serializable { @JsonProperty(value = "fieldName") private String fieldName; + /** + * Filed description + */ + @JsonProperty(value = "description") + private String description; + /** * Field ID for post ticket request in JIRA */ @@ -80,9 +94,6 @@ public class PostFormField implements Comparable, Serializable { @JsonProperty(value = "definedValues") private List definedValues; - public PostFormField() { - } - public PostFormField(String id, String fieldName, String fieldType, boolean isRequired, String commandName) { this.id = id; @@ -92,136 +103,10 @@ public PostFormField(String id, String fieldName, String fieldType, boolean isRe this.commandName = commandName; } - public PostFormField(String fieldName, String id, String fieldType, boolean isRequired, - List value, List namedValue, String commandName, - List definedValues) { - this.fieldName = fieldName; - this.id = id; - this.fieldType = fieldType; - this.isRequired = isRequired; - this.value = value; - this.namedValue = namedValue; - this.commandName = commandName; - this.definedValues = definedValues; - } - - public String getFieldName() { - return fieldName; - } - - public void setFieldName(String name) { - this.fieldName = name; - } - - public String getId() { - return id; - } - - public void setId(String value) { - this.id = value; - } - - public String getFieldType() { - return fieldType; - } - - public void setFieldType(String type) { - this.fieldType = type; - } - - public boolean getIsRequired() { - return isRequired; - } - - public void setIsRequired(boolean value) { - this.isRequired = value; - } - - public List getValue() { - return value; - } - - public void setValue(List value) { - this.value = value; - } - - public List getNamedValue() { - return namedValue; - } - - public void setNamedValue(List namedValue) { - this.namedValue = namedValue; - } - - public String getCommandName() { - return commandName; - } - - public void setCommandName(String commandName) { - this.commandName = commandName; - } - - public List getDefinedValues() { - return definedValues; - } - - public void setDefinedValues(List values) { - this.definedValues = values; - } - - @Override - public String toString() { - return "PostFormField{" + "fieldName='" + fieldName + '\'' + ", id='" + id + '\'' - + ", fieldType='" + fieldType + '\'' - + ", isRequired=" + isRequired + ", value=" + value + ", definedValues=" + definedValues - + '}'; - } - @Override public int compareTo(PostFormField field) { Boolean current = this.isRequired; Boolean byField = field.isRequired; return byField.compareTo(current); } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - PostFormField that = (PostFormField) o; - - if (isRequired != that.isRequired) { - return false; - } - if (fieldName != null ? !fieldName.equals(that.fieldName) : that.fieldName != null) { - return false; - } - if (id != null ? !id.equals(that.id) : that.id != null) { - return false; - } - if (fieldType != null ? !fieldType.equals(that.fieldType) : that.fieldType != null) { - return false; - } - if (value != null ? !value.equals(that.value) : that.value != null) { - return false; - } - return definedValues != null ? definedValues.equals(that.definedValues) - : that.definedValues == null; - } - - @Override - public int hashCode() { - int result = fieldName != null ? fieldName.hashCode() : 0; - result = 31 * result + (id != null ? id.hashCode() : 0); - result = 31 * result + (fieldType != null ? fieldType.hashCode() : 0); - result = 31 * result + (isRequired ? 1 : 0); - result = 31 * result + (value != null ? value.hashCode() : 0); - result = 31 * result + (definedValues != null ? definedValues.hashCode() : 0); - return result; - } } \ No newline at end of file From 508b9ef8efb6aabf41552d82914d1dbf2a68463d Mon Sep 17 00:00:00 2001 From: Siarhei Hrabko <45555481+grabsefx@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:18:38 +0300 Subject: [PATCH 11/19] EPMRPP-87271 added ActivityEventResource.subjectId field (#359) * EPMRPP-87271 added ActivityEventResource.subjectId field --- .../ws/model/ActivityEventResource.java | 193 ++---------------- 1 file changed, 13 insertions(+), 180 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java index 0710060f..076b90eb 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java @@ -23,6 +23,10 @@ import io.swagger.annotations.ApiModelProperty; import java.util.Date; import javax.validation.constraints.NotNull; +import lombok.Builder; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; /** * JSON Representation of Report Portal's Activity domain object. @@ -30,6 +34,10 @@ * @author Ryhor_Kukharenka */ @JsonInclude(Include.NON_NULL) +@Getter +@Setter +@Builder +@ToString public class ActivityEventResource { @NotNull @@ -79,187 +87,12 @@ public class ActivityEventResource { @ApiModelProperty(required = true) private String subjectType; + @NotNull + @JsonProperty(value = "subject_id", required = true) + @ApiModelProperty(required = true) + private String subjectId; + @JsonProperty(value = "details") private Object details; - private ActivityEventResource() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public String getEventName() { - return eventName; - } - - public void setEventName(String eventName) { - this.eventName = eventName; - } - - public Long getObjectId() { - return objectId; - } - - public void setObjectId(Long objectId) { - this.objectId = objectId; - } - - public String getObjectName() { - return objectName; - } - - public void setObjectName(String objectName) { - this.objectName = objectName; - } - - public String getObjectType() { - return objectType; - } - - public void setObjectType(String objectType) { - this.objectType = objectType; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getSubjectName() { - return subjectName; - } - - public void setSubjectName(String subjectName) { - this.subjectName = subjectName; - } - - public String getSubjectType() { - return subjectType; - } - - public void setSubjectType(String subjectType) { - this.subjectType = subjectType; - } - - public Object getDetails() { - return details; - } - - public void setDetails(Object details) { - this.details = details; - } - - @Override - public String toString() { - return "ActivityEventResource{" + "id=" + id - + ", createdAt=" + createdAt + ", eventName='" + eventName - + '\'' + ", objectId=" + objectId + ", objectName='" - + objectName + '\'' + ", objectType='" + objectType + '\'' - + ", projectId=" + projectId + ", projectName='" + projectName - + '\'' + ", subjectName='" + subjectName + '\'' - + ", subjectType='" + subjectType + '\'' + ", details=" - + details + '}'; - } - - public static ActivityEventResourceBuilder builder() { - return new ActivityEventResourceBuilder(); - } - - /** - * Activity Event Resource builder. - * - * @author Ryhor_Kukharenka - */ - public static class ActivityEventResourceBuilder { - - private final ActivityEventResource activityEventResource; - - private ActivityEventResourceBuilder() { - activityEventResource = new ActivityEventResource(); - } - - public ActivityEventResourceBuilder id(Long id) { - activityEventResource.id = id; - return this; - } - - public ActivityEventResourceBuilder createdAt(Date createdAt) { - activityEventResource.createdAt = createdAt; - return this; - } - - public ActivityEventResourceBuilder eventName(String eventName) { - activityEventResource.eventName = eventName; - return this; - } - - public ActivityEventResourceBuilder objectId(Long objectId) { - activityEventResource.objectId = objectId; - return this; - } - - public ActivityEventResourceBuilder objectName(String objectName) { - activityEventResource.objectName = objectName; - return this; - } - - public ActivityEventResourceBuilder objectType(String objectType) { - activityEventResource.objectType = objectType; - return this; - } - - public ActivityEventResourceBuilder projectId(Long projectId) { - activityEventResource.projectId = projectId; - return this; - } - - public ActivityEventResourceBuilder projectName(String projectName) { - activityEventResource.projectName = projectName; - return this; - } - - public ActivityEventResourceBuilder subjectName(String subjectName) { - activityEventResource.subjectName = subjectName; - return this; - } - - public ActivityEventResourceBuilder subjectType(String subjectType) { - activityEventResource.subjectType = subjectType; - return this; - } - - public ActivityEventResourceBuilder details(Object details) { - activityEventResource.details = details; - return this; - } - - public ActivityEventResource build() { - return activityEventResource; - } - } - } From 83f012f84c458f54bbca20729a9989e0fed384bd Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Thu, 16 Nov 2023 20:40:57 +0300 Subject: [PATCH 12/19] EPMRPP-87613 || Add back compatibility with older plugins (#361) --- .../model/externalsystem/PostFormField.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java index 0fb97151..8113e391 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/PostFormField.java @@ -94,6 +94,16 @@ public class PostFormField implements Comparable, Serializable { @JsonProperty(value = "definedValues") private List definedValues; + public PostFormField(String id, String name, String type, boolean isReq, List values, + List defValues) { + this.id = id; + this.fieldName = name; + this.fieldType = type; + this.isRequired = isReq; + this.value = values; + this.definedValues = defValues; + } + public PostFormField(String id, String fieldName, String fieldType, boolean isRequired, String commandName) { this.id = id; @@ -109,4 +119,13 @@ public int compareTo(PostFormField field) { Boolean byField = field.isRequired; return byField.compareTo(current); } + + public void setIsRequired(boolean value) { + this.isRequired = value; + } + + public boolean getIsRequired() { + return isRequired; + } + } \ No newline at end of file From 6a49944c1484a65bc08d5961460a3c24dbc76421 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Wed, 22 Nov 2023 16:22:03 +0300 Subject: [PATCH 13/19] EPMRPP-87813 || Send to the analyzer the id of previous launch --- .../reportportal/ws/model/analyzer/IndexLaunch.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java index d0f4f9d3..ddb29b87 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLaunch.java @@ -56,6 +56,9 @@ public class IndexLaunch { @JsonProperty("launchNumber") private Long launchNumber; + @JsonProperty("previousLaunchId") + private Long previousLaunchId; + public IndexLaunch() { } @@ -122,4 +125,12 @@ public Long getLaunchNumber() { public void setLaunchNumber(Long launchNumber) { this.launchNumber = launchNumber; } + + public Long getPreviousLaunchId() { + return previousLaunchId; + } + + public void setPreviousLaunchId(Long previousLaunchId) { + this.previousLaunchId = previousLaunchId; + } } From 61d713e372cce2ce69171067c1157998eeb5dda4 Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Mon, 11 Dec 2023 15:03:13 +0300 Subject: [PATCH 14/19] EPMRPP-88638 || Add name validation for launch import endpoint (#364) --- .../epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java index 8259b365..cd6cd12f 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java @@ -18,6 +18,8 @@ import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; +import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; +import com.epam.ta.reportportal.ws.model.ValidationConstraints; import com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; @@ -36,6 +38,7 @@ public class LaunchImportRQ { @JsonProperty(value = "name") @ApiModelProperty + @NotBlankWithSize(min = ValidationConstraints.MIN_LAUNCH_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH) protected String name; @JsonProperty(value = "description") From 87ca2fe795032f2b461fc38e01f6e2d814975e23 Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Wed, 13 Dec 2023 15:12:21 +0300 Subject: [PATCH 15/19] EPMRPP-88727 || Support null value for name in import (#365) --- .../ta/reportportal/ws/model/launch/LaunchImportRQ.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java index cd6cd12f..afca5562 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java +++ b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java @@ -16,10 +16,10 @@ package com.epam.ta.reportportal.ws.model.launch; +import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_NAME_LENGTH; import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; +import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_LAUNCH_NAME_LENGTH; -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; import com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; @@ -38,7 +38,7 @@ public class LaunchImportRQ { @JsonProperty(value = "name") @ApiModelProperty - @NotBlankWithSize(min = ValidationConstraints.MIN_LAUNCH_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH) + @Size(min = MIN_LAUNCH_NAME_LENGTH, max = MAX_NAME_LENGTH) protected String name; @JsonProperty(value = "description") From 5739c3c347fa7f069ebfa0bbf2452c2fb89486a7 Mon Sep 17 00:00:00 2001 From: Ivan_Kustau Date: Wed, 24 Jan 2024 16:28:15 +0300 Subject: [PATCH 16/19] EPMRPP-89102 || Move classes to api --- .../ws/annotations/WidgetLimitRange.java | 21 -- .../WidgetLimitRangeValidator.java | 37 -- .../ws/model/ActivityEventResource.java | 98 ----- .../ta/reportportal/ws/model/ApiKeyRQ.java | 50 --- .../ta/reportportal/ws/model/ApiKeyRS.java | 112 ------ .../ta/reportportal/ws/model/ApiKeysRS.java | 51 --- .../reportportal/ws/model/BaseEntityRQ.java | 47 --- .../epam/ta/reportportal/ws/model/BulkRQ.java | 49 --- .../reportportal/ws/model/CollectionsRQ.java | 51 --- .../reportportal/ws/model/DeleteBulkRQ.java | 52 --- .../reportportal/ws/model/DeleteBulkRS.java | 74 ---- .../reportportal/ws/model/EntryCreatedRS.java | 59 --- .../ws/model/LaunchImportCompletionRS.java | 41 --- .../ws/model/LaunchImportData.java | 47 --- .../ta/reportportal/ws/model/ModelViews.java | 35 -- .../ws/model/NestedStepResource.java | 144 -------- .../ws/model/OwnedEntityResource.java | 86 ----- .../epam/ta/reportportal/ws/model/Page.java | 139 ------- .../reportportal/ws/model/PagedResponse.java | 118 ------ .../ta/reportportal/ws/model/Position.java | 81 ---- .../reportportal/ws/model/SearchCriteria.java | 97 ----- .../ws/model/SearchCriteriaRQ.java | 52 --- .../epam/ta/reportportal/ws/model/Size.java | 81 ---- .../reportportal/ws/model/SystemInfoRS.java | 62 ---- .../ws/model/TestItemHistoryElement.java | 58 --- .../ws/model/TestItemResource.java | 345 ------------------ .../reportportal/ws/model/TokenCreatedRS.java | 55 --- .../reportportal/ws/model/WarningAwareRS.java | 40 -- .../ta/reportportal/ws/model/YesNoRS.java | 70 ---- .../activity/DashboardActivityResource.java | 80 ---- .../activity/IntegrationActivityResource.java | 92 ----- .../activity/IssueTypeActivityResource.java | 56 --- .../activity/LaunchActivityResource.java | 68 ---- .../PatternTemplateActivityResource.java | 74 ---- .../activity/PluginActivityResource.java | 54 --- .../ProjectAttributesActivityResource.java | 73 ---- .../activity/TestItemActivityResource.java | 140 ------- .../model/activity/UserActivityResource.java | 77 ---- .../activity/UserFilterActivityResource.java | 80 ---- .../activity/WidgetActivityResource.java | 121 ------ .../ws/model/analyzer/AnalyzedItemRs.java | 82 ----- .../ws/model/analyzer/CleanIndexRq.java | 57 --- .../ws/model/analyzer/IndexRs.java | 65 ---- .../ws/model/analyzer/IndexRsIndex.java | 114 ------ .../ws/model/analyzer/IndexRsItem.java | 42 --- .../ws/model/analyzer/RelevantItemInfo.java | 65 ---- .../ws/model/analyzer/SearchRq.java | 107 ------ .../ws/model/analyzer/SearchRs.java | 66 ---- .../ws/model/dashboard/AddWidgetRq.java | 43 --- .../ws/model/dashboard/CreateDashboardRQ.java | 57 --- .../ws/model/dashboard/DashboardResource.java | 183 ---------- .../ws/model/dashboard/UpdateDashboardRQ.java | 68 ---- .../externalsystem/BtsConnectionTestRQ.java | 53 --- .../UpdateBugTrackingSystemRQ.java | 43 --- .../ws/model/filter/BulkUpdateFilterRQ.java | 48 --- .../reportportal/ws/model/filter/Order.java | 80 ---- .../ws/model/filter/UpdateUserFilterRQ.java | 110 ------ .../ws/model/filter/UserFilterCondition.java | 134 ------- .../ws/model/filter/UserFilterResource.java | 124 ------- .../ws/model/integration/AuthFlowEnum.java | 28 -- .../integration/CreateIntegrationRQ.java | 0 .../ws/model/integration/IntegrationRQ.java | 62 ---- .../integration/IntegrationResource.java | 119 ------ .../integration/IntegrationTypeResource.java | 109 ------ .../integration/UpdatePluginStateRQ.java | 62 ---- .../ws/model/issue/DefineIssueRQ.java | 59 --- .../ws/model/issue/IssueDefinition.java | 66 ---- .../ws/model/item/ExternalIssueRQ.java | 44 --- .../ws/model/item/LinkExternalIssueRQ.java | 57 --- .../ws/model/item/UnlinkExternalIssueRQ.java | 56 --- .../ws/model/item/UpdateTestItemRQ.java | 69 ---- .../ws/model/launch/AnalyzeLaunchRQ.java | 87 ----- .../ws/model/launch/FinishLaunchRS.java | 69 ---- .../ws/model/launch/LaunchImportRQ.java | 60 --- .../ws/model/launch/MergeLaunchesRQ.java | 208 ----------- .../ws/model/launch/UpdateLaunchRQ.java | 82 ----- .../launch/cluster/CreateClustersRQ.java | 55 --- .../ws/model/log/GetLogsUnderRq.java | 38 -- .../ws/model/log/LogResource.java | 216 ----------- .../ws/model/log/SearchLogRq.java | 64 ---- .../ws/model/log/SearchLogRs.java | 189 ---------- .../notification/EmailNotificationRQ.java | 72 ---- .../model/preference/PreferenceResource.java | 70 ---- .../ws/model/project/AssignUsersRQ.java | 54 --- .../ws/model/project/CreateProjectRQ.java | 78 ---- .../ws/model/project/DeleteProjectRQ.java | 74 ---- .../ws/model/project/LaunchesPerUser.java | 61 ---- .../model/project/ProjectConfiguration.java | 80 ---- .../ws/model/project/ProjectInfoResource.java | 172 --------- .../ws/model/project/ProjectResource.java | 165 --------- .../ws/model/project/UnassignUsersRQ.java | 55 --- .../ws/model/project/UniqueErrorConfig.java | 36 -- .../ws/model/project/UpdateProjectRQ.java | 72 ---- .../project/config/CreateIssueSubTypeRQ.java | 93 ----- .../project/config/IssueSubTypeCreatedRS.java | 47 --- .../project/config/IssueSubTypeResource.java | 109 ------ .../config/ProjectConfigurationUpdate.java | 48 --- .../config/ProjectSettingsResource.java | 55 --- .../project/config/UpdateIssueSubTypeRQ.java | 67 ---- .../config/UpdateOneIssueSubTypeRQ.java | 106 ------ .../pattern/CreatePatternTemplateRQ.java | 91 ----- .../pattern/PatternTemplateResource.java | 91 ----- .../pattern/UpdatePatternTemplateRQ.java | 67 ---- .../email/ProjectNotificationConfigDTO.java | 74 ---- .../ws/model/project/email/SenderCaseDTO.java | 186 ---------- .../ws/model/role/SaveRoleRQ.java | 66 ---- .../ws/model/settings/AnalyticsResource.java | 64 ---- .../model/settings/ServerEmailResource.java | 171 --------- .../settings/ServerSettingsResource.java | 84 ----- .../ws/model/user/ChangePasswordRQ.java | 89 ----- .../ws/model/user/CreateUserBidRS.java | 58 --- .../ws/model/user/CreateUserRQ.java | 84 ----- .../ws/model/user/CreateUserRQConfirm.java | 104 ------ .../ws/model/user/CreateUserRQFull.java | 142 ------- .../ws/model/user/CreateUserRS.java | 60 --- .../ws/model/user/EditUserRQ.java | 85 ----- .../ws/model/user/ResetPasswordRQ.java | 93 ----- .../ws/model/user/RestorePasswordRQ.java | 71 ---- .../ws/model/user/SearchUserResource.java | 59 --- .../reportportal/ws/model/user/UserBidRS.java | 63 ---- .../ws/model/user/UserResource.java | 182 --------- .../ws/model/widget/ChartObject.java | 102 ------ .../ws/model/widget/ContentParameters.java | 74 ---- .../model/widget/MaterializedWidgetType.java | 24 -- .../ws/model/widget/SortEntry.java | 36 -- .../ws/model/widget/WidgetPreviewRQ.java | 109 ------ .../ws/model/widget/WidgetRQ.java | 104 ------ .../ws/model/widget/WidgetResource.java | 119 ------ .../ws/model/MergeLaunchesSerializerTest.java | 71 ---- .../ta/reportportal/ws/model/PageTest.java | 63 ---- .../validation/TicketsValidationTest.java | 125 ------- .../validation/WidgetRqValidatorTest.java | 76 ---- 132 files changed, 10908 deletions(-) delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRange.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRangeValidator.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/ApiKeysRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/BaseEntityRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/BulkRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/CollectionsRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/ModelViews.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/NestedStepResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/OwnedEntityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/Page.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/PagedResponse.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/Position.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteria.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteriaRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/Size.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/SystemInfoRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/TestItemHistoryElement.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/TestItemResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/TokenCreatedRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/WarningAwareRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/YesNoRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/DashboardActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/IntegrationActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/IssueTypeActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/LaunchActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/PatternTemplateActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/PluginActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/ProjectAttributesActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/TestItemActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/UserActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/UserFilterActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/activity/WidgetActivityResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/AnalyzedItemRs.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/CleanIndexRq.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRs.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsIndex.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsItem.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/RelevantItemInfo.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRq.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRs.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/dashboard/AddWidgetRq.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/dashboard/CreateDashboardRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/dashboard/DashboardResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/dashboard/UpdateDashboardRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/BtsConnectionTestRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/UpdateBugTrackingSystemRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/filter/BulkUpdateFilterRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/filter/Order.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/filter/UpdateUserFilterRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterCondition.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/AuthFlowEnum.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/CreateIntegrationRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationTypeResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/integration/UpdatePluginStateRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/issue/DefineIssueRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/issue/IssueDefinition.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/item/ExternalIssueRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/item/LinkExternalIssueRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/item/UnlinkExternalIssueRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/item/UpdateTestItemRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/FinishLaunchRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/MergeLaunchesRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/UpdateLaunchRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/log/GetLogsUnderRq.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/log/LogResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRq.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRs.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/notification/EmailNotificationRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/preference/PreferenceResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/AssignUsersRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/CreateProjectRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/DeleteProjectRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/LaunchesPerUser.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectConfiguration.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectInfoResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/UnassignUsersRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/UniqueErrorConfig.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/UpdateProjectRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/CreateIssueSubTypeRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeCreatedRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectConfigurationUpdate.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectSettingsResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateIssueSubTypeRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateOneIssueSubTypeRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/CreatePatternTemplateRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/PatternTemplateResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/UpdatePatternTemplateRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/email/ProjectNotificationConfigDTO.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/role/SaveRoleRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/settings/AnalyticsResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerEmailResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerSettingsResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/ChangePasswordRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserBidRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQConfirm.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQFull.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/EditUserRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/ResetPasswordRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/RestorePasswordRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/SearchUserResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/UserBidRS.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/user/UserResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/ChartObject.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/ContentParameters.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/MaterializedWidgetType.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/SortEntry.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetPreviewRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetResource.java delete mode 100644 src/test/java/com/epam/ta/reportportal/ws/model/MergeLaunchesSerializerTest.java delete mode 100644 src/test/java/com/epam/ta/reportportal/ws/model/PageTest.java delete mode 100644 src/test/java/com/epam/ta/reportportal/ws/model/validation/TicketsValidationTest.java delete mode 100644 src/test/java/com/epam/ta/reportportal/ws/model/validation/WidgetRqValidatorTest.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRange.java b/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRange.java deleted file mode 100644 index b68b5ccf..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRange.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.epam.ta.reportportal.ws.annotations; - -import javax.validation.Constraint; -import java.lang.annotation.*; - -/** - * @author Pavel Bortnik - */ -@Documented -@Constraint(validatedBy = { WidgetLimitRangeValidator.class}) -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER }) -public @interface WidgetLimitRange { - String message() default "The provided limit is not allowed for the widget"; - - Class[] groups() default {}; - - Class[] payload() default {}; - - String[] allowedValues() default {}; -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRangeValidator.java b/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRangeValidator.java deleted file mode 100644 index 85803153..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/annotations/WidgetLimitRangeValidator.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epam.ta.reportportal.ws.annotations; - -import com.epam.ta.reportportal.ws.model.BaseEntityRQ; -import com.epam.ta.reportportal.ws.model.widget.MaterializedWidgetType; -import com.epam.ta.reportportal.ws.model.widget.WidgetRQ; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; -import java.util.Arrays; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_WIDGET_LIMIT; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_WIDGET_LIMIT; - -/** - * @author Pavel Bortnik - */ -public class WidgetLimitRangeValidator implements ConstraintValidator { - - @Override - public boolean isValid(BaseEntityRQ value, ConstraintValidatorContext context) { - if (value instanceof WidgetRQ) { - WidgetRQ widgetRQ = (WidgetRQ) value; - int limit = widgetRQ.getContentParameters().getItemsCount(); - if (Arrays.stream(MaterializedWidgetType.values()).anyMatch(it -> it.getType().equalsIgnoreCase(widgetRQ.getWidgetType()))) { - return limit >= MIN_WIDGET_LIMIT; - } - updateValidationMessage("Widget item limit size must be between " + MIN_WIDGET_LIMIT + " and " + MAX_WIDGET_LIMIT, context); - return limit >= MIN_WIDGET_LIMIT && limit <= MAX_WIDGET_LIMIT; - } - return false; - } - - public void updateValidationMessage(String message, ConstraintValidatorContext context) { - context.disableDefaultConstraintViolation(); - context.buildConstraintViolationWithTemplate(message).addConstraintViolation(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java deleted file mode 100644 index 076b90eb..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityEventResource.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import java.util.Date; -import javax.validation.constraints.NotNull; -import lombok.Builder; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -/** - * JSON Representation of Report Portal's Activity domain object. - * - * @author Ryhor_Kukharenka - */ -@JsonInclude(Include.NON_NULL) -@Getter -@Setter -@Builder -@ToString -public class ActivityEventResource { - - @NotNull - @JsonProperty(value = "id", required = true) - @ApiModelProperty(required = true) - private Long id; - - @NotNull - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssZ") - @JsonProperty(value = "created_at") - private Date createdAt; - - @NotNull - @JsonProperty(value = "event_name", required = true) - @ApiModelProperty(required = true) - private String eventName; - - @JsonProperty(value = "object_id") - @ApiModelProperty(required = true) - private Long objectId; - - @NotNull - @JsonProperty(value = "object_name", required = true) - @ApiModelProperty(required = true) - private String objectName; - - @NotNull - @JsonProperty(value = "object_type", required = true) - @ApiModelProperty(required = true) - private String objectType; - - @JsonProperty(value = "project_id") - @ApiModelProperty(required = true) - private Long projectId; - - @JsonProperty(value = "project_name") - @ApiModelProperty(required = true) - private String projectName; - - @NotNull - @JsonProperty(value = "subject_name", required = true) - @ApiModelProperty(required = true) - private String subjectName; - - @NotNull - @JsonProperty(value = "subject_type", required = true) - @ApiModelProperty(required = true) - private String subjectType; - - @NotNull - @JsonProperty(value = "subject_id", required = true) - @ApiModelProperty(required = true) - private String subjectId; - - @JsonProperty(value = "details") - private Object details; - -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRQ.java deleted file mode 100644 index fe6d3da7..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRQ.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import javax.validation.constraints.NotNull; - -/** - * Api key representation for request - * - * @author Andrei Piankouski - */ -@JsonInclude(Include.NON_NULL) -public class ApiKeyRQ { - - @NotNull - @JsonProperty(value = "name", required = true) - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "ApiKeyRQ{" - + "name='" + name + '\'' - + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRS.java deleted file mode 100644 index 175b7d59..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeyRS.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Date; -import javax.validation.constraints.NotNull; - -/** - * Api key representation for response - * - * @author Andrei Piankouski - */ -@JsonInclude(Include.NON_NULL) -public class ApiKeyRS { - - @NotNull - @JsonProperty(value = "id", required = true) - private Long id; - - @NotNull - @JsonProperty(value = "name", required = true) - private String name; - - @NotNull - @JsonProperty(value = "user_id", required = true) - private Long userId; - - @NotNull - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssZ") - @JsonProperty(value = "created_at") - private Date createdAt; - - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - @JsonProperty(value = "last_used_at") - private Date lastUsedAt; - - @JsonProperty(value = "api_key") - private String apiKey; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public Date getLastUsedAt() { - return lastUsedAt; - } - - public void setLastUsedAt(Date lastUsedAt) { - this.lastUsedAt = lastUsedAt; - } - - @Override - public String toString() { - return "ApiKeyRS{" + "id=" + id + ", name='" + name + '\'' + ", userId=" + userId - + ", createdAt=" + createdAt + ", lastUsedAt=" + lastUsedAt + ", apiKey='" + apiKey + '\'' - + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeysRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeysRS.java deleted file mode 100644 index a7251b08..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ApiKeysRS.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * Container for ApiKeysRS - * - * @author Andrei Piankouski - */ -@JsonInclude(Include.NON_NULL) -public class ApiKeysRS { - - @NotNull - @JsonProperty(value = "items", required = true) - private List apiKeys; - - public List getApiKeys() { - return apiKeys; - } - - public void setApiKeys(List apiKeys) { - this.apiKeys = apiKeys; - } - - @Override - public String toString() { - return "ApiKeysRS{" - + "apiKeys=" + apiKeys - + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/BaseEntityRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/BaseEntityRQ.java deleted file mode 100644 index 27a4dfd7..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/BaseEntityRQ.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_ENTITY_DESCRIPTION; - -/** - * Base entity for manipulating sharable resources - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -public class BaseEntityRQ { - - @Size(max = MAX_ENTITY_DESCRIPTION) - @JsonProperty(value = "description") - private String description; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/BulkRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/BulkRQ.java deleted file mode 100644 index 1b8f0af5..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/BulkRQ.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.Map; - -/** - * @param Type of Key - * @param Type of Entity - * @author Dzmitry_Kavalets - */ -public class BulkRQ { - - @Valid - @NotNull - @JsonProperty(value = "entities", required = true) - private Map entities; - - public Map getEntities() { - return entities; - } - - public void setEntities(Map entities) { - this.entities = entities; - } - - @Override - public String toString() { - return "BulkRQ{" + "entities=" + entities + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/CollectionsRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/CollectionsRQ.java deleted file mode 100644 index bd97fb55..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/CollectionsRQ.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * @deprecated use {@link BulkRQ} instead - */ -@Deprecated -public class CollectionsRQ { - - @Valid - @NotNull - @JsonProperty(value = "elements", required = true) - private List elements; - - public List getElements() { - return elements; - } - - public void setElements(List elements) { - this.elements = elements; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CollectionsRQ{"); - sb.append("elements=").append(elements); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRQ.java deleted file mode 100644 index cbf63a6b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRQ.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotEmpty; -import java.util.List; - -/** - * @author Ivan Budayeu - */ -public class DeleteBulkRQ { - - @NotEmpty - @JsonProperty(value = "ids") - private List ids; - - public DeleteBulkRQ() { - } - - public DeleteBulkRQ(@NotEmpty List ids) { - this.ids = ids; - } - - public List getIds() { - return ids; - } - - public void setIds(List ids) { - this.ids = ids; - } - - @Override - public String toString() { - return "DeleteBulkRQ{" + "ids=" + ids + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRS.java deleted file mode 100644 index 0933a66c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/DeleteBulkRS.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -/** - * @author Ihar Kahadouski - */ -public class DeleteBulkRS { - - @JsonProperty("successfullyDeleted") - private List deleted; - - @JsonProperty("notFound") - private List notFound; - - @JsonProperty("errors") - private List errors; - - public DeleteBulkRS() { - } - - public DeleteBulkRS(List deleted, List notFound, List errors) { - this.deleted = deleted; - this.notFound = notFound; - this.errors = errors; - } - - public List getDeleted() { - return deleted; - } - - public void setDeleted(List deleted) { - this.deleted = deleted; - } - - public List getNotFound() { - return notFound; - } - - public void setNotFound(List notFound) { - this.notFound = notFound; - } - - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - @Override - public String toString() { - return "DeleteBulkRS{" + "deleted=" + deleted + ", notFound=" + notFound + ", errors=" + errors + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java deleted file mode 100644 index 9957d289..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response when some entry has been created and we need to return ID - * - * @author Andrei Varabyeu - * - */ -@JsonInclude(Include.NON_NULL) -public class EntryCreatedRS { - - @JsonProperty("id") - private Long id; - - public EntryCreatedRS() { - - } - - public EntryCreatedRS(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("EntryCreatedRS{"); - sb.append("id='").append(id).append('\''); - sb.append('}'); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java deleted file mode 100644 index 022184a2..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportCompletionRS.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -/** - * Operation completion response for launch import. - * - * @author Siarhei Hrabko - */ -@Getter -@Setter -@ToString -@AllArgsConstructor -@NoArgsConstructor -public class LaunchImportCompletionRS extends OperationCompletionRS { - - @JsonProperty(value = "data") - private LaunchImportData data; - -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java b/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java deleted file mode 100644 index dcc18b77..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/LaunchImportData.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -/** - * Operation completion response extension for launch import. - * - * @author Siarhei Hrabko - */ -@Getter -@Setter -@ToString -@AllArgsConstructor -@NoArgsConstructor -public class LaunchImportData { - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("number") - private Long number; - -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ModelViews.java b/src/main/java/com/epam/ta/reportportal/ws/model/ModelViews.java deleted file mode 100644 index ad60a5c2..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/ModelViews.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -/** - * Container of view classes - * - * @author Andrei Varabyeu - * - */ -public class ModelViews { - - public static class DefaultView { - } - - public static class FullUserView extends DefaultView { - } - - public static class FullProjectInfoView extends DefaultView { - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/NestedStepResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/NestedStepResource.java deleted file mode 100644 index 214b125e..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/NestedStepResource.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Date; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(Include.NON_NULL) -public class NestedStepResource implements Serializable { - - @JsonProperty(value = "id") - private Long id; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "uuid") - private String uuid; - - @JsonProperty(value = "type") - private String type; - - @JsonProperty(value = "startTime") - private Date startTime; - - @JsonProperty(value = "endTime") - private Date endTime; - - @JsonProperty(value = "status") - private String status; - - @JsonProperty(value = "duration") - private Double duration; - - @JsonProperty(value = "hasContent") - private Boolean hasContent; - - @JsonProperty(value = "attachmentsCount") - private Integer attachmentsCount; - - public NestedStepResource() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Date getStartTime() { - return startTime; - } - - public void setStartTime(Date startTime) { - this.startTime = startTime; - } - - public Date getEndTime() { - return endTime; - } - - public void setEndTime(Date endTime) { - this.endTime = endTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Double getDuration() { - return duration; - } - - public void setDuration(Double duration) { - this.duration = duration; - } - - public Boolean getHasContent() { - return hasContent; - } - - public void setHasContent(Boolean hasContent) { - this.hasContent = hasContent; - } - - public Integer getAttachmentsCount() { - return attachmentsCount; - } - - public void setAttachmentsCount(Integer attachmentsCount) { - this.attachmentsCount = attachmentsCount; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/OwnedEntityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/OwnedEntityResource.java deleted file mode 100644 index 5c5ef776..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/OwnedEntityResource.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Shared entity can used for sending information to client about shared resource. - * Contains only information about name and owner of entity. - * - * @author Aliaksei_Makayed - * - */ -@JsonInclude(Include.NON_NULL) -public class OwnedEntityResource { - - @JsonProperty(value = "id") - private String id; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "owner") - private String owner; - - @JsonProperty(value = "description") - private String description; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getOwner() { - return owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("OwnedEntity{"); - sb.append("name='").append(name).append('\''); - sb.append(", owner='").append(owner).append('\''); - sb.append(", description='").append(description).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/Page.java b/src/main/java/com/epam/ta/reportportal/ws/model/Page.java deleted file mode 100644 index 86ecb65a..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/Page.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - - -import java.util.Collection; -import java.util.Iterator; - -/** - * Paged response representation - * Re-implementation of Spring's HATEAOS Page implementation to get rid of Spring's deps in model package - * - * @author Andrei Varabyeu - */ -public class Page implements Iterable { - - private final Collection content; - private final PageMetadata page; - - /** - * Visible for deserializer - */ - Page() { - this(null, null); - } - - public Page(Collection content, PageMetadata page) { - this.content = content; - this.page = page; - } - - public Page(Collection content, long size, long number, long totalElements, long totalPages) { - this.content = content; - this.page = new PageMetadata(size, number, totalElements, totalPages); - } - - public Page(Collection content, long size, long number, long totalElements) { - this.content = content; - this.page = new PageMetadata(size, number, totalElements); - } - - public Collection getContent() { - return content; - } - - public PageMetadata getPage() { - return page; - } - - @Override - public Iterator iterator() { - return content.iterator(); - } - - public static class PageMetadata { - long number; - long size; - long totalElements; - long totalPages; - - /** - * Visible for deserializer - */ - PageMetadata(){ - } - - public PageMetadata(long size, long number, long totalElements, long totalPages) { - checkArgument(size > -1, "Size must not be negative!"); - checkArgument(number > -1, "Number must not be negative!"); - checkArgument(totalElements > -1, "Total elements must not be negative!"); - checkArgument(totalPages > -1, "Total pages must not be negative!"); - - this.number = number; - this.size = size; - this.totalElements = totalElements; - this.totalPages = totalPages; - - } - - public PageMetadata(long size, long number, long totalElements) { - this(size, number, totalElements, size == 0 ? 0 : (long) Math.ceil((double) totalElements / (double) size)); - } - - public long getNumber() { - return number; - } - - public long getSize() { - return size; - } - - public long getTotalElements() { - return totalElements; - } - - public long getTotalPages() { - return totalPages; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("PageMetadata{"); - sb.append("number=").append(number); - sb.append(", size=").append(size); - sb.append(", totalElements=").append(totalElements); - sb.append(", totalPages=").append(totalPages); - sb.append('}'); - return sb.toString(); - } - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("Page{"); - sb.append("content=").append(content); - sb.append(", page=").append(page); - sb.append('}'); - return sb.toString(); - } - - private static void checkArgument(boolean expression, String errorMessage) { - if (!expression) { - throw new IllegalArgumentException(errorMessage); - } - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/PagedResponse.java b/src/main/java/com/epam/ta/reportportal/ws/model/PagedResponse.java deleted file mode 100644 index 1fe9ac2a..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/PagedResponse.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * Paged representation. - * - * @param Type of items - */ -@JsonInclude(Include.NON_NULL) -public class PagedResponse { - - @NotNull - @JsonProperty(value = "offset") - private Long offset; - - @NotNull - @JsonProperty(value = "limit") - private Integer limit; - - @NotNull - @JsonProperty(value = "total_count") - private Long totalCount; - - @NotNull - @JsonProperty(value = "sort") - private String sort; - - @NotNull - @JsonProperty(value = "order") - private String order; - - @NotNull - @JsonProperty(value = "items") - private List items; - - public PagedResponse() { - } - - public PagedResponse(Long offset, Integer limit, Long totalCount, String sort, String order, - List items) { - this.offset = offset; - this.limit = limit; - this.totalCount = totalCount; - this.sort = sort; - this.order = order; - this.items = items; - } - - public Long getOffset() { - return offset; - } - - public void setOffset(Long offset) { - this.offset = offset; - } - - public Integer getLimit() { - return limit; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Long getTotalCount() { - return totalCount; - } - - public void setTotalCount(Long totalCount) { - this.totalCount = totalCount; - } - - public String getSort() { - return sort; - } - - public void setSort(String sort) { - this.sort = sort; - } - - public String getOrder() { - return order; - } - - public void setOrder(String order) { - this.order = order; - } - - public List getItems() { - return items; - } - - public void setItems(List items) { - this.items = items; - } - -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/Position.java b/src/main/java/com/epam/ta/reportportal/ws/model/Position.java deleted file mode 100644 index 06468178..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/Position.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Position { - - @JsonProperty(value = "positionX") - private int x; - - @JsonProperty(value = "positionY") - private int y; - - public Position() { - } - - public Position(int x, int y) { - this.x = x; - this.y = y; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Position position = (Position) o; - - if (x != position.x) { - return false; - } - return y == position.y; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteria.java b/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteria.java deleted file mode 100644 index 0ac4510c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteria.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import java.util.Objects; -import javax.validation.constraints.NotNull; - -/** - * Search Criteria used for a compound query and subsequent conversion to a filter. - * - * @author Ryhor_Kukharenka - */ -@JsonInclude(Include.NON_NULL) -public class SearchCriteria { - - @NotNull - @JsonProperty(value = "filter_key", required = true) - @ApiModelProperty(required = true) - private String filterKey; - - @JsonProperty(value = "operation") - @ApiModelProperty(allowableValues = "EQ, NE, CNT, NON_CNT, BTW, IN") - private String operation; - - @NotNull - @JsonProperty(value = "value", required = true) - @ApiModelProperty(required = true) - private String value; - - public SearchCriteria() { - } - - public SearchCriteria(String filterKey, String operation, String value) { - this.filterKey = filterKey; - this.operation = operation; - this.value = value; - } - - public String getFilterKey() { - return filterKey; - } - - public void setFilterKey(String filterKey) { - this.filterKey = filterKey; - } - - public String getOperation() { - return operation; - } - - public void setOperation(String operation) { - this.operation = operation; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchCriteria that = (SearchCriteria) o; - return Objects.equals(filterKey, that.filterKey); - } - - @Override - public int hashCode() { - return Objects.hash(filterKey); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteriaRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteriaRQ.java deleted file mode 100644 index 5b538734..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/SearchCriteriaRQ.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Set; -import javax.validation.constraints.NotNull; - -/** - * Keep all search criteria for request. - * - * @author Ryhor_Kukharenka - */ -@JsonInclude(Include.NON_NULL) -public class SearchCriteriaRQ { - - @NotNull - @JsonProperty(value = "search_criterias") - private Set criteriaList; - - public SearchCriteriaRQ() { - } - - public SearchCriteriaRQ(Set criteriaList) { - this.criteriaList = criteriaList; - } - - public Set getCriteriaList() { - return criteriaList; - } - - public void setCriteriaList(Set criteriaList) { - this.criteriaList = criteriaList; - } - -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/Size.java b/src/main/java/com/epam/ta/reportportal/ws/model/Size.java deleted file mode 100644 index b2a0b116..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/Size.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Size { - - @JsonProperty(value = "width") - private int width; - - @JsonProperty(value = "height") - private int height; - - public Size() { - } - - public Size(int width, int height) { - this.width = width; - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Size size = (Size) o; - - if (width != size.width) { - return false; - } - return height == size.height; - } - - @Override - public int hashCode() { - int result = width; - result = 31 * result + height; - return result; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/SystemInfoRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/SystemInfoRS.java deleted file mode 100644 index 903116c6..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/SystemInfoRS.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * System information response - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class SystemInfoRS { - - @JsonProperty("os") - private String osVersion; - - @JsonProperty("cpuUsage") - private float cpuUsage; - - @JsonProperty("memUsage") - private float memUsage; - - public void setOsVersion(String value) { - this.osVersion = value; - } - - public String getOsVersion() { - return osVersion; - } - - public void setCpuUsage(float value) { - this.cpuUsage = value; - } - - public float getCpuUsage() { - return cpuUsage; - } - - public void setMemUsage(float value) { - this.memUsage = value; - } - - public float getMemUsage() { - return memUsage; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/TestItemHistoryElement.java b/src/main/java/com/epam/ta/reportportal/ws/model/TestItemHistoryElement.java deleted file mode 100644 index 4d413cf9..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/TestItemHistoryElement.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -@JsonInclude(Include.NON_NULL) -public class TestItemHistoryElement { - - @JsonProperty(value = "groupingField") - private String groupingField; - - @JsonProperty(value = "resources") - private List resources; - - public TestItemHistoryElement() { - } - - public String getGroupingField() { - return groupingField; - } - - public void setGroupingField(String groupingField) { - this.groupingField = groupingField; - } - - public List getResources() { - return resources; - } - - public void setResources(List resources) { - this.resources = resources; - } - - - @Override - public String toString() { - return "TestItemHistoryElement{" + "groupingField=" + groupingField + ", resources=" + resources + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/TestItemResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/TestItemResource.java deleted file mode 100644 index a412803c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/TestItemResource.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.epam.ta.reportportal.ws.model.issue.Issue; -import com.epam.ta.reportportal.ws.model.item.PathNameResource; -import com.epam.ta.reportportal.ws.model.statistics.StatisticsResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Date; -import java.util.List; -import java.util.Set; - -/** - * JSON Representation of Report Portal domain object - * - * @author Andrei Varabyeu - */ -@JsonInclude(Include.NON_NULL) -public class TestItemResource { - - @JsonProperty(value = "id") - private Long itemId; - - @JsonProperty(value = "uuid") - private String uuid; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "codeRef") - private String codeRef; - - @JsonProperty(value = "description") - private String description; - - @JsonProperty(value = "parameters") - private List parameters; - - @JsonProperty(value = "attributes") - private Set attributes; - - @JsonProperty(value = "type") - private String type; - - @JsonProperty(value = "startTime") - private Date startTime; - - @JsonProperty(value = "endTime") - private Date endTime; - - @JsonProperty(value = "status") - private String status; - - @JsonProperty(value = "statistics") - private StatisticsResource statisticsResource; - - @JsonProperty(value = "parent") - private Long parent; - - @JsonProperty(value = "pathNames") - private PathNameResource pathNames; - - @JsonProperty(value = "launchStatus") - private String launchStatus; - - @JsonProperty(value = "issue") - private Issue issue; - - @JsonProperty(value = "hasChildren") - private boolean hasChildren; - - @JsonProperty(value = "hasStats") - private boolean hasStats; - - @JsonProperty(value = "launchId") - private Long launchId; - - @JsonProperty(value = "uniqueId") - private String uniqueId; - - @JsonProperty(value = "testCaseId") - private String testCaseId; - - @JsonProperty(value = "testCaseHash") - private Integer testCaseHash; - - @JsonProperty(value = "patternTemplates") - private Set patternTemplates; - - @JsonProperty(value = "retries") - private List retries; - - @JsonProperty(value = "path") - private String path; - - public List getRetries() { - return retries; - } - - public void setRetries(List retries) { - this.retries = retries; - } - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public Long getItemId() { - return itemId; - } - - public void setItemId(Long itemId) { - this.itemId = itemId; - } - - public Issue getIssue() { - return issue; - } - - public void setIssue(Issue issue) { - this.issue = issue; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getCodeRef() { - return codeRef; - } - - public void setCodeRef(String codeRef) { - this.codeRef = codeRef; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getParameters() { - return parameters; - } - - public void setParameters(List parameters) { - this.parameters = parameters; - } - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Date getStartTime() { - return startTime; - } - - public void setStartTime(Date startTime) { - this.startTime = startTime; - } - - public Date getEndTime() { - return endTime; - } - - public void setEndTime(Date endTime) { - this.endTime = endTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Long getParent() { - return parent; - } - - public void setParent(Long parent) { - this.parent = parent; - } - - public PathNameResource getPathNames() { - return pathNames; - } - - public void setPathNames(PathNameResource pathNames) { - this.pathNames = pathNames; - } - - public void setLaunchStatus(String value) { - this.launchStatus = value; - } - - public String getLaunchStatus() { - return launchStatus; - } - - public StatisticsResource getStatisticsResource() { - return statisticsResource; - } - - public void setStatisticsResource(StatisticsResource statisticsResource) { - this.statisticsResource = statisticsResource; - } - - public boolean isHasChildren() { - return hasChildren; - } - - public void setHasChildren(boolean hasChildren) { - this.hasChildren = hasChildren; - } - - public boolean isHasStats() { - return hasStats; - } - - public void setHasStats(boolean hasStats) { - this.hasStats = hasStats; - } - - public String getUniqueId() { - return uniqueId; - } - - public void setUniqueId(String uniqueId) { - this.uniqueId = uniqueId; - } - - public String getTestCaseId() { - return testCaseId; - } - - public void setTestCaseId(String testCaseId) { - this.testCaseId = testCaseId; - } - - public Integer getTestCaseHash() { - return testCaseHash; - } - - public void setTestCaseHash(Integer testCaseHash) { - this.testCaseHash = testCaseHash; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Set getPatternTemplates() { - return patternTemplates; - } - - public void setPatternTemplates(Set patternTemplates) { - this.patternTemplates = patternTemplates; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("TestItemResource{"); - sb.append("itemId=").append(itemId); - sb.append(", uuid='").append(uuid).append('\''); - sb.append(", name='").append(name).append('\''); - sb.append(", codeRef='").append(codeRef).append('\''); - sb.append(", description='").append(description).append('\''); - sb.append(", parameters=").append(parameters); - sb.append(", attributes=").append(attributes); - sb.append(", type='").append(type).append('\''); - sb.append(", startTime=").append(startTime); - sb.append(", endTime=").append(endTime); - sb.append(", status='").append(status).append('\''); - sb.append(", statisticsResource=").append(statisticsResource); - sb.append(", parent=").append(parent); - sb.append(", pathNames=").append(pathNames); - sb.append(", launchStatus='").append(launchStatus).append('\''); - sb.append(", issue=").append(issue); - sb.append(", hasChildren=").append(hasChildren); - sb.append(", hasStats=").append(hasStats); - sb.append(", launchId=").append(launchId); - sb.append(", uniqueId='").append(uniqueId).append('\''); - sb.append(", testCaseId='").append(testCaseId).append('\''); - sb.append(", testCaseHash='").append(testCaseHash).append('\''); - sb.append(", patternTemplates=").append(patternTemplates); - sb.append(", retries=").append(retries); - sb.append(", path='").append(path).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/TokenCreatedRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/TokenCreatedRS.java deleted file mode 100644 index c9d784db..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/TokenCreatedRS.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Basic token creation response - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class TokenCreatedRS { - @JsonProperty("accessToken") - private String token; - - public TokenCreatedRS() { - } - - public TokenCreatedRS(String token) { - this.token = token; - } - - public void setId(String token) { - this.token = token; - } - - public String getToken() { - return token; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("TokenCreatedRS{"); - sb.append("access_token='").append(token).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/WarningAwareRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/WarningAwareRS.java deleted file mode 100644 index 9f29bb24..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/WarningAwareRS.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -/** - * @author Andrei Varabyeu - */ -public class WarningAwareRS { - - private String warning; - - public String getWarning() { - return warning; - } - - public void setWarning(String warning) { - this.warning = warning; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("WarningAwareRS{"); - sb.append("warning='").append(warning).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/YesNoRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/YesNoRS.java deleted file mode 100644 index 48daed56..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/YesNoRS.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonInclude(Include.NON_NULL) -public class YesNoRS { - - @JsonProperty("is") - private boolean is; - - public YesNoRS() { - } - - public YesNoRS(boolean param) { - this.is = param; - } - - public void setIs(boolean value) { - this.is = value; - } - - public boolean getIs() { - return is; - } - - @Override - public String toString() { - return "YesNoRS [is=" + is + "]"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (is ? 1231 : 1237); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - YesNoRS other = (YesNoRS) obj; - if (is != other.is) - return false; - return true; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/DashboardActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/DashboardActivityResource.java deleted file mode 100644 index 33dce8c4..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/DashboardActivityResource.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class DashboardActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "name", required = true) - private String name; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "description") - private String description; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("DashboardActivityResource{"); - sb.append("id=").append(id); - sb.append(", name='").append(name).append('\''); - sb.append(", projectId=").append(projectId); - sb.append(", description='").append(description).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/IntegrationActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/IntegrationActivityResource.java deleted file mode 100644 index 392efc28..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/IntegrationActivityResource.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class IntegrationActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "projectName", required = true) - private String projectName; - - @JsonProperty(value = "typeName", required = true) - private String typeName; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("IntegrationActivityResource{"); - sb.append("id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", name='").append(name).append('\''); - sb.append(", projectName='").append(projectName).append('\''); - sb.append(", typeName='").append(typeName).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/IssueTypeActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/IssueTypeActivityResource.java deleted file mode 100644 index e4ab8250..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/IssueTypeActivityResource.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class IssueTypeActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "longName", required = true) - private String longName; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLongName() { - return longName; - } - - public void setLongName(String longName) { - this.longName = longName; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("IssueTypeActivityResource{"); - sb.append("id=").append(id); - sb.append(", longName='").append(longName).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/LaunchActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/LaunchActivityResource.java deleted file mode 100644 index 013d0e65..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/LaunchActivityResource.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class LaunchActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name", required = true) - private String name; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("LaunchActivityResource{"); - sb.append("id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", name='").append(name).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/PatternTemplateActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/PatternTemplateActivityResource.java deleted file mode 100644 index 5ebd328b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/PatternTemplateActivityResource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ivan Budayeu - */ -public class PatternTemplateActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name", required = true) - private String name; - - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - @Override - public String toString() { - return "PatternTemplateActivityResource{" + "id=" + id + ", projectId=" + projectId + ", name='" + name + '\'' + ", enabled=" + enabled + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/PluginActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/PluginActivityResource.java deleted file mode 100644 index 7832ab7f..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/PluginActivityResource.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.epam.ta.reportportal.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class PluginActivityResource { - @JsonProperty(value = "id", required = true) - private Long id; - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "enabled") - private boolean enabled; - - @JsonProperty(value = "version") - private String version; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - @Override - public String toString() { - return "PluginActivityResource{" + "id=" + id + ", name='" + name + '\'' + ", enabled=" - + enabled + ", version='" + version + '\'' + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/ProjectAttributesActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/ProjectAttributesActivityResource.java deleted file mode 100644 index 8150b4c0..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/ProjectAttributesActivityResource.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author Ihar Kahadouski - */ -public class ProjectAttributesActivityResource { - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "projectName", required = true) - private String projectName; - - @JsonProperty(value = "config") - @JsonDeserialize(as = HashMap.class) - private Map config; - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public Map getConfig() { - return config; - } - - public void setConfig(Map config) { - this.config = config; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ProjectAttributesActivityResource{"); - sb.append("projectId=").append(projectId); - sb.append(", projectName='").append(projectName).append('\''); - sb.append(", config=").append(config); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/TestItemActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/TestItemActivityResource.java deleted file mode 100644 index a36f4e8d..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/TestItemActivityResource.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class TestItemActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name", required = true) - private String name; - - @JsonProperty(value = "issueDescription") - private String issueDescription; - - @JsonProperty(value = "issueTypeLongName") - private String issueTypeLongName; - - @JsonProperty(value = "ignoreAnalyzer") - private boolean ignoreAnalyzer; - - @JsonProperty(value = "autoAnalyzed") - private boolean autoAnalyzed; - - @JsonProperty(value = "tickets") - private String tickets; - - @JsonProperty(value = "status") - private String status; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getIssueDescription() { - return issueDescription; - } - - public void setIssueDescription(String issueDescription) { - this.issueDescription = issueDescription; - } - - public String getIssueTypeLongName() { - return issueTypeLongName; - } - - public void setIssueTypeLongName(String issueTypeLongName) { - this.issueTypeLongName = issueTypeLongName; - } - - public boolean isIgnoreAnalyzer() { - return ignoreAnalyzer; - } - - public void setIgnoreAnalyzer(boolean ignoreAnalyzer) { - this.ignoreAnalyzer = ignoreAnalyzer; - } - - public boolean isAutoAnalyzed() { - return autoAnalyzed; - } - - public void setAutoAnalyzed(boolean autoAnalyzed) { - this.autoAnalyzed = autoAnalyzed; - } - - public String getTickets() { - return tickets; - } - - public void setTickets(String tickets) { - this.tickets = tickets; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("TestItemActivityResource{"); - sb.append("id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", name='").append(name).append('\''); - sb.append(", issueDescription='").append(issueDescription).append('\''); - sb.append(", issueTypeLongName='").append(issueTypeLongName).append('\''); - sb.append(", ignoreAnalyzer=").append(ignoreAnalyzer); - sb.append(", autoAnalyzed=").append(autoAnalyzed); - sb.append(", tickets='").append(tickets).append('\''); - sb.append(", status='").append(status).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserActivityResource.java deleted file mode 100644 index e53b4225..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserActivityResource.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class UserActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "defaultProjectId", required = true) - private Long defaultProjectId; - - @JsonProperty(value = "fullName", required = true) - private String fullName; - - public UserActivityResource() { - } - - public UserActivityResource(Long id, Long defaultProjectId, String fullName) { - this.id = id; - this.defaultProjectId = defaultProjectId; - this.fullName = fullName; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getDefaultProjectId() { - return defaultProjectId; - } - - public void setDefaultProjectId(Long defaultProjectId) { - this.defaultProjectId = defaultProjectId; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UserActivityResource{"); - sb.append("id=").append(id); - sb.append(", defaultProjectId=").append(defaultProjectId); - sb.append(", fullName='").append(fullName).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserFilterActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserFilterActivityResource.java deleted file mode 100644 index 1213daae..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/UserFilterActivityResource.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ihar Kahadouski - */ -public class UserFilterActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name", required = true) - private String name; - - @JsonProperty(value = "description") - private String description; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UserFilterActivityResource{"); - sb.append("id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", name='").append(name).append('\''); - sb.append(", description='").append(description).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/activity/WidgetActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/activity/WidgetActivityResource.java deleted file mode 100644 index c0cbaba3..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/activity/WidgetActivityResource.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.activity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -import java.util.*; - -/** - * @author Ihar Kahadouski - */ -public class WidgetActivityResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "name", required = true) - private String name; - - @JsonProperty(value = "description") - private String description; - - @JsonProperty(value = "itemsCount") - private int itemsCount; - - @JsonProperty(value = "contentFields") - @JsonDeserialize(as = LinkedHashSet.class) - private Set contentFields; - - @JsonProperty(value = "widgetOptions") - @JsonDeserialize(as = LinkedHashMap.class) - private Map widgetOptions; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public int getItemsCount() { - return itemsCount; - } - - public void setItemsCount(int itemsCount) { - this.itemsCount = itemsCount; - } - - public Set getContentFields() { - return contentFields; - } - - public void setContentFields(Set contentFields) { - this.contentFields = contentFields; - } - - public Map getWidgetOptions() { - return widgetOptions; - } - - public void setWidgetOptions(Map widgetOptions) { - this.widgetOptions = widgetOptions; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("WidgetActivityResource{"); - sb.append("id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", name='").append(name).append('\''); - sb.append(", description='").append(description).append('\''); - sb.append(", itemsCount=").append(itemsCount); - sb.append(", contentFields=").append(contentFields); - sb.append(", widgetOptions=").append(widgetOptions); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/AnalyzedItemRs.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/AnalyzedItemRs.java deleted file mode 100644 index 49154d30..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/AnalyzedItemRs.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Objects; - -/** - * @author Pavel Bortnik - */ -public class AnalyzedItemRs { - - @JsonProperty("testItem") - private Long itemId; - - @JsonProperty("relevantItem") - private Long relevantItemId; - - @JsonProperty("issueType") - private String locator; - - public Long getItemId() { - return itemId; - } - - public void setItemId(Long itemId) { - this.itemId = itemId; - } - - public Long getRelevantItemId() { - return relevantItemId; - } - - public void setRelevantItemId(Long relevantItemId) { - this.relevantItemId = relevantItemId; - } - - public String getLocator() { - return locator; - } - - public void setLocator(String locator) { - this.locator = locator; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnalyzedItemRs that = (AnalyzedItemRs) o; - return Objects.equals(itemId, that.itemId); - } - - @Override - public int hashCode() { - return Objects.hash(itemId); - } - - @Override - public String toString() { - return "AnalyzedItemRs{" + "itemId=" + itemId + ", relevantItemId=" + relevantItemId + ", issueTypeLocator=" + locator + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/CleanIndexRq.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/CleanIndexRq.java deleted file mode 100644 index 00573f54..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/CleanIndexRq.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -/** - * @author Ihar Kahadouski - */ -public class CleanIndexRq { - - @JsonProperty("project") - private Long projectId; - - @JsonProperty("ids") - private List logIds; - - public CleanIndexRq() { - } - - public CleanIndexRq(Long projectId, List logIds) { - this.projectId = projectId; - this.logIds = logIds; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public List getLogIds() { - return logIds; - } - - public void setLogIds(List logIds) { - this.logIds = logIds; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRs.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRs.java deleted file mode 100644 index e3f15715..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRs.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -/** - * Represents indexing operation response. - * - * @author Ivan Sharamet - */ -public class IndexRs { - - @JsonProperty("took") - private int took; - - @JsonProperty("errors") - private boolean errors; - - @JsonProperty("items") - private List items; - - public IndexRs() { - } - - public int getTook() { - return took; - } - - public void setTook(int took) { - this.took = took; - } - - public boolean isErrors() { - return errors; - } - - public void setErrors(boolean errors) { - this.errors = errors; - } - - public List getItems() { - return items; - } - - public void setItems(List items) { - this.items = items; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsIndex.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsIndex.java deleted file mode 100644 index cf3b3840..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsIndex.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents detailed index information in indexing operation response. - * - * @author Ivan Sharamet - */ -public class IndexRsIndex { - - public static final int STATUS_UPDATED = 200; - public static final int STATUS_CREATED = 201; - - @JsonProperty("_index") - private String index; - - @JsonProperty("_type") - private String type; - - @JsonProperty("_id") - private String id; - - @JsonProperty("_version") - private int version; - - @JsonProperty("result") - private String result; - - @JsonProperty("created") - private boolean created; - - @JsonProperty("status") - private int status; - - public IndexRsIndex() { - } - - public String getIndex() { - return index; - } - - public void setIndex(String index) { - this.index = index; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public int getVersion() { - return version; - } - - public void setVersion(int version) { - this.version = version; - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result; - } - - public boolean isCreated() { - return created; - } - - public void setCreated(boolean created) { - this.created = created; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public boolean failed() { - return status != STATUS_CREATED && status != STATUS_UPDATED; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsItem.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsItem.java deleted file mode 100644 index d3ae690a..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexRsItem.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents single item in indexing operation response. - * - * @author Ivan Sharamet - */ -public class IndexRsItem { - - @JsonProperty("index") - private IndexRsIndex index; - - public IndexRsItem() { - } - - public IndexRsIndex getIndex() { - return index; - } - - public void setIndex(IndexRsIndex index) { - this.index = index; - } - -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/RelevantItemInfo.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/RelevantItemInfo.java deleted file mode 100644 index a1e13edb..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/RelevantItemInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import java.io.Serializable; - -/** - * @author Ihar Kahadouski - */ -public class RelevantItemInfo implements Serializable { - - private String itemId; - - private String path; - - private String launchId; - - public String getItemId() { - return itemId; - } - - public void setItemId(String itemId) { - this.itemId = itemId; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getLaunchId() { - return launchId; - } - - public void setLaunchId(String launchId) { - this.launchId = launchId; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("RelevantItemInfo{"); - sb.append("itemId='").append(itemId).append('\''); - sb.append(", path='").append(path).append('\''); - sb.append(", launchId='").append(launchId).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRq.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRq.java deleted file mode 100644 index 91b3ce55..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRq.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.epam.ta.reportportal.ws.model.project.AnalyzerConfig; - -import java.util.List; - -/** - * @author Ihar Kahadouski - */ -public class SearchRq { - - private Long launchId; - - private String launchName; - - private Long itemId; - - private Long projectId; - - private List filteredLaunchIds; - - private List logMessages; - - private Integer logLines; - - private AnalyzerConfig analyzerConfig; - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public String getLaunchName() { - return launchName; - } - - public void setLaunchName(String launchName) { - this.launchName = launchName; - } - - public Long getItemId() { - return itemId; - } - - public void setItemId(Long itemId) { - this.itemId = itemId; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public Integer getLogLines() { - return logLines; - } - - public void setLogLines(Integer logLines) { - this.logLines = logLines; - } - - public List getFilteredLaunchIds() { - return filteredLaunchIds; - } - - public void setFilteredLaunchIds(List filteredLaunchIds) { - this.filteredLaunchIds = filteredLaunchIds; - } - - public List getLogMessages() { - return logMessages; - } - - public void setLogMessages(List logMessages) { - this.logMessages = logMessages; - } - - public AnalyzerConfig getAnalyzerConfig() { - return analyzerConfig; - } - - public void setAnalyzerConfig(AnalyzerConfig analyzerConfig) { - this.analyzerConfig = analyzerConfig; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRs.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRs.java deleted file mode 100644 index 0dfe4ea7..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/SearchRs.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2020 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.analyzer; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Objects; - -/** - * @author Ivan Budayeu - */ -public class SearchRs { - - @JsonProperty(value = "logId") - private Long logId; - - @JsonProperty(value = "testItemId") - private Long testItemId; - - public Long getLogId() { - return logId; - } - - public void setLogId(Long logId) { - this.logId = logId; - } - - public Long getTestItemId() { - return testItemId; - } - - public void setTestItemId(Long testItemId) { - this.testItemId = testItemId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRs searchRs = (SearchRs) o; - return Objects.equals(logId, searchRs.logId) && Objects.equals(testItemId, searchRs.testItemId); - } - - @Override - public int hashCode() { - return Objects.hash(logId, testItemId); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/AddWidgetRq.java b/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/AddWidgetRq.java deleted file mode 100644 index 47f85cb4..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/AddWidgetRq.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.dashboard; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class AddWidgetRq { - - @Valid - @NotNull - @JsonProperty(value = "addWidget") - private DashboardResource.WidgetObjectModel addWidget; - - public DashboardResource.WidgetObjectModel getAddWidget() { - return addWidget; - } - - public void setAddWidget(DashboardResource.WidgetObjectModel addWidget) { - this.addWidget = addWidget; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/CreateDashboardRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/CreateDashboardRQ.java deleted file mode 100644 index c2f3a7e3..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/CreateDashboardRQ.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.dashboard; - -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.model.BaseEntityRQ; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * Domain object for creating dashboards. - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -@ApiModel -public class CreateDashboardRQ extends BaseEntityRQ { - - @NotBlankWithSize(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_DASHBOARD_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - @ApiModelProperty(required = true) - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CreateDashboardRQ{"); - sb.append("name='").append(name).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/DashboardResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/DashboardResource.java deleted file mode 100644 index 9f6de351..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/DashboardResource.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.dashboard; - -import com.epam.ta.reportportal.ws.model.OwnedResource; -import com.epam.ta.reportportal.ws.model.Position; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.util.List; -import java.util.Map; - -/** - * Domain model DashBoard resource object. JSON Representation of Report Portal - * domain object. - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -public class DashboardResource extends OwnedResource { - - @NotNull - @JsonProperty(value = "id", required = true) - @ApiModelProperty(required = true) - private Long dashboardId; - - @NotBlank - @Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_DASHBOARD_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - @ApiModelProperty(required = true) - private String name; - - @JsonProperty(value = "widgets") - private List widgets; - - public Long getDashboardId() { - return dashboardId; - } - - public void setDashboardId(Long dashboardId) { - this.dashboardId = dashboardId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getWidgets() { - return widgets; - } - - public void setWidgets(List widgets) { - this.widgets = widgets; - } - - @JsonInclude(Include.NON_NULL) - public static class WidgetObjectModel { - - @JsonProperty(value = "widgetName") - private String name; - - @NotNull - @JsonProperty(value = "widgetId") - private Long widgetId; - - @JsonProperty(value = "widgetType") - private String widgetType; - - @JsonProperty(value = "widgetSize") - private com.epam.ta.reportportal.ws.model.Size widgetSize = new com.epam.ta.reportportal.ws.model.Size(); - - @JsonProperty(value = "widgetPosition") - private Position widgetPosition = new Position(); - - @JsonProperty(value = "widgetOptions") - private Map widgetOptions; - - public WidgetObjectModel() { - } - - public WidgetObjectModel(String name, Long widgetId, com.epam.ta.reportportal.ws.model.Size widgetSize, Position widgetPosition) { - this.name = name; - this.widgetId = widgetId; - this.widgetSize = widgetSize; - this.widgetPosition = widgetPosition; - } - - public Long getWidgetId() { - return widgetId; - } - - public void setWidgetId(Long widgetId) { - this.widgetId = widgetId; - } - - public String getWidgetType() { - return widgetType; - } - - public void setWidgetType(String widgetType) { - this.widgetType = widgetType; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public com.epam.ta.reportportal.ws.model.Size getWidgetSize() { - return widgetSize; - } - - public void setWidgetSize(com.epam.ta.reportportal.ws.model.Size widgetSize) { - this.widgetSize = widgetSize; - } - - public Position getWidgetPosition() { - return widgetPosition; - } - - public void setWidgetPosition(Position widgetPosition) { - this.widgetPosition = widgetPosition; - } - - public Map getWidgetOptions() { - return widgetOptions; - } - - public void setWidgetOptions(Map widgetOptions) { - this.widgetOptions = widgetOptions; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("WidgetObjectModel{"); - sb.append("name='").append(name).append('\''); - sb.append(", widgetId=").append(widgetId); - sb.append(", widgetType='").append(widgetType).append('\''); - sb.append(", widgetSize=").append(widgetSize); - sb.append(", widgetPosition=").append(widgetPosition); - sb.append(", widgetOptions=").append(widgetOptions); - sb.append('}'); - return sb.toString(); - } - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("DashboardResource{"); - sb.append("dashboardId='").append(dashboardId).append('\''); - sb.append(", name='").append(name).append('\''); - sb.append(", widgets=").append(widgets); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/UpdateDashboardRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/UpdateDashboardRQ.java deleted file mode 100644 index fcccd48b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/dashboard/UpdateDashboardRQ.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.dashboard; - -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.model.BaseEntityRQ; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.epam.ta.reportportal.ws.model.dashboard.DashboardResource.WidgetObjectModel; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import java.util.List; - -/** - * Domain object for updating widget positions. - * - * @author Pavel Bortnik - */ -@JsonInclude(Include.NON_NULL) -public class UpdateDashboardRQ extends BaseEntityRQ { - - @NotBlankWithSize(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_DASHBOARD_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - @ApiModelProperty(required = true) - private String name; - - @Valid - @JsonProperty(value = "updateWidgets") - private List widgets; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public void setWidgets(List value) { - this.widgets = value; - } - - public List getWidgets() { - return widgets; - } - - @Override - public String toString() { - return "UpdateDashboardRQ{" + "name='" + name + '\'' + ", widgets=" + widgets + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/BtsConnectionTestRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/BtsConnectionTestRQ.java deleted file mode 100644 index d4c500ab..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/BtsConnectionTestRQ.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.externalsystem; - -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.constraints.NotBlank; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BtsConnectionTestRQ { - - @NotBlank - private String url; - - @NotBlank - private String btsProject; - - public BtsConnectionTestRQ() { - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getBtsProject() { - return btsProject; - } - - public void setBtsProject(String btsProject) { - this.btsProject = btsProject; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/UpdateBugTrackingSystemRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/UpdateBugTrackingSystemRQ.java deleted file mode 100644 index b31678dc..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/externalsystem/UpdateBugTrackingSystemRQ.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.externalsystem; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -/** - * Request model for external system update - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UpdateBugTrackingSystemRQ { - - @JsonProperty(value = "fields") - private List fields; - - public void setFields(List form) { - this.fields = form; - } - - public List getFields() { - return fields; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/filter/BulkUpdateFilterRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/filter/BulkUpdateFilterRQ.java deleted file mode 100644 index 63885877..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/filter/BulkUpdateFilterRQ.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.filter; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotBlank; - -/** - * @deprecated use {@link UpdateUserFilterRQ} in conjunction with - * {@link com.epam.ta.reportportal.ws.model.BulkRQ} - */ -@Deprecated -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BulkUpdateFilterRQ extends UpdateUserFilterRQ { - - @NotBlank - @JsonProperty(value = "id") - private String id; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - @Override - public String toString() { - return "BulkUpdateFilterRQ{" + "id='" + id + '\'' + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/filter/Order.java b/src/main/java/com/epam/ta/reportportal/ws/model/filter/Order.java deleted file mode 100644 index 066e9a02..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/filter/Order.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.filter; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; - -/** - * @author Pavel Bortnik - */ -public class Order { - - @NotNull - @JsonProperty(value = "sortingColumn", required = true) - private String sortingColumnName; - - @NotNull - @JsonProperty(value = "isAsc", required = true) - private boolean isAsc; - - public String getSortingColumnName() { - return sortingColumnName; - } - - public void setSortingColumnName(String sortingColumnName) { - this.sortingColumnName = sortingColumnName; - } - - public boolean getIsAsc() { - return isAsc; - } - - public void setIsAsc(boolean isAsc) { - this.isAsc = isAsc; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Order order = (Order) o; - - if (isAsc != order.isAsc) { - return false; - } - return sortingColumnName != null ? sortingColumnName.equals(order.sortingColumnName) : order.sortingColumnName == null; - } - - @Override - public int hashCode() { - int result = sortingColumnName != null ? sortingColumnName.hashCode() : 0; - result = 31 * result + (isAsc ? 1 : 0); - return result; - } - - @Override - public String toString() { - return "Order{" + "sortingColumnName='" + sortingColumnName + '\'' + ", isAsc=" + isAsc + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UpdateUserFilterRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/filter/UpdateUserFilterRQ.java deleted file mode 100644 index 91dc5fa2..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UpdateUserFilterRQ.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.filter; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.model.BaseEntityRQ; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.*; - -/** - * Domain object for filter actions - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -public class UpdateUserFilterRQ extends BaseEntityRQ { - - @NotBlankWithSize(min = MIN_NAME_LENGTH, max = MAX_USER_FILTER_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - @ApiModelProperty(required = true) - private String name; - - @NotBlank - @JsonProperty(value = "type", required = true) - @In(allowedValues = { "launch", "testItem", "log" }) - @ApiModelProperty(required = true, allowableValues = "launch, testitem, log") - private String objectType; - - @Valid - @NotNull - @Size(min = MIN_COLLECTION_SIZE, max = MAX_NUMBER_OF_FILTER_ENTITIES) - @JsonProperty(value = "conditions", required = true) - @JsonDeserialize(as = LinkedHashSet.class) - @ApiModelProperty(required = true) - private Set conditions; - - @Valid - @NotNull - @Size(min = MIN_COLLECTION_SIZE) - @JsonProperty(value = "orders", required = true) - @ApiModelProperty(required = true) - private List orders; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @NotNull - public Set getConditions() { - return conditions; - } - - public void setConditions(@NotNull Set conditions) { - this.conditions = conditions; - } - - public String getObjectType() { - return objectType; - } - - public void setObjectType(String objectType) { - this.objectType = objectType; - } - - public List getOrders() { - return orders; - } - - public void setOrders(List orders) { - this.orders = orders; - } - - @Override - public String toString() { - return "UpdateUserFilterRQ{" + "name='" + name + '\'' + ", objectType='" + objectType + '\'' + ", conditions=" + conditions - + ", orders=" + orders + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterCondition.java b/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterCondition.java deleted file mode 100644 index fb0a0fa8..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterCondition.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.filter; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotBlank; - -/** - * Filter entity domain model object. - * - * @author Aliaksei_Makayed - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UserFilterCondition { - - @NotBlank - @JsonProperty(value = "filteringField", required = true) - private String filteringField; - - @NotBlank - @JsonProperty(value = "condition", required = true) - private String condition; - - @NotBlank - @JsonProperty(value = "value", required = true) - private String value; - - public UserFilterCondition() { - } - - public UserFilterCondition(String field, String condition, String value) { - this.filteringField = field; - this.condition = condition; - this.value = value; - } - - public String getCondition() { - return condition; - } - - public void setCondition(String condition) { - this.condition = condition; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getFilteringField() { - return filteringField; - } - - public void setFilteringField(String filteringField) { - this.filteringField = filteringField; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((condition == null) ? 0 : condition.hashCode()); - result = prime * result + ((filteringField == null) ? 0 : filteringField.hashCode()); - result = prime * result + ((value == null) ? 0 : value.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - UserFilterCondition other = (UserFilterCondition) obj; - if (condition == null) { - if (other.condition != null) { - return false; - } - } else if (!condition.equals(other.condition)) { - return false; - } - if (filteringField == null) { - if (other.filteringField != null) { - return false; - } - } else if (!filteringField.equals(other.filteringField)) { - return false; - } - if (value == null) { - if (other.value != null) { - return false; - } - } else if (!value.equals(other.value)) { - return false; - } - return true; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UserFilterEntity{"); - sb.append("filteringField='").append(filteringField).append('\''); - sb.append(", condition='").append(condition).append('\''); - sb.append(", value='").append(value).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterResource.java deleted file mode 100644 index 5d05511e..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/filter/UserFilterResource.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.filter; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.model.OwnedResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.util.List; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.*; - -/** - * JSON Representation of Report Portal's UserFilter domain object - * - * @author Aliaksei_Makayed - */ - -@JsonInclude(Include.NON_NULL) -public class UserFilterResource extends OwnedResource { - - @NotNull - @JsonProperty(value = "id", required = true) - private Long filterId; - - @NotBlank - @Size(min = MIN_NAME_LENGTH, max = MAX_USER_FILTER_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - private String name; - - @Valid - @NotNull - @Size(min = MIN_COLLECTION_SIZE) - @JsonProperty(value = "conditions", required = true) - private Set conditions; - - @Size(min = MIN_COLLECTION_SIZE) - @JsonProperty(value = "orders", required = true) - private List orders; - - @In(allowedValues = { "launch", "testItem", "log" }) - @NotNull - @JsonProperty(value = "type", required = true) - private String objectType; - - @NotNull - @JsonProperty(value = "owner", required = true) - private String owner; - - public String getOwner() { - return owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Set getConditions() { - return conditions; - } - - public void setConditions(Set conditions) { - this.conditions = conditions; - } - - public List getOrders() { - return orders; - } - - public void setOrders(List orders) { - this.orders = orders; - } - - public Long getFilterId() { - return filterId; - } - - public void setFilterId(Long filterId) { - this.filterId = filterId; - } - - public String getObjectType() { - return objectType; - } - - public void setObjectType(String objectType) { - this.objectType = objectType; - } - - @Override - public String toString() { - return "UserFilterResource{" + "filterId='" + filterId + '\'' + ", name='" + name + '\'' + ", conditions=" + conditions - + ", orders=" + orders + ", objectType='" + objectType + '\'' + ", owner='" + owner + '\'' + "} " + super.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/AuthFlowEnum.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/AuthFlowEnum.java deleted file mode 100644 index c8130287..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/integration/AuthFlowEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.integration; - -/** - * @author Pavel Bortnik - */ -public enum AuthFlowEnum { - OAUTH, - BASIC, - TOKEN, - FORM, - LDAP -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/CreateIntegrationRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/CreateIntegrationRQ.java deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationRQ.java deleted file mode 100644 index 73f116f0..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationRQ.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.integration; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Map; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class IntegrationRQ { - - @JsonProperty("name") - private String name; - - @JsonProperty("integrationParameters") - private Map integrationParams; - - @JsonProperty("enabled") - private Boolean enabled; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Map getIntegrationParams() { - return integrationParams; - } - - public void setIntegrationParams(Map integrationParams) { - this.integrationParams = integrationParams; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationResource.java deleted file mode 100644 index d822a3ba..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationResource.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2021 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.integration; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Date; -import java.util.Map; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class IntegrationResource implements Serializable { - - @JsonProperty("id") - private Long id; - - @JsonProperty("projectId") - private Long projectId; - - @JsonProperty("name") - private String name; - - @JsonProperty("integrationType") - private IntegrationTypeResource integrationType; - - @JsonProperty("integrationParameters") - private Map integrationParams; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("creator") - private String creator; - - @JsonProperty("creationDate") - private Date creationDate; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public IntegrationTypeResource getIntegrationType() { - return integrationType; - } - - public void setIntegrationType(IntegrationTypeResource integrationType) { - this.integrationType = integrationType; - } - - public Map getIntegrationParams() { - return integrationParams; - } - - public void setIntegrationParams(Map integrationParams) { - this.integrationParams = integrationParams; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public String getCreator() { - return creator; - } - - public void setCreator(String creator) { - this.creator = creator; - } - - public Date getCreationDate() { - return creationDate; - } - - public void setCreationDate(Date creationDate) { - this.creationDate = creationDate; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationTypeResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationTypeResource.java deleted file mode 100644 index f9a48fbe..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/integration/IntegrationTypeResource.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.integration; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; -import java.util.Date; -import java.util.Map; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class IntegrationTypeResource implements Serializable { - - @JsonProperty("type") - private Long id; - - @JsonProperty("name") - private String name; - - @JsonProperty("enabled") - private boolean enabled; - - @JsonProperty("authFlow") - private AuthFlowEnum authFlow; - - @JsonProperty("creationDate") - private Date creationDate; - - @JsonProperty("groupType") - private String groupType; - - @JsonProperty("details") - private Map details; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @JsonProperty("enabled") - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public AuthFlowEnum getAuthFlow() { - return authFlow; - } - - public void setAuthFlow(AuthFlowEnum authFlow) { - this.authFlow = authFlow; - } - - public Date getCreationDate() { - return creationDate; - } - - public void setCreationDate(Date creationDate) { - this.creationDate = creationDate; - } - - public String getGroupType() { - return groupType; - } - - public void setGroupType(String groupType) { - this.groupType = groupType; - } - - public Map getDetails() { - return details; - } - - public void setDetails(Map details) { - this.details = details; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/integration/UpdatePluginStateRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/integration/UpdatePluginStateRQ.java deleted file mode 100644 index 26ba4339..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/integration/UpdatePluginStateRQ.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.integration; - -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UpdatePluginStateRQ implements Serializable { - - @NotNull - private Boolean isEnabled; - - public UpdatePluginStateRQ() { - } - - public Boolean getEnabled() { - return isEnabled; - } - - public void setEnabled(Boolean enabled) { - isEnabled = enabled; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - UpdatePluginStateRQ that = (UpdatePluginStateRQ) o; - - return isEnabled != null ? isEnabled.equals(that.isEnabled) : that.isEnabled == null; - } - - @Override - public int hashCode() { - return isEnabled != null ? isEnabled.hashCode() : 0; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/issue/DefineIssueRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/issue/DefineIssueRQ.java deleted file mode 100644 index 58863ca1..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/issue/DefineIssueRQ.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.issue; - -import java.util.List; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Request for test items issue types definition (defect block) - * - * @author Dzianis Shlychkou - * - */ -@JsonInclude(Include.NON_NULL) -public class DefineIssueRQ { - - @NotNull - @Valid - @Size(max = 300) - @JsonProperty(value = "issues", required = true) - private List issues; - - public List getIssues() { - return issues; - } - - public void setIssues(List issues) { - this.issues = issues; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("DefineIssueRQ{"); - sb.append("issues=").append(issues); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/issue/IssueDefinition.java b/src/main/java/com/epam/ta/reportportal/ws/model/issue/IssueDefinition.java deleted file mode 100644 index 0b604940..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/issue/IssueDefinition.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.issue; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -/** - * Test item issue with provided it - * - * @author Dzianis Shlychkou - * - */ -@JsonInclude(Include.NON_NULL) -public class IssueDefinition { - - @NotNull - @JsonProperty(value = "testItemId", required = true) - @ApiModelProperty(required = true) - private Long id; - - @NotNull - @Valid - @JsonProperty(value = "issue", required = true) - private Issue issue; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Issue getIssue() { - return issue; - } - - public void setIssue(Issue issue) { - this.issue = issue; - } - - @Override - public String toString() { - return "IssueDefinition{" + "id=" + id + ", issue=" + issue + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/item/ExternalIssueRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/item/ExternalIssueRQ.java deleted file mode 100644 index 31fa53c4..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/item/ExternalIssueRQ.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.item; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; -import java.util.List; - -/** - * @author Ihar Kahadouski - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public abstract class ExternalIssueRQ { - - @NotEmpty - @Size(max = 300) - @JsonProperty(value = "testItemIds") - private List testItemIds; - - public List getTestItemIds() { - return testItemIds; - } - - public void setTestItemIds(List testItemIds) { - this.testItemIds = testItemIds; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/item/LinkExternalIssueRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/item/LinkExternalIssueRQ.java deleted file mode 100644 index 82c6330d..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/item/LinkExternalIssueRQ.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.item; - -import com.epam.ta.reportportal.ws.model.issue.Issue; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; -import java.util.List; - -/** - * Request model for add link to external system issue - * - * @author Dzmitry_Kavalets - * @author Andrei_Ramanchuk - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class LinkExternalIssueRQ extends ExternalIssueRQ { - - @NotEmpty - @Valid - @Size(max = 300) - @JsonProperty(value = "issues") - @ApiModelProperty(reference = "Issue.ExternalSystemIssue") - private List issues; - - public void setIssues(List values) { - this.issues = values; - } - - public List getIssues() { - return issues; - } - - @Override - public String toString() { - return "LinkExternalIssueRQ{" + "issues=" + issues + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/item/UnlinkExternalIssueRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/item/UnlinkExternalIssueRQ.java deleted file mode 100644 index aad86a7b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/item/UnlinkExternalIssueRQ.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.item; - -import com.epam.ta.reportportal.ws.annotations.NotBlankStringCollection; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; -import java.util.List; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UnlinkExternalIssueRQ extends ExternalIssueRQ { - - @Valid - @NotEmpty - @NotBlankStringCollection - @Size(max = 300) - @JsonProperty(value = "ticketIds") - private List ticketIds; - - public List getTicketIds() { - return ticketIds; - } - - public void setTicketIds(List ticketIds) { - this.ticketIds = ticketIds; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UnlinkExternalIssueRQ{"); - sb.append("ticketIds=").append(ticketIds); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/item/UpdateTestItemRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/item/UpdateTestItemRQ.java deleted file mode 100644 index e15dc78c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/item/UpdateTestItemRQ.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.item; - -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import javax.validation.constraints.Size; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; - -/** - * @author Dzmitry_Kavalets - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UpdateTestItemRQ { - - @Size(max = MAX_PARAMETERS_LENGTH) - @Valid - @JsonProperty(value = "attributes") - private Set attributes; - - @JsonProperty(value = "description") - private String description; - - @JsonProperty(value = "status") - private String status; - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java deleted file mode 100644 index 63a86b94..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/AnalyzeLaunchRQ.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * @author Pavel Bortnik - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class AnalyzeLaunchRQ { - - @NotNull - @JsonProperty(value = "launchId", required = true) - @ApiModelProperty - private Long launchId; - - @NotNull - @JsonProperty(value = "analyzerMode", required = true) - @In(allowedValues = { "all", "launch_name", "current_launch", "previous_launch", "current_and_the_same_name" }) - @ApiModelProperty(allowableValues = "ALL, LAUNCH_NAME, CURRENT_LAUNCH, PREVIOUS_LAUNCH, CURRENT_AND_THE_SAME_NAME") - private String analyzerHistoryMode; - - @NotNull - @JsonProperty(value = "analyzerTypeName", required = true) - @In(allowedValues = { "autoAnalyzer", "patternAnalyzer" }) - @ApiModelProperty(allowableValues = "autoAnalyzer, patternAnalyzer") - private String analyzerTypeName; - - @NotNull - @JsonProperty(value = "analyzeItemsMode", required = true) - @In(allowedValues = { "to_investigate", "auto_analyzed", "manually_analyzed" }) - @ApiModelProperty(allowableValues = "TO_INVESTIGATE, AUTO_ANALYZED, MANUALLY_ANALYZED") - private List analyzeItemsModes; - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public String getAnalyzerHistoryMode() { - return analyzerHistoryMode; - } - - public String getAnalyzerTypeName() { - return analyzerTypeName; - } - - public void setAnalyzerTypeName(String analyzerTypeName) { - this.analyzerTypeName = analyzerTypeName; - } - - public void setAnalyzerHistoryMode(String analyzerHistoryMode) { - this.analyzerHistoryMode = analyzerHistoryMode; - } - - public List getAnalyzeItemsModes() { - return analyzeItemsModes; - } - - public void setAnalyzeItemsModes(List analyzeItemsModes) { - this.analyzeItemsModes = analyzeItemsModes; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/FinishLaunchRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/FinishLaunchRS.java deleted file mode 100644 index b0f9615f..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/FinishLaunchRS.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch; - -import com.epam.ta.reportportal.ws.model.EntryCreatedAsyncRS; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response model of launch start resource - * - * @author Andrei Varabyeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class FinishLaunchRS extends EntryCreatedAsyncRS { - - @JsonProperty("number") - private Long number; - - @JsonProperty("link") - private String link; - - public FinishLaunchRS() { - } - - public FinishLaunchRS(String id, Long number, String link) { - super(id); - this.number = number; - this.link = link; - } - - public Long getNumber() { - return number; - } - - public void setNumber(Long number) { - this.number = number; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("FinishLaunchRS{"); - sb.append("number=").append(number); - sb.append(", link='").append(link).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java deleted file mode 100644 index afca5562..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/LaunchImportRQ.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_NAME_LENGTH; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_LAUNCH_NAME_LENGTH; - -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ; -import com.fasterxml.jackson.annotation.JsonAlias; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import java.util.Date; -import java.util.Set; -import javax.validation.Valid; -import javax.validation.constraints.Size; -import lombok.Data; - -/** - * @author Pavel Bortnik - */ -@Data -public class LaunchImportRQ { - - @JsonProperty(value = "name") - @ApiModelProperty - @Size(min = MIN_LAUNCH_NAME_LENGTH, max = MAX_NAME_LENGTH) - protected String name; - - @JsonProperty(value = "description") - private String description; - - @Size(max = MAX_PARAMETERS_LENGTH) - @Valid - @JsonProperty("attributes") - @JsonAlias({"attributes", "tags"}) - private Set attributes; - - @JsonProperty - @JsonAlias({"startTime", "start_time"}) - @ApiModelProperty - private Date startTime; - - @JsonProperty("mode") - private Mode mode; -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/MergeLaunchesRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/MergeLaunchesRQ.java deleted file mode 100644 index 9f1b112d..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/MergeLaunchesRQ.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch; - -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.util.Date; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; - -@JsonInclude(Include.NON_NULL) -public class MergeLaunchesRQ { - - @NotBlankWithSize(min = ValidationConstraints.MIN_LAUNCH_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - @ApiModelProperty(required = true) - private String name; - - @JsonProperty(value = "description") - private String description; - - @Size(max = MAX_PARAMETERS_LENGTH) - @Valid - @JsonProperty("attributes") - private Set attributes; - - @JsonProperty(value = "startTime") - @ApiModelProperty - private Date startTime; - - @JsonProperty("mode") - private Mode mode; - - @NotEmpty - @JsonProperty(value = "launches", required = true) - @ApiModelProperty(required = true) - private Set launches; - - @JsonProperty(value = "endTime") - @ApiModelProperty - private Date endTime; - - @NotNull - @JsonProperty("mergeType") - @ApiModelProperty(allowableValues = "BASIC, DEEP") - private String mergeStrategyType; - - @JsonProperty(value = "extendSuitesDescription", required = true) - private boolean extendSuitesDescription; - - public String getName() { - return name; - } - - public void setName(@NotNull String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public Date getStartTime() { - return startTime; - } - - public void setStartTime(Date startTime) { - this.startTime = startTime; - } - - public Mode getMode() { - return mode; - } - - public void setMode(Mode mode) { - this.mode = mode; - } - - @NotNull - public Set getLaunches() { - return launches; - } - - public void setLaunches(@NotNull Set launches) { - this.launches = launches; - } - - public Date getEndTime() { - return endTime; - } - - public void setEndTime(Date endTime) { - this.endTime = endTime; - } - - @NotNull - public String getMergeStrategyType() { - return mergeStrategyType; - } - - public void setMergeStrategyType(@NotNull String mergeStrategyType) { - this.mergeStrategyType = mergeStrategyType; - } - - public boolean isExtendSuitesDescription() { - return extendSuitesDescription; - } - - public void setExtendSuitesDescription(boolean extendSuitesDescription) { - this.extendSuitesDescription = extendSuitesDescription; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - MergeLaunchesRQ that = (MergeLaunchesRQ) o; - - if (extendSuitesDescription != that.extendSuitesDescription) { - return false; - } - if (!name.equals(that.name)) { - return false; - } - if (description != null ? !description.equals(that.description) : that.description != null) { - return false; - } - if (attributes != null ? !attributes.equals(that.attributes) : that.attributes != null) { - return false; - } - if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) { - return false; - } - if (mode != that.mode) { - return false; - } - if (!launches.equals(that.launches)) { - return false; - } - if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) { - return false; - } - return mergeStrategyType.equals(that.mergeStrategyType); - } - - @Override - public int hashCode() { - int result = name.hashCode(); - result = 31 * result + (description != null ? description.hashCode() : 0); - result = 31 * result + (attributes != null ? attributes.hashCode() : 0); - result = 31 * result + (startTime != null ? startTime.hashCode() : 0); - result = 31 * result + (mode != null ? mode.hashCode() : 0); - result = 31 * result + launches.hashCode(); - result = 31 * result + (endTime != null ? endTime.hashCode() : 0); - result = 31 * result + mergeStrategyType.hashCode(); - result = 31 * result + (extendSuitesDescription ? 1 : 0); - return result; - } - - @Override - public String toString() { - return "MergeLaunchesRQ{" + "name='" + name + '\'' + ", description='" + description + '\'' + ", attributes=" + attributes - + ", startTime=" + startTime + ", mode=" + mode + ", launches=" + launches + ", endTime=" + endTime - + ", mergeStrategyType='" + mergeStrategyType + '\'' + ", extendSuitesDescription=" + extendSuitesDescription + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/UpdateLaunchRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/UpdateLaunchRQ.java deleted file mode 100644 index 68e2b0b7..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/UpdateLaunchRQ.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch; - -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.Size; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_PARAMETERS_LENGTH; - -/** - * Domain object for updating launch object. - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -public class UpdateLaunchRQ { - - @JsonProperty("mode") - @ApiModelProperty(allowableValues = "DEFAULT, DEBUG") - private Mode mode; - - @JsonProperty("description") - private String description; - - @Size(max = MAX_PARAMETERS_LENGTH) - @Valid - @JsonProperty("attributes") - private Set attributes; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public Mode getMode() { - return mode; - } - - public void setMode(Mode mode) { - this.mode = mode; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UpdateLaunchRQ{"); - sb.append("mode=").append(mode); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java deleted file mode 100644 index 92c9057d..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2021 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.launch.cluster; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class CreateClustersRQ { - - @NotNull - @JsonProperty(value = "launchId", required = true) - private Long launchId; - - @JsonProperty(value = "removeNumbers") - private boolean removeNumbers; - - public CreateClustersRQ() { - } - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public boolean isRemoveNumbers() { - return removeNumbers; - } - - public void setRemoveNumbers(boolean removeNumbers) { - this.removeNumbers = removeNumbers; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/log/GetLogsUnderRq.java b/src/main/java/com/epam/ta/reportportal/ws/model/log/GetLogsUnderRq.java deleted file mode 100644 index c17d2473..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/log/GetLogsUnderRq.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.epam.ta.reportportal.ws.model.log; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotNull; -import java.util.List; - -public class GetLogsUnderRq { - - @NotNull - @JsonProperty(value = "itemIds") - private List itemIds; - - @NotNull - @JsonProperty(value = "logLevel") - @ApiModelProperty(allowableValues = "error, warn, info, debug, trace, fatal, unknown") - private String logLevel; - - public GetLogsUnderRq() { - } - - public List getItemIds() { - return itemIds; - } - - public void setItemIds(List itemIds) { - this.itemIds = itemIds; - } - - public String getLogLevel() { - return logLevel; - } - - public void setLogLevel(String logLevel) { - this.logLevel = logLevel; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/log/LogResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/log/LogResource.java deleted file mode 100644 index 999d00a1..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/log/LogResource.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.log; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotNull; -import java.util.Date; - -/** - * JSON Representation of Report Portal's Log domain object - * - * @author Andrei Varabyeu - */ -@JsonInclude(Include.NON_NULL) -public class LogResource { - - @JsonInclude(Include.NON_NULL) - public static class BinaryContent { - - @NotNull - @JsonProperty(value = "id", required = true) - private String binaryDataId; - - @JsonProperty(value = "thumbnailId", required = true) - private String thumbnailId; - - @JsonProperty(value = "contentType", required = true) - private String contentType; - - /** - * @return the binaryDataId - */ - public String getBinaryDataId() { - return binaryDataId; - } - - /** - * @param binaryDataId the binaryDataId to set - */ - public void setBinaryDataId(String binaryDataId) { - this.binaryDataId = binaryDataId; - } - - /** - * @return the thumbnailId - */ - public String getThumbnailId() { - return thumbnailId; - } - - /** - * @param thumbnailId the thumbnailId to set - */ - public void setThumbnailId(String thumbnailId) { - this.thumbnailId = thumbnailId; - } - - /** - * @return the contentType - */ - public String getContentType() { - return contentType; - } - - /** - * @param contentType the contentType to set - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("BinaryContent{"); - sb.append("binaryDataId='").append(binaryDataId).append('\''); - sb.append(", thumbnailId='").append(thumbnailId).append('\''); - sb.append(", contentType='").append(contentType).append('\''); - sb.append('}'); - return sb.toString(); - } - } - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "uuid", required = true) - private String uuid; - - @JsonProperty(value = "time") - private Date logTime; - - @JsonProperty(value = "message") - private String message; - - @JsonProperty(value = "binaryContent") - private BinaryContent binaryContent; - - @JsonProperty(value = "thumbnail") - private String thumbnail; - - @JsonProperty(value = "level") - @ApiModelProperty(allowableValues = "error, warn, info, debug, trace, fatal, unknown") - private String level; - - @JsonProperty(value = "itemId") - private Long itemId; - - @JsonProperty(value = "launchId") - private Long launchId; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Date getLogTime() { - return logTime; - } - - public String getUuid() { - return uuid; - } - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public void setLogTime(Date logTime) { - this.logTime = logTime; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getLevel() { - return level; - } - - public void setLevel(String level) { - this.level = level; - } - - public Long getItemId() { - return itemId; - } - - public void setItemId(Long itemId) { - this.itemId = itemId; - } - - public String getThumbnail() { - return thumbnail; - } - - public void setThumbnail(String thumbnail) { - this.thumbnail = thumbnail; - } - - public void setBinaryContent(BinaryContent binaryContent) { - this.binaryContent = binaryContent; - } - - public BinaryContent getBinaryContent() { - return binaryContent; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("LogResource{"); - sb.append("id=").append(id); - sb.append(", uuid='").append(uuid).append('\''); - sb.append(", logTime=").append(logTime); - sb.append(", message='").append(message).append('\''); - sb.append(", binaryContent=").append(binaryContent); - sb.append(", thumbnail='").append(thumbnail).append('\''); - sb.append(", level='").append(level).append('\''); - sb.append(", itemId=").append(itemId); - sb.append(", launchId=").append(launchId); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRq.java b/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRq.java deleted file mode 100644 index cc45acbb..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRq.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.log; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotNull; - -/** - * @author Ihar Kahadouski - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class SearchLogRq { - - @NotNull - @JsonProperty(value = "searchMode", required = true) - @In(allowedValues = { "launchName", "currentLaunch", "filer" }) - @ApiModelProperty(allowableValues = "currentLaunch, launchName, filter") - private String searchMode; - - private Long filterId; - - public String getSearchMode() { - return searchMode; - } - - public void setSearchMode(String searchMode) { - this.searchMode = searchMode; - } - - public Long getFilterId() { - return filterId; - } - - public void setFilterId(Long filterId) { - this.filterId = filterId; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SearchLogRq{"); - sb.append("searchMode='").append(searchMode).append('\''); - sb.append(", filterId=").append(filterId); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRs.java b/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRs.java deleted file mode 100644 index 92a33161..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/log/SearchLogRs.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.log; - -import com.epam.ta.reportportal.ws.model.issue.Issue; -import com.epam.ta.reportportal.ws.model.item.PathNameResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.Set; - -/** - * @author Ihar Kahadouski - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class SearchLogRs { - - @JsonProperty(value = "launchId") - private Long launchId; - - @JsonProperty(value = "itemId") - private Long itemId; - - @JsonProperty(value = "itemName") - private String itemName; - - @JsonProperty(value = "path") - private String path; - - @JsonProperty(value = "pathNames") - private PathNameResource pathNames; - - @JsonProperty(value = "duration") - private double duration; - - @JsonProperty(value = "status") - private String status; - - @JsonProperty(value = "issue") - private Issue issue; - - @JsonProperty(value = "patternTemplates") - private Set patternTemplates; - - @JsonProperty(value = "logs") - private List logs; - - public static class LogEntry { - private String message; - private String level; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getLevel() { - return level; - } - - public void setLevel(String level) { - this.level = level; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("LogEntry{"); - sb.append("message='").append(message).append('\''); - sb.append(", level='").append(level).append('\''); - sb.append('}'); - return sb.toString(); - } - } - - public Long getLaunchId() { - return launchId; - } - - public void setLaunchId(Long launchId) { - this.launchId = launchId; - } - - public PathNameResource getPathNames() { - return pathNames; - } - - public void setPathNames(PathNameResource pathNames) { - this.pathNames = pathNames; - } - - public Set getPatternTemplates() { - return patternTemplates; - } - - public void setPatternTemplates(Set patternTemplates) { - this.patternTemplates = patternTemplates; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Long getItemId() { - return itemId; - } - - public void setItemId(Long itemId) { - this.itemId = itemId; - } - - public String getItemName() { - return itemName; - } - - public void setItemName(String itemName) { - this.itemName = itemName; - } - - public double getDuration() { - return duration; - } - - public void setDuration(double duration) { - this.duration = duration; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Issue getIssue() { - return issue; - } - - public void setIssue(Issue issue) { - this.issue = issue; - } - - public List getLogs() { - return logs; - } - - public void setLogs(List logs) { - this.logs = logs; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SearchLogRs{"); - sb.append(", launchId=").append(launchId); - sb.append(", itemId=").append(itemId); - sb.append(", itemName='").append(itemName).append('\''); - sb.append(", path='").append(path).append('\''); - sb.append(", pathNames=").append(pathNames); - sb.append(", duration=").append(duration); - sb.append(", status='").append(status).append('\''); - sb.append(", issue=").append(issue); - sb.append(", patternTemplates=").append(patternTemplates); - sb.append(", logs=").append(logs); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/notification/EmailNotificationRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/notification/EmailNotificationRQ.java deleted file mode 100644 index c63123e4..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/notification/EmailNotificationRQ.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2023 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.notification; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; -import javax.validation.constraints.NotNull; - -/** - * @author Andrei Piankouski - */ -public class EmailNotificationRQ { - - @NotNull - @JsonProperty(value = "recipient") - private String recipient; - - @NotNull - @JsonProperty(value = "template") - private String template; - - @JsonProperty(value = "params") - private Map params; - - - public String getRecipient() { - return recipient; - } - - public void setRecipient(String recipient) { - this.recipient = recipient; - } - - public String getTemplate() { - return template; - } - - public void setTemplate(String template) { - this.template = template; - } - - public Map getParams() { - return params; - } - - public void setParams(Map params) { - this.params = params; - } - - @Override - public String toString() { - return "EmailNotificationRQ{" + - "recipient='" + recipient + '\'' + - ", template='" + template + '\'' + - ", params=" + params + - '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/preference/PreferenceResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/preference/PreferenceResource.java deleted file mode 100644 index b1bd1819..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/preference/PreferenceResource.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.preference; - -import com.epam.ta.reportportal.ws.model.filter.UserFilterResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -/** - * JSON representation of report portal domain object - * - * @author Dzmitry_Kavalets - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class PreferenceResource { - - @JsonProperty(value = "userId") - private Long userId; - - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @JsonProperty(value = "filters") - private List filters; - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public List getFilters() { - return filters; - } - - public void setFilters(List filters) { - this.filters = filters; - } - - @Override - public String toString() { - return "PreferenceResource{" + "userId=" + userId + ", projectId=" + projectId + ", filters=" + filters + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/AssignUsersRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/AssignUsersRQ.java deleted file mode 100644 index 1b21c302..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/AssignUsersRQ.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import java.util.Map; - -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Assign users from project request model - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class AssignUsersRQ { - - @NotNull - @JsonProperty(value = "userNames", required = true) - private Map userNames; - - public void setUserNames(Map value) { - this.userNames = value; - } - - public Map getUserNames() { - return userNames; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("AssignUsersRQ{"); - sb.append("userNames=").append(userNames.keySet()); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/CreateProjectRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/CreateProjectRQ.java deleted file mode 100644 index d43503a1..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/CreateProjectRQ.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.PROJECT_NAME_REGEXP; - -/** - * Create project request initial model - * - * @author Hanna_Sukhadolava - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class CreateProjectRQ { - - @NotBlank - @Pattern(regexp = PROJECT_NAME_REGEXP) - @Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH) - @JsonProperty(value = "projectName", required = true) - @ApiModelProperty(required = true) - private String projectName; - - @NotBlank - @JsonProperty(value = "entryType", required = true) - @In(allowedValues = "internal") - @ApiModelProperty(required = true, allowableValues = "INTERNAL") - private String entryType; - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getEntryType() { - return entryType; - } - - public void setEntryType(String value) { - this.entryType = value; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CreateProjectRQ{"); - sb.append("projectName='").append(projectName).append('\''); - sb.append(", entryType='").append(entryType).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/DeleteProjectRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/DeleteProjectRQ.java deleted file mode 100644 index 9881c7fb..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/DeleteProjectRQ.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.PROJECT_NAME_REGEXP; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class DeleteProjectRQ { - - @NotBlank - @JsonProperty(value = "projectName", required = true) - @Pattern(regexp = PROJECT_NAME_REGEXP) - @Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH) - @ApiModelProperty(required = true) - private String projectName; - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - DeleteProjectRQ that = (DeleteProjectRQ) o; - - return projectName.equals(that.projectName); - } - - @Override - public int hashCode() { - return projectName.hashCode(); - } - - @Override - public String toString() { - return "DeleteProjectRQ{" + "projectName='" + projectName + '\'' + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/LaunchesPerUser.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/LaunchesPerUser.java deleted file mode 100644 index ada58262..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/LaunchesPerUser.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Basic representation of launches information per user for specified project
- * Current view is:
- * String:user_id : {String:fullname, Integer:launchesCount}
- * - * @author Andrei_Ramanchuk - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class LaunchesPerUser { - - @JsonProperty(value = "fullName") - private String fullUsername; - - @JsonProperty(value = "count") - private Integer launchCount; - - public LaunchesPerUser() { - } - - public LaunchesPerUser(String fullname, Integer count) { - this.fullUsername = fullname; - this.launchCount = count; - } - - public void setFullUsername(String value) { - this.fullUsername = value; - } - - public String getFullUsername() { - return fullUsername; - } - - public void setLaunchCount(Integer value) { - this.launchCount = value; - } - - public Integer getLaunchCount() { - return launchCount; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectConfiguration.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectConfiguration.java deleted file mode 100644 index 52ab119e..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectConfiguration.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.model.project.config.IssueSubTypeResource; -import com.epam.ta.reportportal.ws.model.project.config.pattern.PatternTemplateResource; -import com.epam.ta.reportportal.ws.model.project.email.ProjectNotificationConfigDTO; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.Map; - -/** - * Project configuration model - * - * @author Pavel Bortnik - */ -@JsonInclude(Include.NON_NULL) -public class ProjectConfiguration { - - @JsonProperty(value = "attributes", required = true) - private Map projectAttributes; - - @JsonProperty(value = "subTypes") - private Map> subTypes; - - @JsonProperty(value = "notificationsConfiguration") - private ProjectNotificationConfigDTO projectConfig; - - @JsonProperty(value = "patterns") - private List patterns; - - public Map getProjectAttributes() { - return projectAttributes; - } - - public void setProjectAttributes(Map projectAttributes) { - this.projectAttributes = projectAttributes; - } - - public Map> getSubTypes() { - return subTypes; - } - - public void setSubTypes(Map> subTypes) { - this.subTypes = subTypes; - } - - public ProjectNotificationConfigDTO getProjectConfig() { - return projectConfig; - } - - public void setProjectConfig(ProjectNotificationConfigDTO projectConfig) { - this.projectConfig = projectConfig; - } - - public List getPatterns() { - return patterns; - } - - public void setPatterns(List patterns) { - this.patterns = patterns; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectInfoResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectInfoResource.java deleted file mode 100644 index c91844c0..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectInfoResource.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.model.ModelViews; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonView; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.util.Date; -import java.util.List; - -/** - * Project info resource representation for responses
- * {@link com.epam.ta.reportportal.ws.model.ModelViews.DefaultView} used as - * default fields output
- * {@link com.epam.ta.reportportal.ws.model.ModelViews.FullProjectInfoView} used - * as extended fields output
- * - * @author Dzmitry_Kavalets - * @author Andrei_Ramanchuk - */ -public class ProjectInfoResource { - - @NotNull - @JsonProperty(value = "id") - private Long projectId; - - @NotBlank - @JsonProperty(value = "projectName") - private String projectName; - - @NotNull - @JsonProperty(value = "usersQuantity") - private Integer usersQuantity; - - @NotNull - @JsonProperty(value = "launchesQuantity") - private Integer launchesQuantity; - - @JsonProperty(value = "launchesPerUser") - @JsonView(ModelViews.FullProjectInfoView.class) - private List launchesPerUser; - - @JsonProperty(value = "uniqueTickets") - @JsonView(ModelViews.FullProjectInfoView.class) - private Integer uniqueTickets; - - @JsonProperty(value = "launchesPerWeek") - @JsonView(ModelViews.FullProjectInfoView.class) - private String launchesPerWeek; - - @NotNull - @JsonProperty(value = "lastRun") - private Date lastRun; - - @NotNull - @JsonProperty(value = "creationDate") - private Date creationDate; - - @JsonProperty(value = "entryType") - private String entryType; - - @JsonProperty(value = "organization") - private String organization; - - public ProjectInfoResource() { - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public Integer getUsersQuantity() { - return usersQuantity; - } - - public void setUsersQuantity(Integer usersQuantity) { - this.usersQuantity = usersQuantity; - } - - public Integer getLaunchesQuantity() { - return launchesQuantity; - } - - public void setLaunchesQuantity(Integer launchesQuantity) { - this.launchesQuantity = launchesQuantity; - } - - public void setLaunchesPerUser(List value) { - this.launchesPerUser = value; - } - - public List getLaunchesPerUser() { - return launchesPerUser; - } - - public void setUniqueTickets(Integer value) { - this.uniqueTickets = value; - } - - public Integer getUniqueTickets() { - return uniqueTickets; - } - - public void setLaunchesPerWeek(String value) { - this.launchesPerWeek = value; - } - - public String getLaunchesPerWeek() { - return launchesPerWeek; - } - - public Date getLastRun() { - return lastRun; - } - - public void setLastRun(Date lastRun) { - this.lastRun = lastRun; - } - - public Date getCreationDate() { - return creationDate; - } - - public void setCreationDate(Date creationDate) { - this.creationDate = creationDate; - } - - public String getEntryType() { - return entryType; - } - - public void setEntryType(String entryType) { - this.entryType = entryType; - } - - public String getOrganization() { - return organization; - } - - public void setOrganization(String organization) { - this.organization = organization; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectResource.java deleted file mode 100644 index a2d32894..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/ProjectResource.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.model.integration.IntegrationResource; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; -import java.util.Date; -import java.util.List; - -/** - * Project resource representation for responses - * - * @author Pavel Bortnik - */ -public class ProjectResource { - - @NotNull - @JsonProperty(value = "projectId", required = true) - private Long projectId; - - @NotNull - @JsonProperty(value = "projectName", required = true) - private String projectName; - - @JsonProperty(value = "entryType", required = true) - private String entryType; - - @NotNull - @JsonProperty(value = "configuration", required = true) - private ProjectConfiguration configuration; - - @JsonProperty(value = "users") - private List users; - - @JsonProperty(value = "integrations") - private List integrations; - - @JsonProperty(value = "organization") - private String organization; - - @JsonProperty(value = "allocatedStorage") - private Long allocatedStorage; - - @NotNull - @JsonProperty(value = "creationDate") - private Date creationDate; - - public Date getCreationDate() { - return creationDate; - } - - public void setCreationDate(Date creationDate) { - this.creationDate = creationDate; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getEntryType() { - return entryType; - } - - public void setEntryType(String entryType) { - this.entryType = entryType; - } - - public void setConfiguration(ProjectConfiguration configuration) { - this.configuration = configuration; - } - - public ProjectConfiguration getConfiguration() { - return configuration; - } - - public List getIntegrations() { - return integrations; - } - - public void setIntegrations(List integrations) { - this.integrations = integrations; - } - - public List getUsers() { - return users; - } - - public void setUsers(List users) { - this.users = users; - } - - public String getOrganization() { - return organization; - } - - public void setOrganization(String organization) { - this.organization = organization; - } - - public Long getAllocatedStorage() { - return allocatedStorage; - } - - public void setAllocatedStorage(Long allocatedStorage) { - this.allocatedStorage = allocatedStorage; - } - - public static class ProjectUser { - - @JsonProperty(value = "login") - private String login; - - @JsonProperty(value = "projectRole") - private String projectRole; - - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public void setProjectRole(String value) { - this.projectRole = value; - } - - public String getProjectRole() { - return projectRole; - } - - @Override - public String toString() { - return "ProjectUser{" + "projectRole='" + projectRole + '\'' + '}'; - } - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/UnassignUsersRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/UnassignUsersRQ.java deleted file mode 100644 index a8c5f8f2..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/UnassignUsersRQ.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotEmpty; -import java.util.List; - -/** - * Un-assign users request template - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UnassignUsersRQ { - - @NotEmpty - @JsonProperty(value = "userNames", required = true) - @ApiModelProperty(required = true) - private List usernames; - - public void setUsernames(List value) { - this.usernames = value; - } - - public List getUsernames() { - return usernames; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UnassignUsersRQ{"); - sb.append("usernames=").append(usernames); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/UniqueErrorConfig.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/UniqueErrorConfig.java deleted file mode 100644 index d16080ce..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/UniqueErrorConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.epam.ta.reportportal.ws.model.project; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UniqueErrorConfig { - - @JsonProperty(value = "isAutoAnalyzerEnabled") - private boolean enabled; - - @JsonProperty(value = "isAutoAnalyzerEnabled") - private boolean removeNumbers; - - public UniqueErrorConfig() { - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public boolean isRemoveNumbers() { - return removeNumbers; - } - - public void setRemoveNumbers(boolean removeNumbers) { - this.removeNumbers = removeNumbers; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/UpdateProjectRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/UpdateProjectRQ.java deleted file mode 100644 index 54ffb7d0..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/UpdateProjectRQ.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project; - -import com.epam.ta.reportportal.ws.model.project.config.ProjectConfigurationUpdate; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import java.util.Map; - -/** - * Update project request model - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UpdateProjectRQ { - - @JsonProperty(value = "users") - private Map userRoles; - - @Valid - @JsonProperty(value = "configuration") - private ProjectConfigurationUpdate configuration; - - /** - * @return the userRoles - */ - public Map getUserRoles() { - return userRoles; - } - - /** - * @param userRoles the userRoles to set - */ - public void setUserRoles(Map userRoles) { - this.userRoles = userRoles; - } - - public ProjectConfigurationUpdate getConfiguration() { - return configuration; - } - - public void setConfiguration(ProjectConfigurationUpdate configuration) { - this.configuration = configuration; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("UpdateProjectRQ{"); - sb.append(", userRoles=").append(userRoles); - sb.append(", configuration=").append(configuration); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/CreateIssueSubTypeRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/CreateIssueSubTypeRQ.java deleted file mode 100644 index 5ee8b4fc..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/CreateIssueSubTypeRQ.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.HEX_COLOR_REGEXP; - -/** - * Request model for new issue sub type for specified project.
- * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class CreateIssueSubTypeRQ { - - @NotBlank - @JsonProperty(value = "typeRef", required = true) - @ApiModelProperty(required = true) - private String typeRef; - - @NotBlank - @Size(min = ValidationConstraints.MIN_SUBTYPE_LONG_NAME, max = ValidationConstraints.MAX_SUBTYPE_LONG_NAME) - @JsonProperty(value = "longName", required = true) - @ApiModelProperty(required = true) - private String longName; - - @NotBlank - @Size(min = ValidationConstraints.MIN_SUBTYPE_SHORT_NAME, max = ValidationConstraints.MAX_SUBTYPE_SHORT_NAME) - @JsonProperty(value = "shortName", required = true) - @ApiModelProperty(required = true) - private String shortName; - - @NotBlank - @Pattern(regexp = HEX_COLOR_REGEXP) - @JsonProperty(value = "color", required = true) - @ApiModelProperty(required = true) - private String color; - - public void setTypeRef(String typeRef) { - this.typeRef = typeRef; - } - - public String getTypeRef() { - return typeRef; - } - - public void setLongName(String longName) { - this.longName = longName; - } - - public String getLongName() { - return longName; - } - - public void setShortName(String shortName) { - this.shortName = shortName; - } - - public String getShortName() { - return shortName; - } - - public void setColor(String color) { - this.color = color; - } - - public String getColor() { - return color; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeCreatedRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeCreatedRS.java deleted file mode 100644 index ecec8493..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeCreatedRS.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.epam.ta.reportportal.ws.model.EntryCreatedRS; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class IssueSubTypeCreatedRS extends EntryCreatedRS { - - @JsonProperty(value = "locator") - private String locator; - - public IssueSubTypeCreatedRS() { - } - - public IssueSubTypeCreatedRS(Long id, String locator) { - super(id); - this.locator = locator; - } - - public String getLocator() { - return locator; - } - - public void setLocator(String locator) { - this.locator = locator; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeResource.java deleted file mode 100644 index a503babf..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/IssueSubTypeResource.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Issue sub-type resource representation - * - * @author Andrei_Ramanchuk - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class IssueSubTypeResource { - - @JsonProperty(value = "id") - private Long id; - - @JsonProperty(value = "locator") - private String locator; - - @JsonProperty(value = "typeRef") - private String typeRef; - - @JsonProperty(value = "longName") - private String longName; - - @JsonProperty(value = "shortName") - private String shortName; - - @JsonProperty(value = "color") - private String color; - - public IssueSubTypeResource() { - - } - - public IssueSubTypeResource(Long id, String locator, String typeRef, String longName, String shortName, String color) { - this.id = id; - this.locator = locator; - this.typeRef = typeRef; - this.longName = longName; - this.shortName = shortName; - this.color = color; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLocator() { - return locator; - } - - public void setLocator(String locator) { - this.locator = locator; - } - - public String getTypeRef() { - return typeRef; - } - - public void setTypeRef(String typeRef) { - this.typeRef = typeRef; - } - - public String getLongName() { - return longName; - } - - public void setLongName(String longName) { - this.longName = longName; - } - - public String getShortName() { - return shortName; - } - - public void setShortName(String shortName) { - this.shortName = shortName; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectConfigurationUpdate.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectConfigurationUpdate.java deleted file mode 100644 index 3f9c6c9b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectConfigurationUpdate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.epam.ta.reportportal.ws.annotations.NotNullMapValue; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; -import java.util.Map; - -/** - * Project configuration model - * - * @author Ivan Budayeu - */ -@JsonInclude(Include.NON_NULL) -public class ProjectConfigurationUpdate { - - @NotNull - @NotNullMapValue - @JsonProperty(value = "attributes", required = true) - private Map projectAttributes; - - public Map getProjectAttributes() { - return projectAttributes; - } - - public void setProjectAttributes(Map projectAttributes) { - this.projectAttributes = projectAttributes; - } - -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectSettingsResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectSettingsResource.java deleted file mode 100644 index eb7d11f1..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/ProjectSettingsResource.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.Map; - -/** - * Project settings resource output - * - * @author Andrei_Ramanchuk - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ProjectSettingsResource { - - @JsonProperty(value = "project", required = true) - private Long projectId; - - @JsonProperty(value = "subTypes", required = true) - private Map> subTypes; - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public void setSubTypes(Map> types) { - this.subTypes = types; - } - - public Map> getSubTypes() { - return subTypes; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateIssueSubTypeRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateIssueSubTypeRQ.java deleted file mode 100644 index 0403b018..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateIssueSubTypeRQ.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ -/* - * This file is part of Report Portal. - * - * Report Portal is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Report Portal is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Report Portal. If not, see . - */ -package com.epam.ta.reportportal.ws.model.project.config; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; -import java.util.List; - -/** - * Request model for existing issue sub type update for specified project.
- * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UpdateIssueSubTypeRQ { - - @Valid - @NotEmpty - @JsonProperty(value = "ids", required = true) - @ApiModelProperty(required = true) - private List ids; - - public UpdateIssueSubTypeRQ() { - } - - public void setIds(List values) { - this.ids = values; - } - - public List getIds() { - return ids; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateOneIssueSubTypeRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateOneIssueSubTypeRQ.java deleted file mode 100644 index 6669eee3..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/UpdateOneIssueSubTypeRQ.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.HEX_COLOR_REGEXP; - -/** - * One settings sub-type update request representation - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UpdateOneIssueSubTypeRQ { - - @NotBlank - @JsonProperty(value = "locator", required = true) - @ApiModelProperty(required = true) - private String locator; - - @NotBlank - @JsonProperty(value = "typeRef", required = true) - @ApiModelProperty(required = true) - private String typeRef; - - @NotBlank - @JsonProperty(value = "longName") - @Size(min = ValidationConstraints.MIN_SUBTYPE_LONG_NAME, max = ValidationConstraints.MAX_SUBTYPE_LONG_NAME) - private String longName; - - @NotBlank - @JsonProperty(value = "shortName") - @Size(min = ValidationConstraints.MIN_SUBTYPE_SHORT_NAME, max = ValidationConstraints.MAX_SUBTYPE_SHORT_NAME) - private String shortName; - - @NotBlank - @Pattern(regexp = HEX_COLOR_REGEXP) - @JsonProperty(value = "color") - @Size(min = ValidationConstraints.MIN_SUBTYPE_LONG_NAME, max = ValidationConstraints.MAX_SUBTYPE_LONG_NAME) - private String color; - - public UpdateOneIssueSubTypeRQ() { - } - - public String getLocator() { - return locator; - } - - public void setLocator(String locator) { - this.locator = locator; - } - - public void setTypeRef(String typeRef) { - this.typeRef = typeRef; - } - - public String getTypeRef() { - return typeRef; - } - - public void setLongName(String longName) { - this.longName = longName; - } - - public String getLongName() { - return longName; - } - - public void setShortName(String shortName) { - this.shortName = shortName; - } - - public String getShortName() { - return shortName; - } - - public void setColor(String color) { - this.color = color; - } - - public String getColor() { - return color; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/CreatePatternTemplateRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/CreatePatternTemplateRQ.java deleted file mode 100644 index c399a4ae..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/CreatePatternTemplateRQ.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config.pattern; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_ANALYSIS_PATTERN_NAME_LENGTH; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_ANALYSIS_PATTERN_NAME_LENGTH; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class CreatePatternTemplateRQ { - - @NotBlank - @Size(min = MIN_ANALYSIS_PATTERN_NAME_LENGTH, max = MAX_ANALYSIS_PATTERN_NAME_LENGTH) - @JsonProperty(value = "name") - private String name; - - @NotBlank - @JsonProperty(value = "value") - private String value; - - @NotBlank - @JsonProperty(value = "type") - private String type; - - @NotNull - @JsonProperty(value = "enabled") - private Boolean enabled; - - public CreatePatternTemplateRQ() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - @Override - public String toString() { - return "UpdatePatternTemplateRQ{" + "name='" + name + '\'' + ", value='" + value + '\'' + ", type='" + type + '\'' + ", enabled=" + enabled + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/PatternTemplateResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/PatternTemplateResource.java deleted file mode 100644 index d7ed917c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/PatternTemplateResource.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config.pattern; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class PatternTemplateResource { - - @JsonProperty(value = "id") - private Long id; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "value") - private String value; - - @JsonProperty(value = "type") - private String type; - - @JsonProperty(value = "enabled") - private Boolean enabled; - - public PatternTemplateResource() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - @Override - public String toString() { - return "UpdatePatternTemplateRQ{" + "name='" + name + '\'' + ", value='" + value + '\'' + ", type='" + type + '\'' + ", enabled=" - + enabled + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/UpdatePatternTemplateRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/UpdatePatternTemplateRQ.java deleted file mode 100644 index b344fb5f..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/config/pattern/UpdatePatternTemplateRQ.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.config.pattern; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_ANALYSIS_PATTERN_NAME_LENGTH; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_ANALYSIS_PATTERN_NAME_LENGTH; - -/** - * @author Ivan Budayeu - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UpdatePatternTemplateRQ { - - @NotBlank - @Size(min = MIN_ANALYSIS_PATTERN_NAME_LENGTH, max = MAX_ANALYSIS_PATTERN_NAME_LENGTH) - @JsonProperty(value = "name") - private String name; - - @NotNull - @JsonProperty(value = "enabled") - private Boolean enabled; - - public UpdatePatternTemplateRQ() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - @Override - public String toString() { - return "UpdatePatternTemplateRQ{" + "name='" + name + '\'' + ", enabled=" + enabled + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/ProjectNotificationConfigDTO.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/email/ProjectNotificationConfigDTO.java deleted file mode 100644 index 480613ec..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/ProjectNotificationConfigDTO.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.email; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.Valid; -import java.io.Serializable; -import java.util.List; - -/** - * Project notifications configuration object - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class ProjectNotificationConfigDTO implements Serializable { - /** - * Generated SVUID - */ - private static final long serialVersionUID = -961365872944240700L; - - @JsonProperty(value = "enabled") - private boolean enabled; - - @Valid - @JsonProperty(value = "cases") - private List senderCases; - - public ProjectNotificationConfigDTO() { - } - - public ProjectNotificationConfigDTO(boolean enabled, List senderCases) { - this.enabled = enabled; - this.senderCases = senderCases; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public List getSenderCases() { - return senderCases; - } - - public void setSenderCases(List senderCases) { - this.senderCases = senderCases; - } - - @Override - public String toString() { - return "ProjectNotificationConfigDTO{" + "enabled=" + enabled + ", senderCases=" + senderCases + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java b/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java deleted file mode 100644 index ddc3b423..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/project/email/SenderCaseDTO.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.project.email; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.annotations.NotBlankStringCollection; -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import java.io.Serializable; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -/** - * Cases object for notifications sending declarations - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class SenderCaseDTO implements Serializable { - /** - * Generated SVUID - */ - private static final long serialVersionUID = -3546546654348861010L; - - @JsonProperty("id") - private Long id; - - @NotEmpty - @JsonProperty("ruleName") - private String ruleName; - - @NotEmpty - @NotBlankStringCollection - @JsonProperty(value = "recipients") - private List recipients; - - @NotBlank - @JsonProperty(value = "sendCase") - @In(allowedValues = { "always", "failed", "toInvestigate", "more10", "more20", "more50" }) - @ApiModelProperty(allowableValues = "ALWAYS, FAILED, MORE_10, MORE_20, MORE_50") - private String sendCase; - - @NotBlankStringCollection - @JsonProperty(value = "launchNames") - private List launchNames; - - @Valid - @JsonProperty(value = "attributes") - private Set attributes; - - @JsonProperty(value = "enabled") - private boolean enabled; - - @NotBlank - @JsonProperty(value = "attributesOperator") - @In(allowedValues = { "and", "or" }) - @ApiModelProperty(allowableValues = "AND, OR") - private String attributesOperator; - - public SenderCaseDTO() { - } - - public SenderCaseDTO(Long id, String ruleName, List recs, String sendMode, - List laNames, Set attributes, boolean enabled) { - this.id = id; - this.ruleName = ruleName; - this.recipients = recs; - this.sendCase = sendMode; - this.launchNames = laNames; - this.attributes = attributes; - this.enabled = enabled; - } - - /* Getters and setters block */ - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getRuleName() { - return ruleName; - } - - public void setRuleName(String ruleName) { - this.ruleName = ruleName; - } - - public void setRecipients(List recipients) { - this.recipients = recipients; - } - - public List getRecipients() { - return recipients; - } - - public void setSendCase(String value) { - this.sendCase = value; - } - - public String getSendCase() { - return sendCase; - } - - public void setLaunchNames(List value) { - this.launchNames = value; - } - - public List getLaunchNames() { - return launchNames; - } - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public String getAttributesOperator() { - return attributesOperator; - } - - public void setAttributesOperator(String attributesOperator) { - this.attributesOperator = attributesOperator; - } - - /* Auto generated methods */ - @Override - public String toString() { - return "SenderCaseDTO{" + "recipients=" + recipients + ", sendCase='" + sendCase + '\'' + - ", launchNames=" + launchNames + ", attributes=" + attributes + ", enabled=" + enabled + ", attributesOperator=" + attributesOperator + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SenderCaseDTO that = (SenderCaseDTO) o; - return Objects.equals(recipients, that.recipients) && Objects.equals(sendCase, that.sendCase) - && Objects.equals(launchNames, that.launchNames) && Objects.equals(attributes, that.attributes) - && Objects.equals(enabled, that.enabled) && Objects.equals(attributesOperator, that.attributesOperator); - } - - @Override - public int hashCode() { - return Objects.hash(recipients, sendCase, launchNames, attributes, enabled, attributesOperator); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/role/SaveRoleRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/role/SaveRoleRQ.java deleted file mode 100644 index d1e9d91b..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/role/SaveRoleRQ.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.role; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; - -/** - * - * @author Siarhei_Kharlanau - * - */ -@JsonInclude(Include.NON_NULL) -public class SaveRoleRQ { - - @NotNull - @JsonProperty(value = "roleName", required = true) - private String roleName; - - @NotNull - @JsonProperty(value = "permissions", required = true) - private String permissions; - - public String getRoleName() { - return roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public String getPermissions() { - return permissions; - } - - public void setPermissions(String permissions) { - this.permissions = permissions; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("SaveRoleRQ{"); - sb.append("roleName='").append(roleName).append('\''); - sb.append(", permissions='").append(permissions).append('\''); - sb.append('}'); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/settings/AnalyticsResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/settings/AnalyticsResource.java deleted file mode 100644 index bd17fc92..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/settings/AnalyticsResource.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.settings; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -@JsonInclude(Include.NON_NULL) -public class AnalyticsResource implements Serializable { - - private Boolean enabled; - - @NotBlank - private String type; - - public AnalyticsResource() { - } - - public AnalyticsResource(Boolean enabled) { - this.enabled = enabled; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("AnalyticsResource{"); - sb.append(", enabled=").append(enabled); - sb.append(", type='").append(type).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerEmailResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerEmailResource.java deleted file mode 100644 index b337ceeb..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerEmailResource.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.settings; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * Configurable email setting for project object - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class ServerEmailResource implements Serializable { - - /** - * Generated sUID - */ - private static final long serialVersionUID = 2573744596368345366L; - - private boolean enabled = true; - - @NotBlank - private String host; - - private Integer port; - - private String protocol; - - private Boolean authEnabled; - - private Boolean starTlsEnabled; - - private Boolean sslEnabled; - - private String username; - - private String password; - - private String from; - - public ServerEmailResource() { - } - - public ServerEmailResource(Boolean enabled, String host, Integer port, String protocol, Boolean authEnabled, Boolean starTlsEnabled, - Boolean sslEnabled, String username, String password, String from) { - this.enabled = enabled; - this.host = host; - this.port = port; - this.protocol = protocol; - this.authEnabled = authEnabled; - this.starTlsEnabled = starTlsEnabled; - this.sslEnabled = sslEnabled; - this.username = username; - this.password = password; - this.from = from; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public String getHost() { - return host; - } - - public void setHost(String host) { - this.host = host; - } - - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public String getProtocol() { - return protocol; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public Boolean getAuthEnabled() { - return authEnabled; - } - - public void setAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - } - - public Boolean getStarTlsEnabled() { - return starTlsEnabled; - } - - public void setStarTlsEnabled(Boolean starTlsEnabled) { - this.starTlsEnabled = starTlsEnabled; - } - - public Boolean getSslEnabled() { - return sslEnabled; - } - - public void setSslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ServerEmailResource{"); - sb.append("host='").append(host).append('\''); - sb.append(", port=").append(port); - sb.append(", protocol='").append(protocol).append('\''); - sb.append(", authEnabled=").append(authEnabled); - sb.append(", starTlsEnabled=").append(starTlsEnabled); - sb.append(", sslEnabled=").append(sslEnabled); - sb.append(", username='").append(username).append('\''); - sb.append(", password='").append(password).append('\''); - sb.append(", from='").append(from).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerSettingsResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerSettingsResource.java deleted file mode 100644 index a117754a..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/settings/ServerSettingsResource.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.settings; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Map; - -/** - * Global server settings response of stored properties - * - * @author Andrei_Ramanchuk - * - */ -@JsonInclude(Include.NON_NULL) -public class ServerSettingsResource { - - private String profile; - - private boolean active; - - @JsonProperty(value = "serverEmailConfig") - private ServerEmailResource serverEmailResource; - -// private Map oauthConfigs; - - private Map analyticsResource; - - public void setProfile(String id) { - this.profile = id; - } - - public String getProfile() { - return profile; - } - - public void setActive(boolean is) { - this.active = is; - } - - public boolean getActive() { - return active; - } - - public void setServerEmailResource(ServerEmailResource config) { - this.serverEmailResource = config; - } - - public ServerEmailResource getServerEmailResource() { - return serverEmailResource; - } - -// public Map getOauthConfigs() { -// return oauthConfigs; -// } - -// public void setOauthConfigs(Map oauthConfigs) { -// this.oauthConfigs = oauthConfigs; -// } - - public Map getAnalyticsResource() { - return analyticsResource; - } - - public void setAnalyticsResource(Map analyticsResource) { - this.analyticsResource = analyticsResource; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/ChangePasswordRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/ChangePasswordRQ.java deleted file mode 100644 index 92ac6079..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/ChangePasswordRQ.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -/** - * @author Dzmitry_Kavalets - */ - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ChangePasswordRQ { - - @NotBlank - @Size(min = ValidationConstraints.MIN_PASSWORD_LENGTH, max = ValidationConstraints.MAX_PASSWORD_LENGTH) - private String newPassword; - - @NotBlank - @Size(min = ValidationConstraints.MIN_PASSWORD_LENGTH, max = ValidationConstraints.MAX_PASSWORD_LENGTH) - private String oldPassword; - - public String getNewPassword() { - return newPassword; - } - - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } - - public String getOldPassword() { - return oldPassword; - } - - public void setOldPassword(String oldPassword) { - this.oldPassword = oldPassword; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - ChangePasswordRQ that = (ChangePasswordRQ) o; - - if (newPassword != null ? !newPassword.equals(that.newPassword) : that.newPassword != null) { - return false; - } - return !(oldPassword != null ? !oldPassword.equals(that.oldPassword) : that.oldPassword != null); - - } - - @Override - public int hashCode() { - int result = newPassword != null ? newPassword.hashCode() : 0; - result = 31 * result + (oldPassword != null ? oldPassword.hashCode() : 0); - return result; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ChangePasswordRQ{"); - sb.append("newPassword='").append(newPassword).append('\''); //NOSONAR - sb.append(", oldPassword='").append(oldPassword).append('\''); //NOSONAR - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserBidRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserBidRS.java deleted file mode 100644 index 069b6ed8..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserBidRS.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonInclude(Include.NON_NULL) -public class CreateUserBidRS { - - @JsonProperty(value = "message") - private String message; - - @JsonProperty(value = "bid") - private String bid; - - @JsonProperty(value = "backLink") - private String backLink; - - public void setMessage(String value) { - this.message = value; - } - - public String getMessage() { - return message; - } - - public void setBid(String uuid) { - this.bid = uuid; - } - - public String getBid() { - return bid; - } - - public void setBackLink(String link) { - this.backLink = link; - } - - public String getBackLink() { - return backLink; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQ.java deleted file mode 100644 index 0862b925..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQ.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; - -/** - * Request model for user creation (confirmation will be send on email) - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class CreateUserRQ { - - @NotBlank - @JsonProperty(value = "email", required = true) - @ApiModelProperty(required = true) - private String email; - - @NotBlank - @JsonProperty(value = "role", required = true) - @In(allowedValues = { "operator", "customer", "member", "project_manager" }) - @ApiModelProperty(required = true) - private String role; - - @NotBlank - @JsonProperty(value = "defaultProject", required = true) - @ApiModelProperty(required = true) - private String defaultProject; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - public String getDefaultProject() { - return defaultProject; - } - - public void setDefaultProject(String value) { - this.defaultProject = value; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CreateUserRQ{"); - sb.append("email='").append(email).append('\''); - sb.append(", role='").append(role).append('\''); - sb.append(", defaultProject='").append(defaultProject).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQConfirm.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQConfirm.java deleted file mode 100644 index 4db30aae..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQConfirm.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -/** - * Confirmation resource of user creation with user-data - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class CreateUserRQConfirm { - - @NotBlank - @Pattern(regexp = "[a-zA-Z0-9-_.]+") - @Size(min = ValidationConstraints.MIN_LOGIN_LENGTH, max = ValidationConstraints.MAX_LOGIN_LENGTH) - @JsonProperty(value = "login", required = true) - @ApiModelProperty(required = true) - private String login; - - @NotBlank - @Size(min = ValidationConstraints.MIN_PASSWORD_LENGTH, max = ValidationConstraints.MAX_PASSWORD_LENGTH) - @JsonProperty(value = "password", required = true) - @ApiModelProperty(required = true) - private String password; - - @NotBlank - @Pattern(regexp = "[\\pL0-9-_ \\.]+") - @Size(min = ValidationConstraints.MIN_USER_NAME_LENGTH, max = ValidationConstraints.MAX_USER_NAME_LENGTH) - @JsonProperty(value = "fullName", required = true) - @ApiModelProperty(required = true) - private String fullName; - - @NotBlank - @JsonProperty(value = "email", required = true) - @ApiModelProperty(required = true) - private String email; - - public void setLogin(String value) { - this.login = value; - } - - public String getLogin() { - return login; - } - - public void setPassword(String value) { - this.password = value; - } - - public String getPassword() { - return password; - } - - public void setFullName(String value) { - this.fullName = value; - } - - public String getFullName() { - return fullName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CreateUserRQConfirm{"); - sb.append("login='").append(login).append('\''); - sb.append(", password='").append(password).append('\''); - sb.append(", fullName='").append(fullName).append('\''); - sb.append(", email='").append(email).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQFull.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQFull.java deleted file mode 100644 index 29cfe762..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRQFull.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -/** - * Create User request for admin user creation functionality - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class CreateUserRQFull { - - @NotBlank - @Pattern(regexp = "[a-zA-Z0-9-_.]+") - @Size(min = ValidationConstraints.MIN_LOGIN_LENGTH, max = ValidationConstraints.MAX_LOGIN_LENGTH) - @JsonProperty(value = "login", required = true) - @ApiModelProperty(required = true) - private String login; - - @NotBlank - @Size(min = ValidationConstraints.MIN_PASSWORD_LENGTH, max = ValidationConstraints.MAX_PASSWORD_LENGTH) - @JsonProperty(value = "password", required = true) - @ApiModelProperty(required = true) - private String password; - - @NotBlank - @Pattern(regexp = "[\\pL0-9-_ \\.]+") - @Size(min = ValidationConstraints.MIN_USER_NAME_LENGTH, max = ValidationConstraints.MAX_USER_NAME_LENGTH) - @JsonProperty(value = "fullName", required = true) - @ApiModelProperty(required = true) - private String fullName; - - @NotBlank - @JsonProperty(value = "email", required = true) - @ApiModelProperty(required = true) - private String email; - - @NotNull - @JsonProperty(value = "accountRole", required = true) - @In(allowedValues = { "user", "administrator" }) - @ApiModelProperty(required = true, allowableValues = "USER, ADMINISTRATOR") - private String accountRole; - - @NotNull - @JsonProperty(value = "projectRole", required = true) - @In(allowedValues = { "operator", "customer", "member", "project_manager" }) - @ApiModelProperty(required = true, allowableValues = "CUSTOMER, MEMBER, LEAD, PROJECT_MANAGER") - private String projectRole; - - @NotBlank - @JsonProperty(value = "defaultProject", required = true) - @ApiModelProperty(required = true) - private String defaultProject; - - public void setLogin(String value) { - this.login = value; - } - - public String getLogin() { - return login; - } - - public void setPassword(String value) { - this.password = value; - } - - public String getPassword() { - return password; - } - - public void setFullName(String value) { - this.fullName = value; - } - - public String getFullName() { - return fullName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getAccountRole() { - return accountRole; - } - - public void setAccountRole(String role) { - this.accountRole = role; - } - - public String getProjectRole() { - return projectRole; - } - - public void setProjectRole(String role) { - this.projectRole = role; - } - - public String getDefaultProject() { - return defaultProject; - } - - public void setDefaultProject(String value) { - this.defaultProject = value; - } - - @Override - public String toString() { - return "CreateUserRQFull [login=" + login + ", password=" + password + ", fullName=" + fullName + ", email=" + email - + ", projectRole=" + projectRole + ", defaultProject=" + defaultProject + "]"; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRS.java deleted file mode 100644 index 73116ef9..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/CreateUserRS.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.model.WarningAwareRS; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Aliaksandr_Kazantsau - */ -@JsonInclude(Include.NON_NULL) -public class CreateUserRS extends WarningAwareRS { - - @JsonProperty("id") - private Long id; - - @JsonProperty("login") - private String login; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CreateUserRS{"); - sb.append("id=").append(id); - sb.append(", login='").append(login).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/EditUserRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/EditUserRQ.java deleted file mode 100644 index cf9d32ec..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/EditUserRQ.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.annotations.NotBlankString; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -/** - * Edit User request model - * - * @author Aliaksandr_Kazantsau - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class EditUserRQ { - - @NotBlankString - @JsonProperty(value = "email") - private String email; - - @In(allowedValues = { "user", "administrator" }) - @JsonProperty(value = "role") - private String role; - - @NotBlankString - @Size(min = ValidationConstraints.MIN_USER_NAME_LENGTH, max = ValidationConstraints.MAX_USER_NAME_LENGTH) - @Pattern(regexp = "(\\s*[\\pL0-9-_\\.]+\\s*)+") - @JsonProperty(value = "fullName") - private String fullName; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - public void setFullName(String value) { - this.fullName = value; - } - - public String getFullName() { - return fullName; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("EditUserRQ{"); - sb.append("email='").append(email).append('\''); - sb.append(", role='").append(role).append('\''); - sb.append(", fullName='").append(fullName).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/ResetPasswordRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/ResetPasswordRQ.java deleted file mode 100644 index cc2c173d..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/ResetPasswordRQ.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -/** - * @author Dzmitry_Kavalets - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ResetPasswordRQ { - - @NotBlank - @Size(min = ValidationConstraints.MIN_PASSWORD_LENGTH, max = ValidationConstraints.MAX_PASSWORD_LENGTH) - @JsonProperty(value = "password") - @ApiModelProperty(required = true) - private String password; - - @NotBlank - @JsonProperty(value = "uuid") - @ApiModelProperty(required = true) - private String uuid; - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - ResetPasswordRQ that = (ResetPasswordRQ) o; - - if (password != null ? !password.equals(that.password) : that.password != null) { - return false; - } - return !(uuid != null ? !uuid.equals(that.uuid) : that.uuid != null); - - } - - @Override - public int hashCode() { - int result = password != null ? password.hashCode() : 0; - result = 31 * result + (uuid != null ? uuid.hashCode() : 0); - return result; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("RestorePasswordRQ{"); - sb.append("password='").append(password).append('\''); //NOSONAR - sb.append(", uuid='").append(uuid).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/RestorePasswordRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/RestorePasswordRQ.java deleted file mode 100644 index ff14cbc9..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/RestorePasswordRQ.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.NotBlank; - -/** - * @author Dzmitry_Kavalets - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class RestorePasswordRQ { - - @NotBlank - @JsonProperty(value = "email") - @ApiModelProperty(required = true) - private String email; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - RestorePasswordRQ that = (RestorePasswordRQ) o; - - return !(email != null ? !email.equals(that.email) : that.email != null); - - } - - @Override - public int hashCode() { - return email != null ? email.hashCode() : 0; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ResetPasswordRQ{"); - sb.append("email='").append(email).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/SearchUserResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/SearchUserResource.java deleted file mode 100644 index aa7b8346..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/SearchUserResource.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.epam.ta.reportportal.ws.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -@JsonInclude(Include.NON_NULL) -public class SearchUserResource { - - @JsonProperty(value = "id", required = true) - private Long id; - - @JsonProperty(value = "login", required = true) - private String login; - - @JsonProperty(value = "email", required = true) - private String email; - - @JsonProperty(value = "fullName") - private String fullName; - - public SearchUserResource() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/UserBidRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/UserBidRS.java deleted file mode 100644 index 69a8e6e0..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/UserBidRS.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User creation bid response - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UserBidRS { - - @JsonProperty("uuid") - private String uuid; - - @JsonProperty("isActive") - private boolean isActive; - - @JsonProperty("email") - private String email; - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public void setIsActive(boolean value) { - this.isActive = value; - } - - public boolean getIsActive() { - return isActive; - } - - public void setEmail(String value) { - this.email = value; - } - - public String getEmail() { - return email; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/user/UserResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/user/UserResource.java deleted file mode 100644 index c4d9a6f1..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/user/UserResource.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotNull; -import java.util.Map; - -/** - * User resource representation for responses - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class UserResource { - - @NotNull - @JsonProperty(value = "id", required = true) - private Long id; - - @NotNull - @JsonProperty(value = "userId", required = true) - private String userId; - - @JsonProperty(value = "email", required = true) - private String email; - - @JsonProperty(value = "photoId") - private String photoId; - - @JsonProperty(value = "fullName") - private String fullName; - - @JsonProperty(value = "accountType") - private String accountType; - - @JsonProperty(value = "userRole") - private String userRole; - - @JsonProperty(value = "photoLoaded") - private boolean isLoaded; - - @JsonProperty(value = "metadata") - private Object metadata; - - @JsonProperty(value = "assignedProjects") - private Map assignedProjects; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public void setUserId(String value) { - this.userId = value; - } - - public String getUserId() { - return userId; - } - - public void setEmail(String value) { - this.email = value; - } - - public String getEmail() { - return email; - } - - public void setPhotoId(String value) { - this.photoId = value; - } - - public String getPhotoId() { - return photoId; - } - - public void setFullName(String value) { - this.fullName = value; - } - - public String getFullName() { - return fullName; - } - - public void setAccountType(String value) { - this.accountType = value; - } - - public String getAccountType() { - return accountType; - } - - public String getUserRole() { - return userRole; - } - - public void setUserRole(String value) { - this.userRole = value; - } - - public Object getMetadata() { - return metadata; - } - - public void setMetadata(Object metadata) { - this.metadata = metadata; - } - - public void setIsLoaded(boolean value) { - this.isLoaded = value; - } - - public boolean getIsLoaded() { - return isLoaded; - } - - public Map getAssignedProjects() { - return assignedProjects; - } - - public void setAssignedProjects(Map assignedProjects) { - this.assignedProjects = assignedProjects; - } - - public static class AssignedProject { - - private String projectRole; - private String entryType; - - public String getEntryType() { - return entryType; - } - - public void setEntryType(String entryType) { - this.entryType = entryType; - } - - public void setProjectRole(String projectRole) { - this.projectRole = projectRole; - } - - public String getProjectRole() { - return projectRole; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("AssignedProject{"); - sb.append("projectRole='").append(projectRole).append('\''); - sb.append('}'); - return sb.toString(); - } - } - - @Override - public String toString() { - return "UserResource{" + "id=" + id + ", userId='" + userId + '\'' + ", email='" + email + '\'' + ", photoId='" + photoId + '\'' - + ", fullName='" + fullName + '\'' + ", accountType='" + accountType + '\'' + ", userRole='" + userRole + '\'' - + ", isLoaded=" + isLoaded + ", metadata=" + metadata + ", assignedProjects=" + assignedProjects + '}'; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/ChartObject.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/ChartObject.java deleted file mode 100644 index d33cee90..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/ChartObject.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.widget; - -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Basic representation for chart object with info for UI - * - * @author Andrei_Ramanchuk - */ -@JsonInclude(Include.NON_NULL) -public class ChartObject { - - @JsonProperty(value = "values") - private Map values; - - @JsonProperty(value = "name") - private String name; - - @JsonProperty(value = "startTime") - private String startTime; - - @JsonProperty(value = "number") - private String number; - - @JsonProperty(value = "id") - private String id; - - public ChartObject() { - } - - public void setId(String id) { - this.id = id; - } - - public String getId() { - return id; - } - - public void setValues(Map values) { - this.values = values; - } - - public Map getValues() { - return values; - } - - public void setName(String value) { - this.name = value; - } - - public String getName() { - return name; - } - - public void setStartTime(String value) { - this.startTime = value; - } - - public String getStartTime() { - return startTime; - } - - public void setNumber(String value) { - this.number = value; - } - - public String getNumber() { - return number; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ChartObject{"); - sb.append("values='").append(values).append('\''); - sb.append(", name='").append(name).append('\''); - sb.append(", startTime='").append(startTime).append('\''); - sb.append(", number='").append(number).append('\''); - sb.append(", id='").append(id).append('\''); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/ContentParameters.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/ContentParameters.java deleted file mode 100644 index fc33378a..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/ContentParameters.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.widget; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; -import java.util.List; -import java.util.Map; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_WIDGET_LIMIT; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_WIDGET_LIMIT; - -/** - * Part of widget domain object. Describe chart parameters - * - * @author Aliaksei_Makayed - */ -@JsonInclude(Include.NON_NULL) -public class ContentParameters { - - // fields for main data(for example: graphs at the chart) - @JsonProperty(value = "contentFields", required = true) - private List contentFields; - - @NotNull - @JsonProperty(value = "itemsCount", required = true) - private int itemsCount; - - @JsonProperty(value = "widgetOptions") - private Map widgetOptions; - - public List getContentFields() { - return contentFields; - } - - public void setContentFields(List contentFields) { - this.contentFields = contentFields; - } - - public int getItemsCount() { - return itemsCount; - } - - public void setItemsCount(int itemsCount) { - this.itemsCount = itemsCount; - } - - public Map getWidgetOptions() { - return widgetOptions; - } - - public void setWidgetOptions(Map widgetOptions) { - this.widgetOptions = widgetOptions; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/MaterializedWidgetType.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/MaterializedWidgetType.java deleted file mode 100644 index b19ac8b2..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/MaterializedWidgetType.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.epam.ta.reportportal.ws.model.widget; - -import javax.annotation.Nullable; -import java.util.Arrays; -import java.util.Optional; - -/** - * @author Pavel Bortnik - */ -public enum MaterializedWidgetType { - - COMPONENT_HEALTH_CHECK_TABLE("componentHealthCheckTable"), - CUMULATIVE_TREND_CHART("cumulative"); - - private final String type; - - MaterializedWidgetType(String type) { - this.type = type; - } - - public String getType() { - return this.type; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/SortEntry.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/SortEntry.java deleted file mode 100644 index 1f38d64c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/SortEntry.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.epam.ta.reportportal.ws.model.widget; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.Serializable; - -/** - * @author Ivan Budayeu - */ -public class SortEntry implements Serializable { - - @JsonProperty(value = "asc") - private boolean asc; - - @JsonProperty(value = "sortingColumn") - private String sortingColumn; - - public SortEntry() { - } - - public boolean isAsc() { - return asc; - } - - public void setAsc(boolean asc) { - this.asc = asc; - } - - public String getSortingColumn() { - return sortingColumn; - } - - public void setSortingColumn(String sortingColumn) { - this.sortingColumn = sortingColumn; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetPreviewRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetPreviewRQ.java deleted file mode 100644 index 70d12d7c..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetPreviewRQ.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.widget; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.annotations.WidgetLimitRange; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * Model object for getting widget preview content - * - * @author Pavel Bortnik - */ - -@JsonInclude(Include.NON_NULL) -public class WidgetPreviewRQ { - - @NotNull - @JsonProperty(value = "widgetType", required = true) - @In(allowedValues = { "oldLineChart", "investigatedTrend", "launchStatistics", "statisticTrend", "casesTrend", "notPassed", - "overallStatistics", "uniqueBugTable", "bugTrend", "activityStream", "launchesComparisonChart", "launchesDurationChart", - "launchesTable", "topTestCases", "flakyTestCases", "passingRateSummary", "passingRatePerLaunch", "productStatus", - "mostTimeConsuming", "cumulative" }) - @ApiModelProperty(required = true, allowableValues = "oldLineChart, investigatedTrend, launchStatistics, statisticTrend," - + " casesTrend, notPassed, overallStatistics, uniqueBugTable, bugTrend, activityStream, launchesComparisonChart," - + " launchesDurationChart, launchesTable, topTestCases, flakyTestCases, passingRateSummary, passingRatePerLaunch," - + " productStatus, mostTimeConsuming, cumulative") - private String widgetType; - - @Valid - @JsonProperty(value = "contentParameters") - private ContentParameters contentParameters; - - @JsonProperty(value = "filterIds") - private List filterIds; - - @NotNull - public String getWidgetType() { - return widgetType; - } - - public void setWidgetType(@NotNull String widgetType) { - this.widgetType = widgetType; - } - - public ContentParameters getContentParameters() { - return contentParameters; - } - - public void setContentParameters(ContentParameters contentParameters) { - this.contentParameters = contentParameters; - } - - public List getFilterIds() { - return filterIds; - } - - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - WidgetPreviewRQ that = (WidgetPreviewRQ) o; - - if (!widgetType.equals(that.widgetType)) { - return false; - } - if (contentParameters != null ? !contentParameters.equals(that.contentParameters) : that.contentParameters != null) { - return false; - } - return filterIds != null ? filterIds.equals(that.filterIds) : that.filterIds == null; - } - - @Override - public int hashCode() { - int result = widgetType.hashCode(); - result = 31 * result + (contentParameters != null ? contentParameters.hashCode() : 0); - result = 31 * result + (filterIds != null ? filterIds.hashCode() : 0); - return result; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetRQ.java deleted file mode 100644 index 5f311033..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetRQ.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.widget; - -import com.epam.ta.reportportal.ws.annotations.In; -import com.epam.ta.reportportal.ws.annotations.NotBlankWithSize; -import com.epam.ta.reportportal.ws.annotations.WidgetLimitRange; -import com.epam.ta.reportportal.ws.model.BaseEntityRQ; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * Domain model object for creating and updating widget - * - * @author Aliaksei_Makayed - */ - -@WidgetLimitRange -@JsonInclude(Include.NON_NULL) -public class WidgetRQ extends BaseEntityRQ { - - @NotBlankWithSize(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_WIDGET_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - private String name; - - @NotNull - @JsonProperty(value = "widgetType", required = true) - @In(allowedValues = { "oldLineChart", "investigatedTrend", "launchStatistics", "statisticTrend", "casesTrend", "notPassed", - "overallStatistics", "uniqueBugTable", "bugTrend", "activityStream", "launchesComparisonChart", "launchesDurationChart", - "launchesTable", "topTestCases", "flakyTestCases", "passingRateSummary", "passingRatePerLaunch", "productStatus", - "mostTimeConsuming", "cumulative", "topPatternTemplates", "componentHealthCheck", "componentHealthCheckTable" }) - @ApiModelProperty(required = true, allowableValues = "oldLineChart, investigatedTrend, launchStatistics, statisticTrend," - + " casesTrend, notPassed, overallStatistics, uniqueBugTable, bugTrend, activityStream, launchesComparisonChart," - + " launchesDurationChart, launchesTable, topTestCases, flakyTestCases, passingRateSummary, passingRatePerLaunch," - + " productStatus, mostTimeConsuming, cumulative, topPatternTemplates, componentHealthCheck, componentHealthCheckTable") - private String widgetType; - - @Valid - @JsonProperty(value = "contentParameters") - private ContentParameters contentParameters; - - @JsonProperty(value = "filterIds") - private List filterIds; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @NotNull - public String getWidgetType() { - return widgetType; - } - - public void setWidgetType(@NotNull String widgetType) { - this.widgetType = widgetType; - } - - public ContentParameters getContentParameters() { - return contentParameters; - } - - public void setContentParameters(ContentParameters contentParameters) { - this.contentParameters = contentParameters; - } - - public List getFilterIds() { - return filterIds; - } - - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - @Override - public String toString() { - return "WidgetRQ{" + "name='" + name + '\'' + ", widgetType='" + widgetType + '\'' + ", contentParameters=" + contentParameters - + ", filterIds=" + filterIds + '}'; - } -} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetResource.java deleted file mode 100644 index e2520df9..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/widget/WidgetResource.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model.widget; - -import com.epam.ta.reportportal.ws.model.OwnedResource; -import com.epam.ta.reportportal.ws.model.ValidationConstraints; -import com.epam.ta.reportportal.ws.model.filter.UserFilterResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.util.List; -import java.util.Map; - -/** - * @author Dzmitry_Kavalets - */ -public class WidgetResource extends OwnedResource { - - @NotNull - @JsonProperty(value = "id", required = true) - private Long widgetId; - - @NotBlank - @Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_WIDGET_NAME_LENGTH) - @JsonProperty(value = "name", required = true) - private String name; - - @NotNull - @JsonProperty(value = "widgetType", required = true) - @ApiModelProperty(required = true, allowableValues = "oldLineChart, investigatedTrend, launchStatistics, statisticTrend," - + " casesTrend, notPassed, overallStatistics, uniqueBugTable, bugTrend, activityStream, launchesComparisonChart," - + " launchesDurationChart, launchesTable, topTestCases, flakyTestCases, passingRateSummary, passingRatePerLaunch," - + " productStatus, mostTimeConsuming, cumulative") - private String widgetType; - - @NotNull - @Valid - @JsonProperty(value = "contentParameters", required = true) - private ContentParameters contentParameters; - - @JsonProperty(value = "appliedFilters") - private List appliedFilters; - - @JsonProperty(value = "content") - private Map content; - - public Long getWidgetId() { - return widgetId; - } - - public void setWidgetId(Long widgetId) { - this.widgetId = widgetId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getAppliedFilters() { - return appliedFilters; - } - - public void setAppliedFilters(List appliedFilters) { - this.appliedFilters = appliedFilters; - } - - @NotNull - public String getWidgetType() { - return widgetType; - } - - public void setWidgetType(@NotNull String widgetType) { - this.widgetType = widgetType; - } - - public ContentParameters getContentParameters() { - return contentParameters; - } - - public void setContentParameters(ContentParameters contentParameters) { - this.contentParameters = contentParameters; - } - - public Map getContent() { - return content; - } - - public void setContent(Map content) { - this.content = content; - } - - @Override - public String toString() { - return "WidgetResource{" + "widgetId=" + widgetId + ", name='" + name + '\'' + ", widgetType='" + widgetType + '\'' - + ", contentParameters=" + contentParameters + ", appliedFilters=" + appliedFilters + ", content=" + content + '}'; - } -} \ No newline at end of file diff --git a/src/test/java/com/epam/ta/reportportal/ws/model/MergeLaunchesSerializerTest.java b/src/test/java/com/epam/ta/reportportal/ws/model/MergeLaunchesSerializerTest.java deleted file mode 100644 index 7ee3ecb2..00000000 --- a/src/test/java/com/epam/ta/reportportal/ws/model/MergeLaunchesSerializerTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource; -import com.epam.ta.reportportal.ws.model.launch.MergeLaunchesRQ; -import com.epam.ta.reportportal.ws.model.launch.Mode; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Assert; -import org.junit.Test; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.Date; - -/** - * @author Pavel Bortnik - */ -public class MergeLaunchesSerializerTest { - - private static final String EXPECTED_JSON = "{\"name\":\"name\"," - + "\"description\":\"description\",\"attributes\":[{\"key\":\"key\",\"value\":\"value\"}],\"startTime\":0,\"mode\":\"DEFAULT\"," - + "\"launches\":[1],\"endTime\":1,\"mergeType\":\"BASIC\",\"extendSuitesDescription\":true}"; - - private ObjectMapper om = new ObjectMapper(); - - @Test - public void testSerializer() throws JsonProcessingException { - MergeLaunchesRQ rq = getMergeLaunches(); - String json = om.writeValueAsString(rq); - Assert.assertEquals("Incorrect serialization result", EXPECTED_JSON, json); - } - - @Test - public void testDeserializer() throws IOException { - MergeLaunchesRQ rq = om.readValue(EXPECTED_JSON.getBytes(StandardCharsets.UTF_8), MergeLaunchesRQ.class); - Assert.assertEquals("Incorrect deserialization result", getMergeLaunches(), rq); - } - - private MergeLaunchesRQ getMergeLaunches() { - MergeLaunchesRQ rq = new MergeLaunchesRQ(); - rq.setName("name"); - rq.setDescription("description"); - rq.setMode(Mode.DEFAULT); - rq.setStartTime(new Date(0)); - ItemAttributeResource itemAttributeResource = new ItemAttributeResource("key", "value"); - rq.setAttributes(Collections.singleton(itemAttributeResource)); - rq.setEndTime(new Date(1)); - rq.setExtendSuitesDescription(true); - rq.setLaunches(Collections.singleton(1L)); - rq.setMergeStrategyType("BASIC"); - return rq; - } - -} diff --git a/src/test/java/com/epam/ta/reportportal/ws/model/PageTest.java b/src/test/java/com/epam/ta/reportportal/ws/model/PageTest.java deleted file mode 100644 index 96315c75..00000000 --- a/src/test/java/com/epam/ta/reportportal/ws/model/PageTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.ws.model; - -import org.hamcrest.CoreMatchers; -import org.junit.Test; - -import static org.junit.Assert.assertThat; - -/** - * Tests for {@link Page.PageMetadata} - * Initially grabbed from Spring's PagedResourcesUnitTest.java - * - * @author Andrei Varabyeu - */ -public class PageTest { - - private static final Page.PageMetadata METADATA = new Page.PageMetadata(10, 1, 200); - - @Test(expected = IllegalArgumentException.class) - public void preventsNegativePageSize() { - new Page.PageMetadata(-1, 0, 0); - } - - @Test(expected = IllegalArgumentException.class) - public void preventsNegativePageNumber() { - new Page.PageMetadata(0, -1, 0); - } - - @Test(expected = IllegalArgumentException.class) - public void preventsNegativeTotalElements() { - new Page.PageMetadata(0, 0, -1); - } - - @Test(expected = IllegalArgumentException.class) - public void preventsNegativeTotalPages() { - new Page.PageMetadata(0, 0, 0, -1); - } - - @Test - public void allowsOneIndexedPages() { - new Page.PageMetadata(10, 1, 0); - } - - @Test - public void calculatesTotalPagesCorrectly() { - assertThat(new Page.PageMetadata(5, 0, 16).getTotalPages(), CoreMatchers.is(4L)); - } -} - diff --git a/src/test/java/com/epam/ta/reportportal/ws/model/validation/TicketsValidationTest.java b/src/test/java/com/epam/ta/reportportal/ws/model/validation/TicketsValidationTest.java deleted file mode 100644 index 94d5161e..00000000 --- a/src/test/java/com/epam/ta/reportportal/ws/model/validation/TicketsValidationTest.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.epam.ta.reportportal.ws.model.validation; - -import com.epam.ta.reportportal.ws.model.FinishTestItemRQ; -import com.epam.ta.reportportal.ws.model.issue.Issue; -import com.epam.ta.reportportal.ws.model.item.LinkExternalIssueRQ; -import com.google.common.collect.Lists; -import org.hamcrest.core.IsEqual; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashSet; -import java.util.Set; - -/** - * @author Pavel Bortnik - */ -public class TicketsValidationTest { - - private static Validator validator; - - @BeforeClass - public static void init() { - validator = Validation.buildDefaultValidatorFactory().getValidator(); - } - - @Test - public void finishIncorrectTicket() { - FinishTestItemRQ finishTestItem = getFinishTestItem(); - - Issue issue = new Issue(); - issue.setIssueType("ti001"); - - Set tickets = new HashSet<>(); - tickets.add(new Issue.ExternalSystemIssue()); - issue.setExternalSystemIssues(tickets); - - finishTestItem.setIssue(issue); - - Set> validate = validator.validate(finishTestItem); - - Assert.assertThat(validate.size(), IsEqual.equalTo(4)); - validate.forEach(it -> Assert.assertEquals(it.getMessage(), "must not be blank")); - } - - @Test - public void finishWithCorrectTicket() { - FinishTestItemRQ finishTestItem = getFinishTestItem(); - - Issue issue = new Issue(); - issue.setIssueType("ti001"); - - Set tickets = new HashSet<>(); - Issue.ExternalSystemIssue ticket = new Issue.ExternalSystemIssue(); - ticket.setTicketId("1234"); - ticket.setBtsUrl("btsUrl"); - ticket.setBtsProject("btsProject"); - ticket.setUrl("btsProject"); - tickets.add(ticket); - issue.setExternalSystemIssues(tickets); - - finishTestItem.setIssue(issue); - - Set> validate = validator.validate(finishTestItem); - - Assert.assertTrue(validate.isEmpty()); - } - - @Test - public void linkEmptyCollections() { - final LinkExternalIssueRQ linkExternalIssueRQ = new LinkExternalIssueRQ(); - linkExternalIssueRQ.setTestItemIds(new ArrayList<>()); - linkExternalIssueRQ.setIssues(new ArrayList<>()); - Set> validate = validator.validate(linkExternalIssueRQ); - - Assert.assertThat(validate.size(), IsEqual.equalTo(2)); - validate.forEach(it -> Assert.assertEquals(it.getMessage(), "must not be empty")); - } - - @Test - public void linkIncorrectTicket() { - LinkExternalIssueRQ linkExternalIssueRQ = new LinkExternalIssueRQ(); - linkExternalIssueRQ.setTestItemIds(Lists.newArrayList(1L)); - - Issue.ExternalSystemIssue ticket = new Issue.ExternalSystemIssue(); - linkExternalIssueRQ.setIssues(Lists.newArrayList(ticket)); - - Set> validate = validator.validate(linkExternalIssueRQ); - - System.out.println(); - - Assert.assertThat(validate.size(), IsEqual.equalTo(4)); - validate.forEach(it -> Assert.assertEquals(it.getMessage(), "must not be blank")); - } - - @Test - public void linkWithCorrectTicket() { - LinkExternalIssueRQ linkExternalIssueRQ = new LinkExternalIssueRQ(); - linkExternalIssueRQ.setTestItemIds(Lists.newArrayList(1L)); - - Issue.ExternalSystemIssue ticket = new Issue.ExternalSystemIssue(); - ticket.setTicketId("1234"); - ticket.setBtsUrl("btsUrl"); - ticket.setBtsProject("btsProject"); - ticket.setUrl("btsProject"); - linkExternalIssueRQ.setIssues(Lists.newArrayList(ticket)); - - Set> validate = validator.validate(linkExternalIssueRQ); - - Assert.assertTrue(validate.isEmpty()); - } - - private FinishTestItemRQ getFinishTestItem() { - FinishTestItemRQ finishTestItemRQ = new FinishTestItemRQ(); - finishTestItemRQ.setStatus("PASSED"); - finishTestItemRQ.setEndTime(new Date()); - return finishTestItemRQ; - } - -} diff --git a/src/test/java/com/epam/ta/reportportal/ws/model/validation/WidgetRqValidatorTest.java b/src/test/java/com/epam/ta/reportportal/ws/model/validation/WidgetRqValidatorTest.java deleted file mode 100644 index a6ec4562..00000000 --- a/src/test/java/com/epam/ta/reportportal/ws/model/validation/WidgetRqValidatorTest.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.epam.ta.reportportal.ws.model.validation; - -import com.epam.ta.reportportal.ws.model.widget.ContentParameters; -import com.epam.ta.reportportal.ws.model.widget.MaterializedWidgetType; -import com.epam.ta.reportportal.ws.model.widget.WidgetRQ; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; -import java.util.Collections; -import java.util.Set; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MAX_WIDGET_LIMIT; -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_WIDGET_LIMIT; - -/** - * @author Pavel Bortnik - */ -public class WidgetRqValidatorTest { - - private static Validator validator; - - @BeforeClass - public static void init() { - validator = Validation.buildDefaultValidatorFactory().getValidator(); - } - - @Test - public void validWidgetRQ() { - WidgetRQ widgetRQ = basicWidgetRq(); - final Set> validate = validator.validate(widgetRQ); - Assert.assertTrue(validate.isEmpty()); - } - - @Test - public void invalidLimitWidgetRQ() { - WidgetRQ widgetRQ = basicWidgetRq(); - widgetRQ.getContentParameters().setItemsCount(601); - final Set> validate = validator.validate(widgetRQ); - Assert.assertEquals(1, validate.size()); - Assert.assertEquals( - "Widget item limit size must be between " + MIN_WIDGET_LIMIT + " and " + MAX_WIDGET_LIMIT, - validate.stream().findFirst().get().getMessage() - ); - } - - @Test - public void validLimitMaterializedView() { - WidgetRQ widgetRQ = basicWidgetRq(); - widgetRQ.setWidgetType(MaterializedWidgetType.COMPONENT_HEALTH_CHECK_TABLE.getType()); - widgetRQ.getContentParameters().setItemsCount(601); - Set> validate = validator.validate(widgetRQ); - Assert.assertTrue(validate.isEmpty()); - } - - private WidgetRQ basicWidgetRq() { - WidgetRQ widgetRQ = new WidgetRQ(); - widgetRQ.setName("testWidget"); - widgetRQ.setWidgetType("componentHealthCheck"); - widgetRQ.setFilterIds(Collections.emptyList()); - widgetRQ.setDescription("testDescription"); - - ContentParameters contentParameters = new ContentParameters(); - contentParameters.setContentFields(Collections.emptyList()); - contentParameters.setItemsCount(100); - contentParameters.setWidgetOptions(Collections.emptyMap()); - - widgetRQ.setContentParameters(contentParameters); - - return widgetRQ; - } - -} From 29ae3e12f65c813b45d9eca1f3cd9683e6647b5d Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Mon, 5 Feb 2024 12:56:08 +0300 Subject: [PATCH 17/19] Return EntryCreatedRS to models --- .../reportportal/ws/model/EntryCreatedRS.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java b/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java new file mode 100644 index 00000000..18e1b7f3 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/EntryCreatedRS.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response when some entry has been created and we need to return ID + * + * @author Andrei Varabyeu + * + */ +@JsonInclude(Include.NON_NULL) +public class EntryCreatedRS { + + @JsonProperty("id") + private Long id; + + public EntryCreatedRS() { + + } + + public EntryCreatedRS(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("EntryCreatedRS{"); + sb.append("id='").append(id).append('\''); + sb.append('}'); + return sb.toString(); + } + +} \ No newline at end of file From c8007931d9c71e347d77d71a2660cb9b31ea4db5 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Mon, 5 Feb 2024 13:21:22 +0300 Subject: [PATCH 18/19] Return models --- .../epam/ta/reportportal/ws/model/Page.java | 139 ++++++++++++++++++ .../launch/cluster/CreateClustersRQ.java | 55 +++++++ 2 files changed, 194 insertions(+) create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/Page.java create mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/Page.java b/src/main/java/com/epam/ta/reportportal/ws/model/Page.java new file mode 100644 index 00000000..4c62a2a5 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/Page.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model; + + +import java.util.Collection; +import java.util.Iterator; + +/** + * Paged response representation + * Re-implementation of Spring's HATEAOS Page implementation to get rid of Spring's deps in model package + * + * @author Andrei Varabyeu + */ +public class Page implements Iterable { + + private final Collection content; + private final PageMetadata page; + + /** + * Visible for deserializer + */ + Page() { + this(null, null); + } + + public Page(Collection content, PageMetadata page) { + this.content = content; + this.page = page; + } + + public Page(Collection content, long size, long number, long totalElements, long totalPages) { + this.content = content; + this.page = new PageMetadata(size, number, totalElements, totalPages); + } + + public Page(Collection content, long size, long number, long totalElements) { + this.content = content; + this.page = new PageMetadata(size, number, totalElements); + } + + public Collection getContent() { + return content; + } + + public PageMetadata getPage() { + return page; + } + + @Override + public Iterator iterator() { + return content.iterator(); + } + + public static class PageMetadata { + long number; + long size; + long totalElements; + long totalPages; + + /** + * Visible for deserializer + */ + PageMetadata(){ + } + + public PageMetadata(long size, long number, long totalElements, long totalPages) { + checkArgument(size > -1, "Size must not be negative!"); + checkArgument(number > -1, "Number must not be negative!"); + checkArgument(totalElements > -1, "Total elements must not be negative!"); + checkArgument(totalPages > -1, "Total pages must not be negative!"); + + this.number = number; + this.size = size; + this.totalElements = totalElements; + this.totalPages = totalPages; + + } + + public PageMetadata(long size, long number, long totalElements) { + this(size, number, totalElements, size == 0 ? 0 : (long) Math.ceil((double) totalElements / (double) size)); + } + + public long getNumber() { + return number; + } + + public long getSize() { + return size; + } + + public long getTotalElements() { + return totalElements; + } + + public long getTotalPages() { + return totalPages; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("PageMetadata{"); + sb.append("number=").append(number); + sb.append(", size=").append(size); + sb.append(", totalElements=").append(totalElements); + sb.append(", totalPages=").append(totalPages); + sb.append('}'); + return sb.toString(); + } + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("Page{"); + sb.append("content=").append(content); + sb.append(", page=").append(page); + sb.append('}'); + return sb.toString(); + } + + private static void checkArgument(boolean expression, String errorMessage) { + if (!expression) { + throw new IllegalArgumentException(errorMessage); + } + } +} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java new file mode 100644 index 00000000..dd0e43a5 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/ws/model/launch/cluster/CreateClustersRQ.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.ws.model.launch.cluster; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.NotNull; + +/** + * @author Ivan Budayeu + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CreateClustersRQ { + + @NotNull + @JsonProperty(value = "launchId", required = true) + private Long launchId; + + @JsonProperty(value = "removeNumbers") + private boolean removeNumbers; + + public CreateClustersRQ() { + } + + public Long getLaunchId() { + return launchId; + } + + public void setLaunchId(Long launchId) { + this.launchId = launchId; + } + + public boolean isRemoveNumbers() { + return removeNumbers; + } + + public void setRemoveNumbers(boolean removeNumbers) { + this.removeNumbers = removeNumbers; + } +} From 095cb705a6d582649635be861d770d076db9dce9 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Mon, 2 Sep 2024 10:42:20 +0300 Subject: [PATCH 19/19] Release 5.12.0 --- .github/workflows/release.yml | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 639dd62e..b0b589ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,8 @@ on: env: GH_USER_NAME: github.actor - SCRIPTS_VERSION: 5.10.0 - RELEASE_VERSION: 5.11.1 + SCRIPTS_VERSION: 5.12.0 + RELEASE_VERSION: 5.12.0 jobs: release: diff --git a/gradle.properties b/gradle.properties index 49ce8f92..5176ac74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=5.11.2 +version=5.12.0 description=EPAM Report portal. REST API model hibernateValidatorVersion=6.1.2.Final validationApiVersion=2.0.1.Final