aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-02-19 12:35:04 +0200
committerMichael Lando <ml636r@att.com>2017-02-19 12:35:04 +0200
commitf5f13c4f6b6fe3b4d98e349dfd7db59339803436 (patch)
tree72caffc93fab394ffa3b761505775331f1c559b9 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org
parent451a3400b76511393c62a444f588a4ed15f4a549 (diff)
push addional code
Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org')
-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/ChoiceOrOtherDto.java75
-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.java48
-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.java144
-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.java59
-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/FeatureGroupEntityDto.java69
-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/FeatureGroupModelDto.java66
-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/FeatureGroupRequestDto.java48
-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/FeatureGroupUpdateRequestDto.java48
-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.java74
-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/LicenseAgreementEntityDto.java51
-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/LicenseAgreementModelDto.java47
-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/LicenseAgreementRequestDto.java39
-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/LicenseAgreementUpdateRequestDto.java38
-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/LicenseKeyGroupEntityDto.java45
-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.java74
-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/MultiChoiceOrOtherDto.java79
-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/VendorLicenseModelActionRequestDto.java36
-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/VendorLicenseModelEntityDto.java85
-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.java62
-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/validation/ChoiceOrOtherSequenceProvider.java45
-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/validation/MultiChoiceOrOtherSequenceProvider.java47
-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/validation/OtherChoiceValidation.java24
22 files changed, 1303 insertions, 0 deletions
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/ChoiceOrOtherDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/ChoiceOrOtherDto.java
new file mode 100644
index 0000000000..ba8f57f79f
--- /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/ChoiceOrOtherDto.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.openecomp.sdcrests.vendorlicense.types.validation.ChoiceOrOtherSequenceProvider;
+import org.openecomp.sdcrests.vendorlicense.types.validation.OtherChoiceValidation;
+
+import javax.validation.constraints.NotNull;
+
+@GroupSequenceProvider(value = ChoiceOrOtherSequenceProvider.class)
+public class ChoiceOrOtherDto<E extends Enum<E>> {
+ @NotNull
+ private E choice;
+ @NotNull(message = "may not be null when choice is set to 'Other'.",
+ groups = OtherChoiceValidation.class)
+ private String other;
+
+ public E getChoice() {
+ return choice;
+ }
+
+ public void setChoice(E choice) {
+ this.choice = choice;
+ }
+
+ public String getOther() {
+ return other;
+ }
+
+ public void setOther(String other) {
+ this.other = other;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ ChoiceOrOtherDto<?> that = (ChoiceOrOtherDto<?>) obj;
+
+ return choice != null ? choice.equals(that.choice)
+ : that.choice == null && (other != null ? other.equals(that.other) : that.other == null);
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = choice != null ? choice.hashCode() : 0;
+ result = 31 * result + (other != null ? other.hashCode() : 0);
+ return result;
+ }
+}
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
new file mode 100644
index 0000000000..5ed40b00b7
--- /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/EntitlementPoolEntityDto.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "EntitlementPoolEntity")
+public class EntitlementPoolEntityDto extends EntitlementPoolRequestDto {
+ private String id;
+ private Set<String> referencingFeatureGroups;
+
+ 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;
+ }
+}
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
new file mode 100644
index 0000000000..b70504e20e
--- /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/EntitlementPoolRequestDto.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+import org.openecomp.sdc.vendorlicense.dao.types.AggregationFunction;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementMetric;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementTime;
+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;
+
+@ApiModel(value = "EntitlementPoolRequest")
+public class EntitlementPoolRequestDto {
+
+ @NotNull
+ @Size(max = 120)
+ private String name;
+ @NotNull
+ @Size(max = 1000)
+ private String description;
+ @NotNull
+ private int thresholdValue;
+ @NotNull
+ private ThresholdUnit thresholdUnits;
+ @NotNull
+ @Valid
+ private ChoiceOrOtherDto<EntitlementMetric> entitlementMetric;
+ @Size(max = 120)
+ private String increments;
+ @NotNull
+ @Valid
+ private ChoiceOrOtherDto<AggregationFunction> aggregationFunction;
+ @NotNull
+ @Valid
+ private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
+ @NotNull
+ @Valid
+ private ChoiceOrOtherDto<EntitlementTime> time;
+ @NotNull
+ @Size(max = 100)
+ private String manufacturerReferenceNumber;
+
+ 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 int getThresholdValue() {
+ return thresholdValue;
+ }
+
+ public void setThresholdValue(int thresholdValue) {
+ this.thresholdValue = thresholdValue;
+ }
+
+ public ThresholdUnit getThresholdUnits() {
+ return thresholdUnits;
+ }
+
+ public void setThresholdUnits(ThresholdUnit thresholdUnits) {
+ this.thresholdUnits = thresholdUnits;
+ }
+
+ public ChoiceOrOtherDto<EntitlementMetric> getEntitlementMetric() {
+ return entitlementMetric;
+ }
+
+ public void setEntitlementMetric(ChoiceOrOtherDto<EntitlementMetric> entitlementMetric) {
+ this.entitlementMetric = entitlementMetric;
+ }
+
+ public String getIncrements() {
+ return increments;
+ }
+
+ public void setIncrements(String increments) {
+ this.increments = increments;
+ }
+
+ public ChoiceOrOtherDto<AggregationFunction> getAggregationFunction() {
+ return aggregationFunction;
+ }
+
+ public void setAggregationFunction(ChoiceOrOtherDto<AggregationFunction> aggregationFunction) {
+ this.aggregationFunction = aggregationFunction;
+ }
+
+ public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
+ return operationalScope;
+ }
+
+ public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
+ this.operationalScope = operationalScope;
+ }
+
+ public ChoiceOrOtherDto<EntitlementTime> getTime() {
+ return time;
+ }
+
+ public void setTime(ChoiceOrOtherDto<EntitlementTime> time) {
+ this.time = time;
+ }
+
+ 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/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
new file mode 100644
index 0000000000..5c1f8f2cfc
--- /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/FeatureGroupDescriptorDto.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+public class FeatureGroupDescriptorDto {
+ @NotNull
+ @Size(max = 120)
+ private String name;
+ @NotNull
+ @Size(max = 1000)
+ private String description;
+ @NotNull
+ private String partNumber;
+
+ 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 getPartNumber() {
+ return partNumber;
+ }
+
+ public void setPartNumber(String partNumber) {
+ this.partNumber = 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/FeatureGroupEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java
new file mode 100644
index 0000000000..a1d1edddcf
--- /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/FeatureGroupEntityDto.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+import javax.validation.constraints.Size;
+
+
+@ApiModel(value = "FeatureGroupEntity")
+public class FeatureGroupEntityDto extends FeatureGroupDescriptorDto {
+ private String id;
+ private Set<String> licenseKeyGroupsIds;
+ @Size(min = 1)
+ private Set<String> entitlementPoolsIds;
+ private Set<String> referencingLicenseAgreements;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Set<String> getLicenseKeyGroupsIds() {
+ return licenseKeyGroupsIds;
+ }
+
+ public void setLicenseKeyGroupsIds(Set<String> licenseKeyGroupsIds) {
+ this.licenseKeyGroupsIds = licenseKeyGroupsIds;
+ }
+
+ public Set<String> getEntitlementPoolsIds() {
+ return entitlementPoolsIds;
+ }
+
+ public void setEntitlementPoolsIds(Set<String> entitlementPoolsIds) {
+ this.entitlementPoolsIds = entitlementPoolsIds;
+ }
+
+ public Set<String> getReferencingLicenseAgreements() {
+ return referencingLicenseAgreements;
+ }
+
+ public void setReferencingLicenseAgreements(Set<String> referencingLicenseAgreements) {
+ this.referencingLicenseAgreements = referencingLicenseAgreements;
+ }
+}
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/FeatureGroupModelDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java
new file mode 100644
index 0000000000..1572320bb1
--- /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/FeatureGroupModelDto.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Collection;
+import java.util.Set;
+
+@ApiModel(value = "FeatureGroupModel")
+public class FeatureGroupModelDto extends FeatureGroupDescriptorDto {
+ private String id;
+ private Set<String> referencingLicenseAgreements;
+ private Collection<LicenseKeyGroupEntityDto> licenseKeyGroups;
+ private Collection<EntitlementPoolEntityDto> entitlementPools;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Set<String> getReferencingLicenseAgreements() {
+ return referencingLicenseAgreements;
+ }
+
+ public void setReferencingLicenseAgreements(Set<String> referencingLicenseAgreements) {
+ this.referencingLicenseAgreements = referencingLicenseAgreements;
+ }
+
+ public Collection<LicenseKeyGroupEntityDto> getLicenseKeyGroups() {
+ return licenseKeyGroups;
+ }
+
+ public void setLicenseKeyGroups(Collection<LicenseKeyGroupEntityDto> licenseKeyGroups) {
+ this.licenseKeyGroups = licenseKeyGroups;
+ }
+
+ public Collection<EntitlementPoolEntityDto> getEntitlementPools() {
+ return entitlementPools;
+ }
+
+ public void setEntitlementPools(Collection<EntitlementPoolEntityDto> entitlementPools) {
+ this.entitlementPools = entitlementPools;
+ }
+}
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/FeatureGroupRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java
new file mode 100644
index 0000000000..282e797f1b
--- /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/FeatureGroupRequestDto.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "FeatureGroupRequest")
+public class FeatureGroupRequestDto extends FeatureGroupDescriptorDto {
+
+ private Set<String> addedLicenseKeyGroupsIds;
+ private Set<String> addedEntitlementPoolsIds;
+
+ public Set<String> getAddedLicenseKeyGroupsIds() {
+ return addedLicenseKeyGroupsIds;
+ }
+
+ public void setAddedLicenseKeyGroupsIds(Set<String> addedLicenseKeyGroupsIds) {
+ this.addedLicenseKeyGroupsIds = addedLicenseKeyGroupsIds;
+ }
+
+ public Set<String> getAddedEntitlementPoolsIds() {
+ return addedEntitlementPoolsIds;
+ }
+
+ public void setAddedEntitlementPoolsIds(Set<String> addedEntitlementPoolsIds) {
+ this.addedEntitlementPoolsIds = addedEntitlementPoolsIds;
+ }
+}
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/FeatureGroupUpdateRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java
new file mode 100644
index 0000000000..002e48bb2c
--- /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/FeatureGroupUpdateRequestDto.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "FeatureGroupUpdateRequest")
+public class FeatureGroupUpdateRequestDto extends FeatureGroupRequestDto {
+
+ private Set<String> removedLicenseKeyGroupsIds;
+ private Set<String> removedEntitlementPoolsIds;
+
+ public Set<String> getRemovedLicenseKeyGroupsIds() {
+ return removedLicenseKeyGroupsIds;
+ }
+
+ public void setRemovedLicenseKeyGroupsIds(Set<String> removedLicenseKeyGroupsIds) {
+ this.removedLicenseKeyGroupsIds = removedLicenseKeyGroupsIds;
+ }
+
+ public Set<String> getRemovedEntitlementPoolsIds() {
+ return removedEntitlementPoolsIds;
+ }
+
+ public void setRemovedEntitlementPoolsIds(Set<String> removedEntitlementPoolsIds) {
+ this.removedEntitlementPoolsIds = removedEntitlementPoolsIds;
+ }
+}
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
new file mode 100644
index 0000000000..acfc130ed1
--- /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/LicenseAgreementDescriptorDto.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseTerm;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+public class LicenseAgreementDescriptorDto {
+
+ @NotNull
+ @Size(max = 120)
+ private String name;
+ @NotNull
+ @Size(max = 1000)
+ private String description;
+ @NotNull
+ @Valid
+ private ChoiceOrOtherDto<LicenseTerm> licenseTerm;
+ @Size(max = 1000)
+ private String requirementsAndConstrains;
+
+ 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 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;
+ }
+}
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/LicenseAgreementEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java
new file mode 100644
index 0000000000..b0a8f65995
--- /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/LicenseAgreementEntityDto.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+import javax.validation.constraints.Size;
+
+
+@ApiModel(value = "LicenseAgreementEntity")
+public class LicenseAgreementEntityDto extends LicenseAgreementDescriptorDto {
+ private String id;
+ @Size(min = 1)
+ private Set<String> featureGroupsIds;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Set<String> getFeatureGroupsIds() {
+ return featureGroupsIds;
+ }
+
+ public void setFeatureGroupsIds(Set<String> featureGroupsIds) {
+ this.featureGroupsIds = featureGroupsIds;
+ }
+}
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/LicenseAgreementModelDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java
new file mode 100644
index 0000000000..a3460c321f
--- /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/LicenseAgreementModelDto.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "LicenseAgreementModel")
+public class LicenseAgreementModelDto extends LicenseAgreementDescriptorDto {
+ private String id;
+ private Set<FeatureGroupEntityDto> featureGroups;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Set<FeatureGroupEntityDto> getFeatureGroups() {
+ return featureGroups;
+ }
+
+ public void setFeatureGroups(Set<FeatureGroupEntityDto> featureGroups) {
+ this.featureGroups = featureGroups;
+ }
+}
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/LicenseAgreementRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java
new file mode 100644
index 0000000000..3830bdb713
--- /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/LicenseAgreementRequestDto.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "LicenseAgreementRequest")
+public class LicenseAgreementRequestDto extends LicenseAgreementDescriptorDto {
+
+ private Set<String> addedFeatureGroupsIds;
+
+ public Set<String> getAddedFeatureGroupsIds() {
+ return addedFeatureGroupsIds;
+ }
+
+ public void setAddedFeatureGroupsIds(Set<String> addedFeatureGroupsIds) {
+ this.addedFeatureGroupsIds = addedFeatureGroupsIds;
+ }
+}
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/LicenseAgreementUpdateRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java
new file mode 100644
index 0000000000..2590bcf519
--- /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/LicenseAgreementUpdateRequestDto.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import java.util.Set;
+
+@ApiModel(value = "LicenseAgreementUpdateRequest")
+public class LicenseAgreementUpdateRequestDto extends LicenseAgreementRequestDto {
+ private Set<String> removedFeatureGroupsIds;
+
+ public Set<String> getRemovedFeatureGroupsIds() {
+ return removedFeatureGroupsIds;
+ }
+
+ public void setRemovedFeatureGroupsIds(Set<String> removedFeatureGroupsIds) {
+ this.removedFeatureGroupsIds = removedFeatureGroupsIds;
+ }
+}
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/LicenseKeyGroupEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseKeyGroupEntityDto.java
new file mode 100644
index 0000000000..9fab60fe27
--- /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/LicenseKeyGroupEntityDto.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+
+import java.util.Set;
+
+public class LicenseKeyGroupEntityDto extends LicenseKeyGroupRequestDto {
+ private String id;
+ private Set<String> referencingFeatureGroups;
+
+ 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;
+ }
+}
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
new file mode 100644
index 0000000000..0df2e3251f
--- /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/LicenseKeyGroupRequestDto.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyType;
+import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+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;
+
+ 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 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;
+ }
+}
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/MultiChoiceOrOtherDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/MultiChoiceOrOtherDto.java
new file mode 100644
index 0000000000..5a88e4c72f
--- /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/MultiChoiceOrOtherDto.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import org.hibernate.validator.group.GroupSequenceProvider;
+import org.openecomp.sdcrests.vendorlicense.types.validation.MultiChoiceOrOtherSequenceProvider;
+import org.openecomp.sdcrests.vendorlicense.types.validation.OtherChoiceValidation;
+
+import java.util.Set;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+
+@GroupSequenceProvider(value = MultiChoiceOrOtherSequenceProvider.class)
+public class MultiChoiceOrOtherDto<E extends Enum<E>> {
+ @NotNull
+ @Size(min = 1, message = "must contain at least 1 choice.")
+ private Set<E> choices;
+ @NotNull(message = "may not be null when choices is set to 'Other'.",
+ groups = OtherChoiceValidation.class)
+ private String other;
+
+ public Set<E> getChoices() {
+ return choices;
+ }
+
+ public void setChoices(Set<E> choices) {
+ this.choices = choices;
+ }
+
+ public String getOther() {
+ return other;
+ }
+
+ public void setOther(String other) {
+ this.other = other;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ MultiChoiceOrOtherDto<?> that = (MultiChoiceOrOtherDto<?>) obj;
+
+ return choices != null ? choices.equals(that.choices)
+ : that.choices == null && (other != null ? other.equals(that.other) : that.other == null);
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = choices != null ? choices.hashCode() : 0;
+ result = 31 * result + (other != null ? other.hashCode() : 0);
+ return result;
+ }
+}
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/VendorLicenseModelActionRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelActionRequestDto.java
new file mode 100644
index 0000000000..cfae94ce35
--- /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/VendorLicenseModelActionRequestDto.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import org.openecomp.sdcrests.versioning.types.VersioningAction;
+
+public class VendorLicenseModelActionRequestDto {
+
+ private VersioningAction action;
+
+ public VersioningAction getAction() {
+ return action;
+ }
+
+ public void setAction(VersioningAction action) {
+ this.action = action;
+ }
+}
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/VendorLicenseModelEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java
new file mode 100644
index 0000000000..6c10f8fbe2
--- /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/VendorLicenseModelEntityDto.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+
+
+import java.util.List;
+
+@ApiModel(value = "VendorLicenseModelEntity")
+public class VendorLicenseModelEntityDto extends VendorLicenseModelRequestDto {
+ private String id;
+ private String version;
+ private VersionStatus status;
+ private String lockingUser;
+ private List<String> viewableVersions;
+ private List<String> finalVersions;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public VersionStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(VersionStatus status) {
+ this.status = status;
+ }
+
+ public String getLockingUser() {
+ return lockingUser;
+ }
+
+ public void setLockingUser(String lockingUser) {
+ this.lockingUser = lockingUser;
+ }
+
+ public List<String> getViewableVersions() {
+ return viewableVersions;
+ }
+
+ public void setViewableVersions(List<String> viewableVersions) {
+ this.viewableVersions = viewableVersions;
+ }
+
+ public List<String> getFinalVersions() {
+ return finalVersions;
+ }
+
+ public void setFinalVersions(List<String> finalVersions) {
+ this.finalVersions = finalVersions;
+ }
+}
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
new file mode 100644
index 0000000000..57b936a57f
--- /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/VendorLicenseModelRequestDto.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types;
+
+import io.swagger.annotations.ApiModel;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+@ApiModel(value = "VendorLicenseModelRequest")
+public class VendorLicenseModelRequestDto {
+ @NotNull
+ @Size(max = 25)
+ private String vendorName;
+ @NotNull
+ @Size(max = 1000)
+ private String description;
+ @NotNull
+ private String iconRef;
+
+ public String getVendorName() {
+ return 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;
+ }
+}
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/validation/ChoiceOrOtherSequenceProvider.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/validation/ChoiceOrOtherSequenceProvider.java
new file mode 100644
index 0000000000..8be0ba3231
--- /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/validation/ChoiceOrOtherSequenceProvider.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types.validation;
+
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdcrests.vendorlicense.types.ChoiceOrOtherDto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChoiceOrOtherSequenceProvider
+ implements DefaultGroupSequenceProvider<ChoiceOrOtherDto> {
+
+ @Override
+ public List<Class<?>> getValidationGroups(ChoiceOrOtherDto choiceOrOther) {
+ List<Class<?>> sequence = new ArrayList<>();
+ sequence.add(ChoiceOrOtherDto.class);
+
+ if (choiceOrOther != null && choiceOrOther.getChoice() != null
+ && ChoiceOrOther.OTHER_ENUM_VALUE.equals(choiceOrOther.getChoice().name())) {
+ sequence.add(OtherChoiceValidation.class);
+ }
+
+ return sequence;
+ }
+}
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/validation/MultiChoiceOrOtherSequenceProvider.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/validation/MultiChoiceOrOtherSequenceProvider.java
new file mode 100644
index 0000000000..7cc9bbd2a2
--- /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/validation/MultiChoiceOrOtherSequenceProvider.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types.validation;
+
+import org.hibernate.validator.spi.group.DefaultGroupSequenceProvider;
+import org.openecomp.sdc.vendorlicense.dao.types.MultiChoiceOrOther;
+import org.openecomp.sdcrests.vendorlicense.types.MultiChoiceOrOtherDto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MultiChoiceOrOtherSequenceProvider
+ implements DefaultGroupSequenceProvider<MultiChoiceOrOtherDto> {
+
+ @Override
+ public List<Class<?>> getValidationGroups(MultiChoiceOrOtherDto multiChoiceOrOther) {
+ List<Class<?>> sequence = new ArrayList<>();
+ sequence.add(MultiChoiceOrOtherDto.class);
+
+ if (multiChoiceOrOther != null && multiChoiceOrOther.getChoices() != null
+ && multiChoiceOrOther.getChoices().size() == 1
+ && MultiChoiceOrOther.OTHER_ENUM_VALUE
+ .equals((((Enum) (multiChoiceOrOther.getChoices().iterator().next())).name()))) {
+ sequence.add(OtherChoiceValidation.class);
+ }
+
+ return sequence;
+ }
+}
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/validation/OtherChoiceValidation.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/validation/OtherChoiceValidation.java
new file mode 100644
index 0000000000..ff682dd8b5
--- /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/validation/OtherChoiceValidation.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdcrests.vendorlicense.types.validation;
+
+public interface OtherChoiceValidation {
+}