From 25c5166b233712385bbd4f1a9addc986fe768950 Mon Sep 17 00:00:00 2001 From: Pavel Bortnik Date: Tue, 27 Feb 2024 23:05:38 +0300 Subject: [PATCH] EPMRPP-89384 || Move more model classes --- .../ws/model/BulkInfoUpdateRQ.java | 91 ------------------- .../attribute/ItemAttributeResource.java | 90 ------------------ .../attribute/UpdateItemAttributeRQ.java | 58 ------------ 3 files changed, 239 deletions(-) delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/BulkInfoUpdateRQ.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/attribute/ItemAttributeResource.java delete mode 100644 src/main/java/com/epam/ta/reportportal/ws/model/attribute/UpdateItemAttributeRQ.java diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/BulkInfoUpdateRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/BulkInfoUpdateRQ.java deleted file mode 100644 index 8504fc97..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/BulkInfoUpdateRQ.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; - -import com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ; -import java.util.List; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * @author Ihar Kahadouski - */ -public class BulkInfoUpdateRQ { - - @NotNull - @Size(min = 1) - private List ids; - - private Description description; - - @Valid - private List attributes; - - public List getIds() { - return ids; - } - - public void setIds(List ids) { - this.ids = ids; - } - - public Description getDescription() { - return description; - } - - public void setDescription(Description description) { - this.description = description; - } - - public List getAttributes() { - return attributes; - } - - public void setAttributes(List attributes) { - this.attributes = attributes; - } - - public enum Action { - DELETE, - UPDATE, - CREATE - } - - public static class Description { - - String comment; - - Action action; - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public Action getAction() { - return action; - } - - public void setAction(Action action) { - this.action = action; - } - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/attribute/ItemAttributeResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/attribute/ItemAttributeResource.java deleted file mode 100644 index 956e0e5e..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/attribute/ItemAttributeResource.java +++ /dev/null @@ -1,90 +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.attribute; - -import static com.epam.ta.reportportal.ws.model.ValidationConstraints.MIN_ITEM_ATTRIBUTE_VALUE_LENGTH; - -import java.io.Serializable; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -/** - * @author Ihar Kahadouski - */ -public class ItemAttributeResource implements Serializable { - - private String key; - - @NotBlank - @Size(min = MIN_ITEM_ATTRIBUTE_VALUE_LENGTH) - private String value; - - public ItemAttributeResource() { - } - - public ItemAttributeResource(String key, String value) { - this.key = key; - this.value = value; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { - return "ItemAttributeResource{" + "key='" + key + '\'' - + ", value='" + value + '\'' - + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - ItemAttributeResource that = (ItemAttributeResource) o; - - if (key != null ? !key.equals(that.key) : that.key != null) { - return false; - } - return value != null ? value.equals(that.value) : that.value == null; - } - - @Override - public int hashCode() { - int result = key != null ? key.hashCode() : 0; - result = 31 * result + (value != null ? value.hashCode() : 0); - return result; - } -} diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/attribute/UpdateItemAttributeRQ.java b/src/main/java/com/epam/ta/reportportal/ws/model/attribute/UpdateItemAttributeRQ.java deleted file mode 100644 index 84e68ca9..00000000 --- a/src/main/java/com/epam/ta/reportportal/ws/model/attribute/UpdateItemAttributeRQ.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.attribute; - -import com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ; -import javax.validation.Valid; - -/** - * @author Ihar Kahadouski - */ -public class UpdateItemAttributeRQ { - - @Valid - private ItemAttributeResource from; - - @Valid - private ItemAttributeResource to; - - private BulkInfoUpdateRQ.Action action; - - public ItemAttributeResource getFrom() { - return from; - } - - public void setFrom(ItemAttributeResource from) { - this.from = from; - } - - public ItemAttributeResource getTo() { - return to; - } - - public void setTo(ItemAttributeResource to) { - this.to = to; - } - - public BulkInfoUpdateRQ.Action getAction() { - return action; - } - - public void setAction(BulkInfoUpdateRQ.Action action) { - this.action = action; - } -}