2 * Copyright © 2016-2018 European Support Limited
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
19 import java.nio.ByteBuffer;
21 import lombok.NoArgsConstructor;
23 import org.openecomp.core.utilities.json.JsonUtil;
24 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
29 public class OrchestrationTemplateCandidateData {
31 private ByteBuffer contentData;
32 private String filesDataStructure;
33 private String fileSuffix;
34 private String fileName;
35 private String validationData;
36 private ByteBuffer originalFileContentData;
37 private String originalFileName;
38 private String originalFileSuffix;
40 public OrchestrationTemplateCandidateData(final ByteBuffer contentData,
41 final String dataStructureJson,
42 final String fileSuffix, final String fileName,
43 final String originalFileName,
44 final String originalFileSuffix,
45 final ByteBuffer originalFileContentData) {
46 this.contentData = contentData;
47 this.filesDataStructure = dataStructureJson;
48 this.fileSuffix = fileSuffix;
49 this.fileName = fileName;
50 this.originalFileName = originalFileName;
51 this.originalFileSuffix = originalFileSuffix;
52 this.originalFileContentData = originalFileContentData;
55 public ValidationStructureList getValidationDataStructure() {
56 return validationData == null ? null
57 : JsonUtil.json2Object(validationData, ValidationStructureList.class);