diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityResource.java b/src/main/java/com/epam/ta/reportportal/ws/model/ActivityResource.java
index 5de5b47c..003a7cf2 100644
--- a/src/main/java/com/epam/ta/reportportal/ws/model/ActivityResource.java
+++ b/src/main/java/com/epam/ta/reportportal/ws/model/ActivityResource.java
@@ -21,8 +21,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
-import java.util.Date;
+import java.time.Instant;
import javax.validation.constraints.NotNull;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
/**
* JSON Representation of Report Portal's Activity domain object.
@@ -30,6 +34,10 @@
* @see HATEOAS Description
*/
@JsonInclude(Include.NON_NULL)
+@Getter
+@Setter
+@ToString
+@NoArgsConstructor
public class ActivityResource {
@NotNull
@@ -50,7 +58,7 @@ public class ActivityResource {
@NotNull
@JsonProperty(value = "lastModified", required = true)
@Schema(requiredMode = RequiredMode.REQUIRED)
- private Date lastModified;
+ private Instant lastModified;
@NotNull
@JsonProperty(value = "actionType", required = true)
@@ -76,98 +84,4 @@ public class ActivityResource {
@JsonProperty(value = "objectName")
private String objectName;
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
- }
-
- public Long getLoggedObjectId() {
- return loggedObjectId;
- }
-
- public void setLoggedObjectId(Long loggedObjectId) {
- this.loggedObjectId = loggedObjectId;
- }
-
- public Date getLastModified() {
- return lastModified;
- }
-
- public void setLastModified(Date lastModified) {
- this.lastModified = lastModified;
- }
-
- public String getActionType() {
- return actionType;
- }
-
- public void setActionType(String actionType) {
- this.actionType = actionType;
- }
-
- 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 Object getDetails() {
- return details;
- }
-
- public void setDetails(Object details) {
- this.details = details;
- }
-
- public String getObjectName() {
- return objectName;
- }
-
- public void setObjectName(String objectName) {
- this.objectName = objectName;
- }
-
- @Override
- public String toString() {
- return "ActivityResource{" + "id=" + id
- + ", user='" + user + '\''
- + ", loggedObjectId='" + loggedObjectId + '\''
- + ", lastModified=" + lastModified
- + ", actionType='" + actionType + '\''
- + ", objectType='" + objectType + '\''
- + ", projectId=" + projectId
- + ", projectName='" + projectName + '\''
- + ", objectName='" + objectName + '\''
- + ", details=" + details
- + '}';
- }
}
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 1e471c89..0d0bce3f 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
@@ -19,9 +19,13 @@
import com.epam.ta.reportportal.ws.model.project.AnalyzerConfig;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Instant;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
/**
* Represents launch container in index/analysis request/response.
@@ -29,107 +33,36 @@
* @author Ivan Sharamet
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
+@Getter
+@Setter
+@NoArgsConstructor
public class IndexLaunch {
- @JsonProperty("launchId")
- private Long launchId;
+ @JsonProperty("launchId")
+ private Long launchId;
- @JsonProperty("launchName")
- private String launchName;
+ @JsonProperty("launchName")
+ private String launchName;
- @JsonProperty("launchStartTime")
- private LocalDateTime launchStartTime;
+ @JsonProperty("launchStartTime")
+ private LocalDateTime launchStartTime;
- @JsonProperty("project")
- private Long projectId;
+ @JsonProperty("project")
+ private Long projectId;
- @JsonProperty("analyzerConfig")
- private AnalyzerConfig analyzerConfig;
+ @JsonProperty("analyzerConfig")
+ private AnalyzerConfig analyzerConfig;
- @JsonProperty("testItems")
- private List testItems;
+ @JsonProperty("testItems")
+ private List testItems;
- @JsonProperty("clusters")
- private Map clusters;
+ @JsonProperty("clusters")
+ private Map clusters;
- @JsonProperty("launchNumber")
- private Long launchNumber;
+ @JsonProperty("launchNumber")
+ private Long launchNumber;
- @JsonProperty("previousLaunchId")
- private Long previousLaunchId;
+ @JsonProperty("previousLaunchId")
+ private Long previousLaunchId;
- public IndexLaunch() {
- }
-
- 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 LocalDateTime getLaunchStartTime() {
- return launchStartTime;
- }
-
- public void setLaunchStartTime(LocalDateTime launchStartTime) {
- this.launchStartTime = launchStartTime;
- }
-
- public Long getProjectId() {
- return projectId;
- }
-
- public void setProjectId(Long projectId) {
- this.projectId = projectId;
- }
-
- public AnalyzerConfig getAnalyzerConfig() {
- return analyzerConfig;
- }
-
- public void setAnalyzerConfig(AnalyzerConfig analyzerConfig) {
- this.analyzerConfig = analyzerConfig;
- }
-
- public List getTestItems() {
- return testItems;
- }
-
- public void setTestItems(List testItems) {
- this.testItems = testItems;
- }
-
- public Map getClusters() {
- return clusters;
- }
-
- public void setClusters(Map clusters) {
- this.clusters = clusters;
- }
-
- public Long getLaunchNumber() {
- return launchNumber;
- }
-
- public void setLaunchNumber(Long launchNumber) {
- this.launchNumber = launchNumber;
- }
-
- public Long getPreviousLaunchId() {
- return previousLaunchId;
- }
-
- public void setPreviousLaunchId(Long previousLaunchId) {
- this.previousLaunchId = previousLaunchId;
- }
}
diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLog.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLog.java
index 6df2b996..5d207a12 100644
--- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLog.java
+++ b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexLog.java
@@ -18,8 +18,12 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Instant;
import java.time.LocalDateTime;
import java.util.Objects;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
/**
* Represents log container in index/analysis request/response.
@@ -27,65 +31,26 @@
* @author Ivan Sharamet
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
+@Getter
+@Setter
+@ToString
public class IndexLog {
- @JsonProperty("logId")
- private Long logId;
+ @JsonProperty("logId")
+ private Long logId;
- @JsonProperty("logLevel")
- private int logLevel;
+ @JsonProperty("logLevel")
+ private int logLevel;
- @JsonProperty("logTime")
- private LocalDateTime logTime;
+ @JsonProperty("logTime")
+ private LocalDateTime logTime;
- @JsonProperty("message")
- private String message;
+ @JsonProperty("message")
+ private String message;
- @JsonProperty("clusterId")
- private Long clusterId;
+ @JsonProperty("clusterId")
+ private Long clusterId;
- public IndexLog() {
- }
-
- public Long getLogId() {
- return logId;
- }
-
- public void setLogId(Long logId) {
- this.logId = logId;
- }
-
- public int getLogLevel() {
- return logLevel;
- }
-
- public void setLogLevel(int logLevel) {
- this.logLevel = logLevel;
- }
-
- public LocalDateTime getLogTime() {
- return logTime;
- }
-
- public void setLogTime(LocalDateTime logTime) {
- this.logTime = logTime;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public Long getClusterId() {
- return clusterId;
- }
-
- public void setClusterId(Long clusterId) {
- this.clusterId = clusterId;
- }
@Override
public boolean equals(Object o) {
@@ -104,8 +69,4 @@ public int hashCode() {
return Objects.hash(logLevel, message, clusterId);
}
- @Override
- public String toString() {
- return "IndexLog{" + "logLevel=" + logLevel + ", message='" + message + '\'' + '}';
- }
}
diff --git a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexTestItem.java b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexTestItem.java
index 3daf5429..111df798 100644
--- a/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexTestItem.java
+++ b/src/main/java/com/epam/ta/reportportal/ws/model/analyzer/IndexTestItem.java
@@ -17,124 +17,44 @@
package com.epam.ta.reportportal.ws.model.analyzer;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Instant;
import java.time.LocalDateTime;
-import java.util.Objects;
import java.util.Set;
+import lombok.Data;
+import lombok.NoArgsConstructor;
/**
* Represents test item container in index/analysis request/response.
*
* @author Ivan Sharamet
*/
-public class IndexTestItem {
-
- @JsonProperty("testItemId")
- private Long testItemId;
-
- @JsonProperty("testItemName")
- private String testItemName;
-
- @JsonProperty("issueType")
- private String issueTypeLocator;
-
- private LocalDateTime startTime;
-
- @JsonProperty("logs")
- private Set logs;
-
- @JsonProperty("uniqueId")
- private String uniqueId;
-
- // used for boost item if it was not analyzed by analyzer
- @JsonProperty("isAutoAnalyzed")
- private boolean isAutoAnalyzed;
-
- @JsonProperty("testCaseHash")
- private Integer testCaseHash;
-
- public IndexTestItem() {
- }
- public Long getTestItemId() {
- return testItemId;
- }
-
- public void setTestItemId(Long testItemId) {
- this.testItemId = testItemId;
- }
-
- public String getTestItemName() {
- return testItemName;
- }
-
- public void setTestItemName(String testItemName) {
- this.testItemName = testItemName;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public String getIssueTypeLocator() {
- return issueTypeLocator;
- }
-
- public void setIssueTypeLocator(String issueTypeLocator) {
- this.issueTypeLocator = issueTypeLocator;
- }
-
- public LocalDateTime getStartTime() {
- return startTime;
- }
+@Data
+@NoArgsConstructor
+public class IndexTestItem {
- public void setStartTime(LocalDateTime startTime) {
- this.startTime = startTime;
- }
+ @JsonProperty("testItemId")
+ private Long testItemId;
- public Set getLogs() {
- return logs;
- }
+ @JsonProperty("testItemName")
+ private String testItemName;
- public void setLogs(Set logs) {
- this.logs = logs;
- }
+ @JsonProperty("issueType")
+ private String issueTypeLocator;
- public boolean isAutoAnalyzed() {
- return isAutoAnalyzed;
- }
+ private LocalDateTime startTime;
- public void setAutoAnalyzed(boolean autoAnalyzed) {
- isAutoAnalyzed = autoAnalyzed;
- }
+ @JsonProperty("logs")
+ private Set logs;
- public Integer getTestCaseHash() {
- return testCaseHash;
- }
+ @JsonProperty("uniqueId")
+ private String uniqueId;
- public void setTestCaseHash(Integer testCaseHash) {
- this.testCaseHash = testCaseHash;
- }
+ // used for boost item if it was not analyzed by analyzer
+ @JsonProperty("isAutoAnalyzed")
+ private boolean isAutoAnalyzed;
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- IndexTestItem that = (IndexTestItem) o;
- return isAutoAnalyzed == that.isAutoAnalyzed &&
- Objects.equals(testItemId, that.testItemId) &&
- Objects.equals(issueTypeLocator, that.issueTypeLocator) &&
- Objects.equals(startTime, that.startTime) &&
- Objects.equals(logs, that.logs) &&
- Objects.equals(uniqueId, that.uniqueId) &&
- Objects.equals(testCaseHash, that.testCaseHash);
- }
+ @JsonProperty("testCaseHash")
+ private Integer testCaseHash;
- @Override
- public int hashCode() {
- return Objects.hash(testItemId, issueTypeLocator, startTime, logs, uniqueId, isAutoAnalyzed, testCaseHash);
- }
}