Skip to content

Commit

Permalink
Release 5.11.0 (#367)
Browse files Browse the repository at this point in the history
* EPMRPP-86199 || Add common not found error

* EPMRPP-86199 || Add common not found error

* Add common not found Error (#352)

* EPMRPP-86199 || Add common not found error

* EPMRPP-86199 || Add common not found error

* EPMRPP-86221 || Fix missed fields

* EPMRPP-86250 ||  Update Analyzer settings. Provide the base for analysis: Current launch and Current launch+previous

* EPMRPP-86742 add lombok support (#355)

EPMRPP-86742 extended response for launch import

* 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

* EPMRPP-87332 || Send launchNumber to analyzer

* 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

* EPMRPP-87493 || Add description of the field (#360)

* EPMRPP-87271 added ActivityEventResource.subjectId field (#359)

* EPMRPP-87271 added ActivityEventResource.subjectId field

* rc/5.11.0 || Update version

---------

Co-authored-by: Ivan Kustau <[email protected]>
Co-authored-by: Andrei Piankouski <[email protected]>
Co-authored-by: APiankouski <[email protected]>
Co-authored-by: Ivan <[email protected]>
Co-authored-by: Siarhei Hrabko <[email protected]>
  • Loading branch information
6 people authored Dec 15, 2023
1 parent e4881b3 commit 23b933d
Show file tree
Hide file tree
Showing 14 changed files with 319 additions and 343 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=5.10.1
version=5.11.0
description=EPAM Report portal. REST API model
hibernateValidatorVersion=6.1.2.Final
validationApiVersion=2.0.1.Final
Expand All @@ -8,3 +8,4 @@ swaggerAnnotationsVersion=1.6.0
commonsLangVersion=3.9
mockitoJunitJupiter=2.23.0
jacksonVersion=2.10.2
lombokVersion=1.18.30
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@
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
Expand Down Expand Up @@ -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;
}
}

}
21 changes: 13 additions & 8 deletions src/main/java/com/epam/ta/reportportal/ws/model/ErrorType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

}
Original file line number Diff line number Diff line change
@@ -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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 23b933d

Please sign in to comment.