Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-88602 migrate dates to Instant #376

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 10 additions & 96 deletions src/main/java/com/epam/ta/reportportal/ws/model/ActivityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@
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.
*
* @see <a href="http://en.wikipedia.org/wiki/HATEOAS">HATEOAS Description</a>
*/
@JsonInclude(Include.NON_NULL)
@Getter
@Setter
@ToString
@NoArgsConstructor
public class ActivityResource {

@NotNull
Expand All @@ -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)
Expand All @@ -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
+ '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,117 +19,50 @@
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.
*
* @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<IndexTestItem> testItems;
@JsonProperty("testItems")
private List<IndexTestItem> testItems;

@JsonProperty("clusters")
private Map<Long, String> clusters;
@JsonProperty("clusters")
private Map<Long, String> 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<IndexTestItem> getTestItems() {
return testItems;
}

public void setTestItems(List<IndexTestItem> testItems) {
this.testItems = testItems;
}

public Map<Long, String> getClusters() {
return clusters;
}

public void setClusters(Map<Long, String> 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,74 +18,39 @@

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.
*
* @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) {
Expand All @@ -104,8 +69,4 @@ public int hashCode() {
return Objects.hash(logLevel, message, clusterId);
}

@Override
public String toString() {
return "IndexLog{" + "logLevel=" + logLevel + ", message='" + message + '\'' + '}';
}
}
Loading
Loading