summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ActivityLogDto.java55
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/CommitRequestDto.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemCreationDto.java19
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemDto.java58
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/RevisionDto.java35
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/SubmitRequestDto.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionDto.java80
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionRequestDto.java17
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java26
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java90
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java23
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementDescriptorDto.java35
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java83
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java76
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java27
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java14
16 files changed, 156 insertions, 506 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ActivityLogDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ActivityLogDto.java
index a4b688085c..2a7289e259 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ActivityLogDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ActivityLogDto.java
@@ -20,7 +20,12 @@
package org.openecomp.sdcrests.item.types;
import java.util.Date;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.openecomp.sdc.common.util.ValidationUtils;
+@Data
+@NoArgsConstructor
public class ActivityLogDto {
private String id;
@@ -30,54 +35,20 @@ public class ActivityLogDto {
private String user;
private ActivityStatus status;
- public ActivityLogDto() {
+ public void setId(final String id) {
+ this.id = ValidationUtils.sanitizeInputString(id);
}
- public String getId() {
- return id;
+ public void setType(final String type) {
+ this.type = ValidationUtils.sanitizeInputString(type);
}
- public void setId(String id) {
- this.id = id;
+ public void setComment(final String comment) {
+ this.comment = ValidationUtils.sanitizeInputString(comment);
}
- public Date getTimestamp() {
- return timestamp;
+ public void setUser(final String user) {
+ this.user = ValidationUtils.sanitizeInputString(user);
}
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
- }
-
- public ActivityStatus getStatus() {
- return status;
- }
-
- public void setStatus(ActivityStatus status) {
- this.status = status;
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/CommitRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/CommitRequestDto.java
index 821b7713eb..15b08fc5b4 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/CommitRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/CommitRequestDto.java
@@ -19,15 +19,15 @@
*/
package org.openecomp.sdcrests.item.types;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+
+@Data
public class CommitRequestDto {
private String message;
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
+ public void setMessage(final String message) {
+ this.message = ValidationUtils.sanitizeInputString(message);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemCreationDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemCreationDto.java
index dec7c97674..7437aec6e3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemCreationDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemCreationDto.java
@@ -19,24 +19,17 @@
*/
package org.openecomp.sdcrests.item.types;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+
+@Data
public class ItemCreationDto {
private String itemId;
private VersionDto version;
- public String getItemId() {
- return itemId;
- }
-
- public void setItemId(String itemId) {
- this.itemId = itemId;
+ public void setItemId(final String itemId) {
+ this.itemId = ValidationUtils.sanitizeInputString(itemId);
}
- public VersionDto getVersion() {
- return version;
- }
-
- public void setVersion(VersionDto version) {
- this.version = version;
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemDto.java
index 38633fb6f7..34ad19fa7c 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/ItemDto.java
@@ -20,7 +20,10 @@
package org.openecomp.sdcrests.item.types;
import java.util.Map;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+@Data
public class ItemDto {
private String id;
@@ -31,59 +34,28 @@ public class ItemDto {
private String status;
private Map<String, Object> properties;
- public String getId() {
- return id;
+ public void setId(final String id) {
+ this.id = ValidationUtils.sanitizeInputString(id);
}
- public void setId(String id) {
- this.id = id;
+ public void setType(final String type) {
+ this.type = ValidationUtils.sanitizeInputString(type);
}
- public String getType() {
- return type;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setType(String type) {
- this.type = type;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
- public String getName() {
- return name;
+ public void setOwner(final String owner) {
+ this.owner = ValidationUtils.sanitizeInputString(owner);
}
- public void setName(String name) {
- this.name = name;
+ public void setStatus(final String status) {
+ this.status = ValidationUtils.sanitizeInputString(status);
}
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public Map<String, Object> getProperties() {
- return properties;
- }
-
- public void setProperties(Map<String, Object> properties) {
- this.properties = properties;
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/RevisionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/RevisionDto.java
index d7bd88f4be..e115388239 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/RevisionDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/RevisionDto.java
@@ -20,7 +20,10 @@
package org.openecomp.sdcrests.item.types;
import java.util.Date;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+@Data
public class RevisionDto {
private String id;
@@ -28,35 +31,15 @@ public class RevisionDto {
private Date time;
private String user;
- public String getId() {
- return id;
+ public void setId(final String id) {
+ this.id = ValidationUtils.sanitizeInputString(id);
}
- public void setId(String id) {
- this.id = id;
+ public void setMessage(final String message) {
+ this.message = ValidationUtils.sanitizeInputString(message);
}
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
+ public void setUser(final String user) {
+ this.user = ValidationUtils.sanitizeInputString(user);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/SubmitRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/SubmitRequestDto.java
index 3f4b4a94da..aa8ae2c7ae 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/SubmitRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/SubmitRequestDto.java
@@ -19,15 +19,15 @@
*/
package org.openecomp.sdcrests.item.types;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+
+@Data
public class SubmitRequestDto {
private String message;
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
+ public void setMessage(final String message) {
+ this.message = ValidationUtils.sanitizeInputString(message);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionDto.java
index 83884d3a1d..38582beb19 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionDto.java
@@ -21,9 +21,14 @@ package org.openecomp.sdcrests.item.types;
import java.util.Date;
import java.util.Map;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.versioning.dao.types.VersionState;
import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+@Data
+@NoArgsConstructor
public class VersionDto {
private String id;
@@ -36,78 +41,19 @@ public class VersionDto {
private Date modificationTime;
private Map<String, Object> additionalInfo;
- public VersionDto() {
+ public void setId(final String id) {
+ this.id = ValidationUtils.sanitizeInputString(id);
}
- public String getId() {
- return id;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setId(String id) {
- this.id = id;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getBaseId() {
- return baseId;
- }
-
- public void setBaseId(String baseId) {
- this.baseId = baseId;
- }
-
- public VersionStatus getStatus() {
- return status;
- }
-
- public void setStatus(VersionStatus status) {
- this.status = status;
- }
-
- public VersionState getState() {
- return state;
- }
-
- public void setState(VersionState state) {
- this.state = state;
- }
-
- public Date getCreationTime() {
- return creationTime;
- }
-
- public void setCreationTime(Date creationTime) {
- this.creationTime = creationTime;
- }
-
- public Date getModificationTime() {
- return modificationTime;
- }
-
- public void setModificationTime(Date modificationTime) {
- this.modificationTime = modificationTime;
- }
-
- public Map<String, Object> getAdditionalInfo() {
- return additionalInfo;
- }
-
- public void setAdditionalInfo(Map<String, Object> additionalInfo) {
- this.additionalInfo = additionalInfo;
+ public void setBaseId(final String baseId) {
+ this.baseId = ValidationUtils.sanitizeInputString(baseId);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionRequestDto.java
index 81747d4612..628ffd294e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-types/src/main/java/org/openecomp/sdcrests/item/types/VersionRequestDto.java
@@ -19,26 +19,17 @@
*/
package org.openecomp.sdcrests.item.types;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.versioning.types.VersionCreationMethod;
+@Data
public class VersionRequestDto {
private String description;
private VersionCreationMethod creationMethod;
- public String getDescription() {
- return description;
- }
-
public void setDescription(String description) {
- this.description = description;
- }
-
- public VersionCreationMethod getCreationMethod() {
- return creationMethod;
- }
-
- public void setCreationMethod(VersionCreationMethod creationMethod) {
- this.creationMethod = creationMethod;
+ this.description = ValidationUtils.sanitizeInputString(description);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
index 835d6fcbfe..a77c5c8347 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
@@ -21,35 +21,13 @@ package org.openecomp.sdcrests.vendorlicense.types;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
+import lombok.Data;
@Schema(description = "EntitlementPoolEntity")
+@Data
public class EntitlementPoolEntityDto extends EntitlementPoolRequestDto {
private String id;
private Set<String> referencingFeatureGroups;
private String versionUUID;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Set<String> getReferencingFeatureGroups() {
- return referencingFeatureGroups;
- }
-
- public void setReferencingFeatureGroups(Set<String> referencingFeatureGroups) {
- this.referencingFeatureGroups = referencingFeatureGroups;
- }
-
- public String getversionUUID() {
- return versionUUID;
- }
-
- public void setVersionUUID(String versionUUID) {
- this.versionUUID = versionUUID;
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
index 35e6f31e28..6439583d3e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
@@ -19,16 +19,19 @@
*/
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.v3.oas.annotations.media.Schema;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolType;
import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
+@Data
@Schema(description = "EntitlementPoolRequest")
@JsonIgnoreProperties({"time", "aggregationFunction", "entitlementMetric"})
public class EntitlementPoolRequestDto {
@@ -52,83 +55,20 @@ public class EntitlementPoolRequestDto {
private String startDate;
private String expiryDate;
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getManufacturerReferenceNumber() {
- return manufacturerReferenceNumber;
- }
-
- public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
- this.manufacturerReferenceNumber = manufacturerReferenceNumber;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public EntitlementPoolType getType() {
- return type;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setType(EntitlementPoolType type) {
- this.type = type;
+ public void setManufacturerReferenceNumber(final String manufacturerReferenceNumber) {
+ this.manufacturerReferenceNumber = ValidationUtils.sanitizeInputString(manufacturerReferenceNumber);
}
- public Integer getThresholdValue() {
- return thresholdValue;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
- public void setThresholdValue(Integer thresholdValue) {
- this.thresholdValue = thresholdValue;
+ public void setIncrements(final String increments) {
+ this.increments = ValidationUtils.sanitizeInputString(increments);
}
- public ThresholdUnit getThresholdUnits() {
- return thresholdUnits;
- }
-
- public void setThresholdUnits(ThresholdUnit thresholdUnits) {
- this.thresholdUnits = thresholdUnits;
- }
-
- public String getIncrements() {
- return increments;
- }
-
- public void setIncrements(String increments) {
- this.increments = increments;
- }
-
- public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
- return operationalScope;
- }
-
- public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
- this.operationalScope = operationalScope;
- }
-
- public String getStartDate() {
- return startDate;
- }
-
- public void setStartDate(String startDate) {
- this.startDate = startDate;
- }
-
- public String getExpiryDate() {
- return expiryDate;
- }
-
- public void setExpiryDate(String expiryDate) {
- this.expiryDate = expiryDate;
- }
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
index 03bf2de328..1e35fee862 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
@@ -21,7 +21,10 @@ package org.openecomp.sdcrests.vendorlicense.types;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+@Data
public class FeatureGroupDescriptorDto {
@NotNull
@@ -32,27 +35,15 @@ public class FeatureGroupDescriptorDto {
@NotNull
private String partNumber;
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
public void setDescription(String description) {
- this.description = description;
- }
-
- public String getPartNumber() {
- return partNumber;
+ this.description = ValidationUtils.sanitizeInputString(description);
}
public void setPartNumber(String partNumber) {
- this.partNumber = partNumber;
+ this.partNumber = ValidationUtils.sanitizeInputString(partNumber);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementDescriptorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementDescriptorDto.java
index cd72d151dc..ab2f039267 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementDescriptorDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementDescriptorDto.java
@@ -22,8 +22,11 @@ package org.openecomp.sdcrests.vendorlicense.types;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseTerm;
+@Data
public class LicenseAgreementDescriptorDto {
@NotNull
@@ -37,35 +40,11 @@ public class LicenseAgreementDescriptorDto {
@Size(max = 1000)
private String requirementsAndConstrains;
- public String getName() {
- return name;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public ChoiceOrOtherDto<LicenseTerm> getLicenseTerm() {
- return licenseTerm;
- }
-
- public void setLicenseTerm(ChoiceOrOtherDto<LicenseTerm> licenseTerm) {
- this.licenseTerm = licenseTerm;
- }
-
- public String getRequirementsAndConstrains() {
- return requirementsAndConstrains;
- }
-
- public void setRequirementsAndConstrains(String requirementsAndConstrains) {
- this.requirementsAndConstrains = requirementsAndConstrains;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
index 2eabb0aa4a..f0f57af287 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupRequestDto.java
@@ -22,10 +22,13 @@ package org.openecomp.sdcrests.vendorlicense.types;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyType;
import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
+@Data
public class LicenseKeyGroupRequestDto {
@NotNull
@@ -46,83 +49,19 @@ public class LicenseKeyGroupRequestDto {
@Size(max = 120)
private String increments;
- public String getName() {
- return name;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setName(String name) {
- this.name = name;
+ public void setManufacturerReferenceNumber(final String manufacturerReferenceNumber) {
+ this.manufacturerReferenceNumber = ValidationUtils.sanitizeInputString(manufacturerReferenceNumber);
}
- public String getManufacturerReferenceNumber() {
- return manufacturerReferenceNumber;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
- public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
- this.manufacturerReferenceNumber = manufacturerReferenceNumber;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public LicenseKeyType getType() {
- return type;
- }
-
- public void setType(LicenseKeyType type) {
- this.type = type;
- }
-
- public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
- return operationalScope;
- }
-
- public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
- this.operationalScope = operationalScope;
- }
-
- public String getStartDate() {
- return startDate;
- }
-
- public void setStartDate(String startDate) {
- this.startDate = startDate;
- }
-
- public String getExpiryDate() {
- return expiryDate;
- }
-
- public void setExpiryDate(String expiryDate) {
- this.expiryDate = expiryDate;
- }
-
- public Integer getThresholdValue() {
- return thresholdValue;
- }
-
- public void setThresholdValue(Integer thresholdValue) {
- this.thresholdValue = thresholdValue;
- }
-
- public ThresholdUnit getThresholdUnits() {
- return thresholdUnits;
- }
-
- public void setThresholdUnits(ThresholdUnit thresholdUnits) {
- this.thresholdUnits = thresholdUnits;
- }
-
- public String getIncrements() {
- return increments;
- }
-
- public void setIncrements(String increments) {
- this.increments = increments;
+ public void setIncrements(final String increments) {
+ this.increments = ValidationUtils.sanitizeInputString(increments);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
index a22bb0a64d..b9b018144d 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitEntityDto.java
@@ -19,6 +19,10 @@
*/
package org.openecomp.sdcrests.vendorlicense.types;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+
+@Data
public class LimitEntityDto {
private String id;
@@ -31,75 +35,39 @@ public class LimitEntityDto {
private String aggregationFunction;
private String time;
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getMetric() {
- return metric;
- }
-
- public void setMetric(String metric) {
- this.metric = metric;
+ public void setId(final String id) {
+ this.id = ValidationUtils.sanitizeInputString(id);
}
- public String getUnit() {
- return unit;
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
}
- public void setUnit(String unit) {
- this.unit = unit;
+ public void setType(final String type) {
+ this.type = ValidationUtils.sanitizeInputString(type);
}
- public String getAggregationFunction() {
- return aggregationFunction;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
- public void setAggregationFunction(String aggregationFunction) {
- this.aggregationFunction = aggregationFunction;
+ public void setMetric(final String metric) {
+ this.metric = ValidationUtils.sanitizeInputString(metric);
}
- public String getTime() {
- return time;
+ public void setUnit(final String unit) {
+ this.unit = ValidationUtils.sanitizeInputString(unit);
}
- public void setTime(String time) {
- this.time = time;
+ public void setAggregationFunction(final String aggregationFunction) {
+ this.aggregationFunction = ValidationUtils.sanitizeInputString(aggregationFunction);
}
- public String getValue() {
- return value;
+ public void setTime(final String time) {
+ this.time = ValidationUtils.sanitizeInputString(time);
}
- public void setValue(String value) {
- this.value = value;
+ public void setValue(final String value) {
+ this.value = ValidationUtils.sanitizeInputString(value);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
index 625cc721a9..ba8fd96e6e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
@@ -22,7 +22,10 @@ package org.openecomp.sdcrests.vendorlicense.types;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
+import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
+@Data
@Schema(description = "VendorLicenseModelRequest")
public class VendorLicenseModelRequestDto {
@@ -35,27 +38,11 @@ public class VendorLicenseModelRequestDto {
@NotNull
private String iconRef;
- public String getVendorName() {
- return vendorName;
+ public void setVendorName(final String vendorName) {
+ this.vendorName = ValidationUtils.sanitizeInputString(vendorName);
}
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getIconRef() {
- return iconRef;
- }
-
- public void setIconRef(String iconRef) {
- this.iconRef = iconRef;
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java
index 010e0d3818..90a094e817 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java
@@ -17,6 +17,7 @@ package org.openecomp.sdcrests.vendorsoftwareproducts.types;
import javax.validation.constraints.NotNull;
import lombok.Data;
+import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.LicenseType;
import org.openecomp.sdc.vendorsoftwareproduct.types.LicensingData;
@@ -36,8 +37,19 @@ public class VspDescriptionDto {
private String vendorName;
@NotNull
private String vendorId; // this will be populated with vlm id
-
private String licensingVersion; // this will be populated with vlm version
private LicenseType licenseType;
private LicensingData licensingData;
+
+ public void setName(final String name) {
+ this.name = ValidationUtils.sanitizeInputString(name);
+ }
+
+ public void setVendorName(final String vendorName) {
+ this.vendorName = ValidationUtils.sanitizeInputString(vendorName);
+ }
+
+ public void setDescription(final String description) {
+ this.description = ValidationUtils.sanitizeInputString(description);
+ }
}