2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
23 import org.openecomp.core.utilities.json.JsonUtil;
24 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
25 import org.openecomp.sdc.versioning.dao.types.Version;
26 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
28 import java.util.List;
31 public class VspDetails implements VersionableEntity {
32 public static final String ENTITY_TYPE = "Vendor Software Product";
36 private Version version;
39 private String description;
41 private String category;
43 private String subCategory;
47 private String vendorName;
49 private String vendorId;
51 private Version vlmVersion;
53 private String licenseAgreement;
55 private List<String> featureGroups;
57 private String validationData;
59 private String oldVersion;
61 private Long writetimeMicroSeconds;
63 private String onboardingMethod;
67 public VspDetails(String id, Version version) {
69 this.version = version;
73 public String getEntityType() {
78 public String getFirstClassCitizenId() {
82 public String getId() {
86 public void setId(String id) {
91 public Version getVersion() {
96 public void setVersion(Version version) {
97 this.version = version;
100 public String getName() {
104 public void setName(String name) {
108 public String getDescription() {
112 public void setDescription(String description) {
113 this.description = description;
116 public String getCategory() {
120 public void setCategory(String category) {
121 this.category = category;
124 public String getSubCategory() {
128 public void setSubCategory(String subCategory) {
129 this.subCategory = subCategory;
132 public String getIcon() {
136 public void setIcon(String icon) {
140 public String getVendorName() {
144 public void setVendorName(String vendorName) {
145 this.vendorName = vendorName;
148 public String getVendorId() {
152 public void setVendorId(String vendorId) {
153 this.vendorId = vendorId;
156 public Version getVlmVersion() {
160 public void setVlmVersion(Version vlmVersion) {
161 this.vlmVersion = vlmVersion;
164 public String getLicenseAgreement() {
165 return licenseAgreement;
168 public void setLicenseAgreement(String licenseAgreement) {
169 this.licenseAgreement = licenseAgreement;
172 public List<String> getFeatureGroups() {
173 return featureGroups;
176 public void setFeatureGroups(List<String> featureGroups) {
177 this.featureGroups = featureGroups;
180 public String getValidationData() {
181 return validationData;
184 public void setValidationData(String validationData) {
185 this.validationData = validationData;
188 public ValidationStructureList getValidationDataStructure() {
189 return validationData == null ? null
190 : JsonUtil.json2Object(validationData, ValidationStructureList.class);
193 public void setValidationDataStructure(ValidationStructureList validationData) {
194 this.validationData = validationData == null ? null
195 : JsonUtil.object2Json(validationData);
198 public Long getWritetimeMicroSeconds() {
199 return this.writetimeMicroSeconds;
202 public void setWritetimeMicroSeconds(Long writetimeMicroSeconds) {
203 this.writetimeMicroSeconds = writetimeMicroSeconds;
206 /*public boolean isOldVersion() {
207 return this.oldVersion;
210 public String getOldVersion(){
211 return this.oldVersion;
214 public void setOldVersion(String oldVersion) {
215 this.oldVersion = oldVersion;
218 public String getOnboardingMethod() {
219 return onboardingMethod;
221 public void setOnboardingMethod(String onboardingMethod) {
222 this.onboardingMethod = onboardingMethod;
225 public String toString() {
226 return String.format(
227 "Vsp id = '%s', Version = %s', Name = %s', Category = %s', Description = %s', Vendor = %s'",
228 this.id, this.version, this.name, this.category, this.description, this.vendorName);