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;
66 public VspDetails(String id, Version version) {
68 this.version = version;
72 public String getEntityType() {
77 public String getFirstClassCitizenId() {
81 public String getId() {
85 public void setId(String id) {
90 public Version getVersion() {
95 public void setVersion(Version version) {
96 this.version = version;
99 public String getName() {
103 public void setName(String name) {
107 public String getDescription() {
111 public void setDescription(String description) {
112 this.description = description;
115 public String getCategory() {
119 public void setCategory(String category) {
120 this.category = category;
123 public String getSubCategory() {
127 public void setSubCategory(String subCategory) {
128 this.subCategory = subCategory;
131 public String getIcon() {
135 public void setIcon(String icon) {
139 public String getVendorName() {
143 public void setVendorName(String vendorName) {
144 this.vendorName = vendorName;
147 public String getVendorId() {
151 public void setVendorId(String vendorId) {
152 this.vendorId = vendorId;
155 public Version getVlmVersion() {
159 public void setVlmVersion(Version vlmVersion) {
160 this.vlmVersion = vlmVersion;
163 public String getLicenseAgreement() {
164 return licenseAgreement;
167 public void setLicenseAgreement(String licenseAgreement) {
168 this.licenseAgreement = licenseAgreement;
171 public List<String> getFeatureGroups() {
172 return featureGroups;
175 public void setFeatureGroups(List<String> featureGroups) {
176 this.featureGroups = featureGroups;
179 public String getValidationData() {
180 return validationData;
183 public void setValidationData(String validationData) {
184 this.validationData = validationData;
187 public ValidationStructureList getValidationDataStructure() {
188 return validationData == null ? null
189 : JsonUtil.json2Object(validationData, ValidationStructureList.class);
192 public void setValidationDataStructure(ValidationStructureList validationData) {
193 this.validationData = validationData == null ? null
194 : JsonUtil.object2Json(validationData);
197 public Long getWritetimeMicroSeconds() {
198 return this.writetimeMicroSeconds;
201 public void setWritetimeMicroSeconds(Long writetimeMicroSeconds) {
202 this.writetimeMicroSeconds = writetimeMicroSeconds;
205 /*public boolean isOldVersion() {
206 return this.oldVersion;
209 public String getOldVersion(){
210 return this.oldVersion;
213 public void setOldVersion(String oldVersion) {
214 this.oldVersion = oldVersion;
218 public String toString() {
219 return String.format(
220 "Vsp id = '%s', Version = %s', Name = %s', Category = %s', Description = %s', Vendor = %s'",
221 this.id, this.version, this.name, this.category, this.description, this.vendorName);