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 com.fasterxml.jackson.annotation.JsonCreator;
24 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
25 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
27 import java.io.Serializable;
29 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE;
30 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
31 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_NAME;
32 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION;
33 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
35 public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
39 public OperationDataDefinition() {
43 public OperationDataDefinition(String description) {
45 setDescription(description);
48 public OperationDataDefinition(OperationDataDefinition p) {
49 setDescription(p.getDescription());
50 setImplementation(p.getImplementation());
51 setInputs(p.getInputs());
52 setOutputs(p.getOutputs());
54 setUniqueId(p.getUniqueId());
55 setWorkflowId(p.getWorkflowId());
56 setWorkflowVersionId(p.getWorkflowVersionId());
57 setWorkflowAssociationType(p.getWorkflowAssociationType());
58 setWorkflowName(p.getWorkflowName());
59 setWorkflowVersion(p.getWorkflowVersion());
62 public String getDescription() {
63 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
66 public void setDescription(String description) {
67 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
70 public ArtifactDataDefinition getImplementation() {
71 return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
74 public void setImplementation(ArtifactDataDefinition implementation) {
75 setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
78 public ListDataDefinition<OperationInputDefinition> getInputs() {
79 return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(
80 JsonPresentationFields.OPERATION_INPUTS);
83 public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
84 setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
87 public ListDataDefinition<OperationOutputDefinition> getOutputs() {
88 return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(
89 JsonPresentationFields.OPERATION_OUTPUTS);
92 public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
93 setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
96 public String getName() {
97 return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
100 public String getUniqueId() {
101 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
104 public void setUniqueId(String uniqueId) {
105 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
108 public String getWorkflowId() {
109 return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
112 public void setWorkflowId(String workflowId) {
113 setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
116 public String getWorkflowName() {
117 return (String) getToscaPresentationValue(IO_WORKFLOW_NAME);
120 public void setWorkflowName(String workflowName) {
121 setToscaPresentationValue(IO_WORKFLOW_NAME, workflowName);
124 public String getWorkflowVersionId() {
125 return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
128 public void setWorkflowVersionId(String workflowVersionId) {
129 setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
132 public String getWorkflowVersion() {
133 return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION);
136 public void setWorkflowVersion(String workflowVersion) {
137 setToscaPresentationValue(IO_WORKFLOW_VERSION, workflowVersion);
140 public String getWorkflowAssociationType() {
141 return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
144 public void setWorkflowAssociationType(String workflowAssociationType) {
145 setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
148 public void setName(String name) {
149 setToscaPresentationValue(JsonPresentationFields.NAME, name);
152 public Long getCreationDate() {
153 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
156 public void setCreationDate(Long creationDate) {
157 setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
160 public Long getLastUpdateDate() {
161 return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
164 public void setLastUpdateDate(Long lastUpdateDate) {
165 setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);