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 org.openecomp.core.utilities.json.JsonUtil;
20 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
21 import org.openecomp.sdc.versioning.dao.types.Version;
22 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
24 import java.nio.ByteBuffer;
26 public class OrchestrationTemplateEntity implements VersionableEntity {
27 private static final String ENTITY_TYPE = "Vendor Software Product Orchestration Template";
30 private Version version;
31 private String fileSuffix;
32 private String fileName;
33 private String packageName;
34 private String packageVersion;
35 private String validationData;
36 private ByteBuffer contentData;
37 private String filesDataStructure;
39 public OrchestrationTemplateEntity() {
40 //default constructor implementation is not provided for OrchestrationTemplateEntity
43 public OrchestrationTemplateEntity(String id, Version version) {
45 this.version = version;
49 public String getEntityType() {
54 public String getFirstClassCitizenId() {
59 public String getId() {
64 public void setId(String id) {
69 public Version getVersion() {
74 public void setVersion(Version version) {
75 this.version = version;
78 public String getFileSuffix() {
82 public void setFileSuffix(String fileSuffix) {
83 this.fileSuffix = fileSuffix;
86 public String getFileName() {
90 public void setFileName(String fileName) {
91 this.fileName = fileName;
94 public String getPackageName() {
98 public void setPackageName(String packageName) {
99 this.packageName = packageName;
102 public String getPackageVersion() {
103 return packageVersion;
106 public void setPackageVersion(String packageVersion) {
107 this.packageVersion = packageVersion;
110 public String getValidationData() {
111 return validationData;
114 public void setValidationData(String validationData) {
115 this.validationData = validationData;
118 public ValidationStructureList getValidationDataStructure() {
119 return validationData == null ? null
120 : JsonUtil.json2Object(validationData, ValidationStructureList.class);
123 public void setValidationDataStructure(ValidationStructureList validationData) {
124 this.validationData = validationData == null ? null
125 : JsonUtil.object2Json(validationData);
128 public ByteBuffer getContentData() {
132 public void setContentData(ByteBuffer contentData) {
133 this.contentData = contentData;
136 public String getFilesDataStructure() {
137 return filesDataStructure;
140 public void setFilesDataStructure(String filesDataStructure) {
141 this.filesDataStructure = filesDataStructure;