summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup29
-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.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/FeatureGroupDescriptorDto.java16
-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.java2
-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.java3
-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.java86
-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/LimitRequestDto.java96
7 files changed, 256 insertions, 11 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup
new file mode 100644
index 0000000000..d24c315f39
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/pom.xml.versionsBackup
@@ -0,0 +1,29 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>vendor-license-rest-types</artifactId>
+ <name>vendor-license-rest-types</name>
+ <version>1.0-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.openecomp.sdc.onboarding</groupId>
+ <artifactId>vendor-license-rest</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-common-rest</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-license-manager</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
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 b70504e20e..b49a138a09 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
@@ -21,6 +21,7 @@
package org.openecomp.sdcrests.vendorlicense.types;
import io.swagger.annotations.ApiModel;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.openecomp.sdc.vendorlicense.dao.types.AggregationFunction;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementMetric;
import org.openecomp.sdc.vendorlicense.dao.types.EntitlementTime;
@@ -32,17 +33,18 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@ApiModel(value = "EntitlementPoolRequest")
+//@JsonIgnoreProperties(value = {"manufacturerReferenceNumber"})
public class EntitlementPoolRequestDto {
@NotNull
@Size(max = 120)
private String name;
- @NotNull
+
@Size(max = 1000)
private String description;
- @NotNull
- private int thresholdValue;
- @NotNull
+
+ private Integer thresholdValue;
+
private ThresholdUnit thresholdUnits;
@NotNull
@Valid
@@ -52,7 +54,7 @@ public class EntitlementPoolRequestDto {
@NotNull
@Valid
private ChoiceOrOtherDto<AggregationFunction> aggregationFunction;
- @NotNull
+
@Valid
private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
@NotNull
@@ -62,6 +64,9 @@ public class EntitlementPoolRequestDto {
@Size(max = 100)
private String manufacturerReferenceNumber;
+ private String startDate;
+ private String expiryDate;
+
public String getName() {
return name;
}
@@ -78,11 +83,11 @@ public class EntitlementPoolRequestDto {
this.description = description;
}
- public int getThresholdValue() {
+ public Integer getThresholdValue() {
return thresholdValue;
}
- public void setThresholdValue(int thresholdValue) {
+ public void setThresholdValue(Integer thresholdValue) {
this.thresholdValue = thresholdValue;
}
@@ -141,4 +146,20 @@ public class EntitlementPoolRequestDto {
public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
this.manufacturerReferenceNumber = manufacturerReferenceNumber;
}
+
+ 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 5c1f8f2cfc..f2d0d651ef 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
@@ -20,6 +20,8 @@
package org.openecomp.sdcrests.vendorlicense.types;
+import org.hibernate.validator.constraints.NotBlank;
+
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@@ -27,12 +29,16 @@ public class FeatureGroupDescriptorDto {
@NotNull
@Size(max = 120)
private String name;
- @NotNull
+
@Size(max = 1000)
private String description;
@NotNull
private String partNumber;
+ //@NotBlank(message = "is mandatory and should not be empty")
+ @Size(max = 100)
+ private String manufacturerReferenceNumber;
+
public String getName() {
return name;
}
@@ -56,4 +62,12 @@ public class FeatureGroupDescriptorDto {
public void setPartNumber(String partNumber) {
this.partNumber = partNumber;
}
+
+ public String getManufacturerReferenceNumber() {
+ return manufacturerReferenceNumber;
+ }
+
+ public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
+ this.manufacturerReferenceNumber = manufacturerReferenceNumber;
+ }
}
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 acfc130ed1..4239488124 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
@@ -31,7 +31,7 @@ public class LicenseAgreementDescriptorDto {
@NotNull
@Size(max = 120)
private String name;
- @NotNull
+
@Size(max = 1000)
private String description;
@NotNull
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 0df2e3251f..a9072f5e94 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
@@ -31,12 +31,11 @@ public class LicenseKeyGroupRequestDto {
@NotNull
@Size(max = 120)
private String name;
- @NotNull
@Size(max = 1000)
private String description;
@NotNull
private LicenseKeyType type;
- @NotNull
+
@Valid
private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
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
new file mode 100644
index 0000000000..0cc18949d8
--- /dev/null
+++ 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
@@ -0,0 +1,86 @@
+package org.openecomp.sdcrests.vendorlicense.types;
+
+public class LimitEntityDto {
+
+ private String id;
+ private String name;
+ private String type;
+ private String description;
+ private String metric;
+ private Integer value;
+ private Integer unit;
+ 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 Integer getUnit() {
+ return unit;
+ }
+
+ public void setUnit(Integer unit) {
+ this.unit = unit;
+ }
+
+ public String getAggregationFunction() {
+ return aggregationFunction;
+ }
+
+ public void setAggregationFunction(String aggregationFunction) {
+ this.aggregationFunction = aggregationFunction;
+ }
+
+ public String getTime() {
+ return time;
+ }
+
+ public void setTime(String time) {
+ this.time = time;
+ }
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = 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/LimitRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
new file mode 100644
index 0000000000..61f30916f8
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
@@ -0,0 +1,96 @@
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+import org.hibernate.validator.constraints.NotBlank;
+import org.openecomp.sdc.vendorlicense.dao.types.LimitType;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+@ApiModel(value = "LimitRequest")
+public class LimitRequestDto {
+
+ @NotBlank(message = "is mandatory and should not be empty")
+ @Size(max = 120, message = "length should not exceed 120 characters.")
+ private String name;
+ @NotBlank(message = "is mandatory and should not be empty")
+ private String type;
+ @Size(max = 1000, message = "length should not exceed 1000 characters.")
+ private String description;
+ @NotBlank(message = "is mandatory and should not be empty")
+ private String metric;
+ @NotNull(message = "is mandatory and should not be empty")
+ @Min(value = 1, message = "should be integer and > 0")
+ private Integer value;
+ @Min(value = 1, message = "should be integer and > 0")
+ private Integer unit;
+ private String aggregationFunction;
+ private String time;
+
+ 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 getMetric() {
+ return metric;
+ }
+
+ public void setMetric(String metric) {
+ this.metric = metric;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getAggregationFunction() {
+ return aggregationFunction;
+ }
+
+ public void setAggregationFunction(
+ String aggregationFunction) {
+ this.aggregationFunction = aggregationFunction;
+ }
+
+ public String getTime() {
+ return time;
+ }
+
+ public void setTime(String time) {
+ this.time = time;
+ }
+
+ public Integer getUnit() {
+ return unit;
+ }
+
+ public void setUnit(Integer unit) {
+ this.unit = unit;
+ }
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+
+}