398d84c8e524b602b4c72506da41bebbab7f1c76
[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
17 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
18
19 import org.openecomp.core.utilities.json.JsonUtil;
20 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
21
22 import java.nio.ByteBuffer;
23
24 public class OrchestrationTemplateCandidateData {
25   private ByteBuffer contentData;
26   private String filesDataStructure;
27   private String fileSuffix;
28   private String fileName;
29   private String validationData;
30
31   public OrchestrationTemplateCandidateData() {
32   }
33
34   public OrchestrationTemplateCandidateData(ByteBuffer contentData, String dataStructureJson,
35                                             String fileSuffix, String fileName) {
36     this.contentData = contentData;
37     this.filesDataStructure = dataStructureJson;
38     this.fileSuffix = fileSuffix;
39     this.fileName = fileName;
40   }
41
42   public ByteBuffer getContentData() {
43     return contentData;
44   }
45
46   public void setContentData(ByteBuffer contentData) {
47     this.contentData = contentData;
48   }
49
50   public String getFilesDataStructure() {
51     return filesDataStructure;
52   }
53
54   public void setFilesDataStructure(String filesDataStructure) {
55     this.filesDataStructure = filesDataStructure;
56   }
57
58   public String getFileSuffix() {
59     return fileSuffix;
60   }
61
62   public void setFileSuffix(String fileSuffix) {
63     this.fileSuffix = fileSuffix;
64   }
65
66   public String getFileName() {
67     return fileName;
68   }
69
70   public void setFileName(String fileName) {
71     this.fileName = fileName;
72   }
73
74   public String getValidationData() {
75     return validationData;
76   }
77
78   public void setValidationData(String validationData) {
79     this.validationData = validationData;
80   }
81
82   public ValidationStructureList getValidationDataStructure() {
83     return validationData == null ? null
84         : JsonUtil.json2Object(validationData, ValidationStructureList.class);
85   }
86
87   public void setValidationDataStructure(ValidationStructureList validationData) {
88     this.validationData = validationData == null ? null
89         : JsonUtil.object2Json(validationData);
90   }
91 }