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.be.datatypes.elements;
23 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
24 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
26 import java.util.List;
28 public class CapabilityTypeDataDefinition extends ToscaDataDefinition {
30 public CapabilityTypeDataDefinition(CapabilityTypeDataDefinition cdt) {
31 this.setUniqueId(cdt.getUniqueId());
32 this.setDescription ( cdt.getDescription());
33 this.setType(cdt.getType());
34 this.setValidSourceTypes( cdt.getValidSourceTypes());
35 this.setVersion( cdt.getVersion());
36 this.setCreationTime (cdt.getCreationTime());
37 this.setModificationTime (cdt.getModificationTime());
40 public CapabilityTypeDataDefinition() {
44 public String getUniqueId() {
45 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
48 public void setUniqueId(String uniqueId) {
49 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
52 public String getDescription() {
53 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
56 public void setDescription(String description) {
57 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
60 public String getType() {
61 return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
64 public void setType(String type) {
65 setToscaPresentationValue(JsonPresentationFields.TYPE, type);
68 public List<String> getValidSourceTypes() {
69 return (List<String> ) getToscaPresentationValue(JsonPresentationFields.VALID_SOURCE_TYPE);
72 public void setValidSourceTypes(List<String> validSourceTypes) {
73 setToscaPresentationValue(JsonPresentationFields.VALID_SOURCE_TYPE, validSourceTypes);
76 public String getVersion() {
77 return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
80 public void setVersion(String version) {
81 setToscaPresentationValue(JsonPresentationFields.VERSION, version);
84 public Long getCreationTime() {
85 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_TIME);
88 public void setCreationTime(Long creationTime) {
89 setToscaPresentationValue(JsonPresentationFields.CREATION_TIME, creationTime);
92 public Long getModificationTime() {
93 return (Long) getToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME);
96 public void setModificationTime(Long modificationTime) {
97 setToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME, modificationTime);
101 public String toString() {
102 String uniqueId = getUniqueId();
103 String description = getDescription();
104 String type = getType();
105 List<String> validSourceTypes = getValidSourceTypes();
106 String version = getVersion();
107 Long creationTime = getCreationTime();
108 Long modificationTime = getModificationTime();
110 return "CapabilityTypeDataDefinition [uniqueId=" + uniqueId + ", description=" + description + ", type=" + type
111 + ", validSourceTypes=" + validSourceTypes + ", version=" + version + ", creationTime=" + creationTime
112 + ", modificationTime=" + modificationTime + "]";