90a094e817ca7da0bb2aca47a0ce4ee6d130de34
[sdc.git] /
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openecomp.sdcrests.vendorsoftwareproducts.types;
17
18 import javax.validation.constraints.NotNull;
19 import lombok.Data;
20 import org.openecomp.sdc.common.util.ValidationUtils;
21 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.LicenseType;
22 import org.openecomp.sdc.vendorsoftwareproduct.types.LicensingData;
23
24 @Data
25 public class VspDescriptionDto {
26
27     @NotNull
28     private String name;
29     @NotNull
30     private String description;
31     private String icon;
32     @NotNull
33     private String category;
34     @NotNull
35     private String subCategory;
36     @NotNull
37     private String vendorName;
38     @NotNull
39     private String vendorId;            // this will be populated with vlm id
40     private String licensingVersion;    // this will be populated with vlm version
41     private LicenseType licenseType;
42     private LicensingData licensingData;
43
44     public void setName(final String name) {
45         this.name = ValidationUtils.sanitizeInputString(name);
46     }
47
48     public void setVendorName(final String vendorName) {
49         this.vendorName = ValidationUtils.sanitizeInputString(vendorName);
50     }
51
52     public void setDescription(final String description) {
53         this.description = ValidationUtils.sanitizeInputString(description);
54     }
55 }