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.
16 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
18 import java.nio.ByteBuffer;
20 import lombok.NoArgsConstructor;
22 import org.openecomp.core.utilities.json.JsonUtil;
23 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
28 public class OrchestrationTemplateCandidateData {
30 private ByteBuffer contentData;
31 private String filesDataStructure;
32 private String fileSuffix;
33 private String fileName;
34 private String validationData;
35 private ByteBuffer originalFileContentData;
36 private String originalFileName;
37 private String originalFileSuffix;
39 public OrchestrationTemplateCandidateData(final ByteBuffer contentData, final String dataStructureJson, final String fileSuffix,
40 final String fileName, final String originalFileName, final String originalFileSuffix,
41 final ByteBuffer originalFileContentData) {
42 this.contentData = contentData;
43 this.filesDataStructure = dataStructureJson;
44 this.fileSuffix = fileSuffix;
45 this.fileName = fileName;
46 this.originalFileName = originalFileName;
47 this.originalFileSuffix = originalFileSuffix;
48 this.originalFileContentData = originalFileContentData;
51 public ValidationStructureList getValidationDataStructure() {
52 return validationData == null ? null : JsonUtil.json2Object(validationData, ValidationStructureList.class);