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_VERSION_ID;
33 public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
37 public OperationDataDefinition() {
41 public OperationDataDefinition(String description) {
43 setDescription(description);
46 public OperationDataDefinition(OperationDataDefinition p) {
47 setDescription(p.getDescription());
48 setImplementation(p.getImplementation());
49 setInputs(p.getInputs());
50 setOutputs(p.getOutputs());
52 setUniqueId(p.getUniqueId());
53 setWorkflowId(p.getWorkflowId());
54 setWorkflowVersionId(p.getWorkflowVersionId());
55 setWorkflowAssociationType(p.getWorkflowAssociationType());
59 public String getUniqueId() {
60 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
63 public void setUniqueId(String uniqueId) {
64 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
68 public Long getCreationDate() {
69 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
72 public void setCreationDate(Long creationDate) {
73 setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
76 public Long getLastUpdateDate() {
77 return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
80 public void setLastUpdateDate(Long lastUpdateDate) {
81 setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
84 public String getDescription() {
85 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
88 public void setDescription(String description) {
89 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
92 public ArtifactDataDefinition getImplementation() {
93 return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
96 public void setImplementation(ArtifactDataDefinition implementation) {
97 setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
100 public ListDataDefinition<OperationInputDefinition> getInputs() {
101 return (ListDataDefinition<OperationInputDefinition>)
102 getToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS);
105 public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
106 setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
109 public ListDataDefinition<OperationOutputDefinition> getOutputs() {
110 return (ListDataDefinition<OperationOutputDefinition>)
111 getToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS);
114 public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
115 setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
117 public String getName() {
118 return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
121 public void setName(String name) {
122 setToscaPresentationValue(JsonPresentationFields.NAME, name);
125 public String getWorkflowId(){
126 return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
128 public void setWorkflowId(String workflowId) {
129 setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
132 public String getWorkflowVersionId() {
133 return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
135 public void setWorkflowVersionId(String workflowVersionId) {
136 setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
139 public String getWorkflowAssociationType() {
140 return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
143 public void setWorkflowAssociationType(String workflowAssociationType) {
144 setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);