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 b2aee9cc..80d7d8eb 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 @@ -22,6 +22,9 @@ import io.swagger.annotations.ApiModelProperty; import java.util.Date; import javax.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; /** * JSON Representation of Report Portal's Activity domain object. @@ -29,6 +32,9 @@ * @see HATEOAS Description */ @JsonInclude(Include.NON_NULL) +@Getter +@Setter +@ToString public class ActivityResource { @NotNull @@ -69,104 +75,13 @@ public class ActivityResource { @JsonProperty(value = "projectName") private String projectName; + @JsonProperty(value = "projectKey") + private String projectKey; + @JsonProperty(value = "details") private Object details; @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/ErrorType.java b/src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java index 09d024d5..7d571542 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,11 @@ public enum ErrorType { */ CLUSTER_NOT_FOUND(40428, "Cluster '{}' not found"), + /** + * If specified by id Organization not found + */ + ORGANIZATION_NOT_FOUND(40429, "Organization '{}' not found. Did you use correct Organization ID?"), + /** * Common error in case if object not found */ 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 bc8d871c..d0bc2f29 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 @@ -81,8 +81,9 @@ public class ValidationConstraints { public static final int MIN_NUMBER_OF_LOG_LINES = -1; public static final String HEX_COLOR_REGEXP = "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"; public static final String PROJECT_NAME_REGEXP = "[a-zA-Z0-9-_]+"; + public static final String PROJECT_SLUG_REGEXP = "^[a-z0-9-_]+$"; - private ValidationConstraints() { + private ValidationConstraints() { }