2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
23 import org.openecomp.core.utilities.json.JsonUtil;
24 import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
25 import org.openecomp.sdc.versioning.dao.types.Version;
26 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
28 import java.nio.ByteBuffer;
30 public class OrchestrationTemplateEntity implements VersionableEntity {
31 private static final String ENTITY_TYPE = "Vendor Software Product Orchestration Template";
34 private Version version;
35 private String fileSuffix;
36 private String fileName;
37 private String packageName;
38 private String packageVersion;
39 private String validationData;
40 private ByteBuffer contentData;
42 public OrchestrationTemplateEntity() {
45 public OrchestrationTemplateEntity(String id, Version version) {
47 this.version = version;
51 public String getEntityType() {
56 public String getFirstClassCitizenId() {
60 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;