Revert "Delete workflow artifact
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / InterfaceOperationDataDefinition.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package org.openecomp.sdc.be.datatypes.elements;
18
19
20 import java.io.Serializable;
21
22 import com.fasterxml.jackson.annotation.JsonCreator;
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
24
25 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRIPTION;
26 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
27 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
28 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.UNIQUE_ID;
29 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_INPUT_PARAMETERS;
30 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OPERATION_TYPE;
31 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OUTPUT_PARAMETERS;
32 public class InterfaceOperationDataDefinition extends ToscaDataDefinition implements Serializable {
33
34     @JsonCreator
35     public InterfaceOperationDataDefinition() {
36         super();
37     }
38
39     public InterfaceOperationDataDefinition(InterfaceOperationDataDefinition iodd) {
40         super();
41         setUniqueId(iodd.getUniqueId());
42         setInputParams(iodd.getInputParams());
43         setOutputParams(iodd.getOutputParams());
44         setDescription(iodd.getDescription());
45         setToscaResourceName(iodd.getToscaResourceName());
46         setOperationType(iodd.getOperationType());
47         setWorkflowId(iodd.getWorkflowId());
48     }
49
50     public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
51         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
52                 getToscaPresentationValue(IO_INPUT_PARAMETERS);
53     }
54     public void setInputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
55                                        inputParams) {
56         setToscaPresentationValue(IO_INPUT_PARAMETERS, inputParams);
57     }
58
59     public ListDataDefinition<InterfaceOperationParamDataDefinition> getOutputParams() {
60         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
61                 getToscaPresentationValue(IO_OUTPUT_PARAMETERS);
62     }
63     public void setOutputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
64                                         outputParams) {
65         setToscaPresentationValue(IO_OUTPUT_PARAMETERS, outputParams);
66     }
67
68     public String getUniqueId() {
69         return (String) getToscaPresentationValue(UNIQUE_ID);
70     }
71     public void setUniqueId(String uid) {
72         setToscaPresentationValue(UNIQUE_ID, uid);
73     }
74
75     public String getDescription() {
76         return (String) getToscaPresentationValue(DESCRIPTION);
77     }
78     public void setDescription(String description) {
79         setToscaPresentationValue(DESCRIPTION, description);
80     }
81
82     public String getOperationType() {
83         return (String) getToscaPresentationValue(IO_OPERATION_TYPE);
84     }
85     public void setOperationType(String operationType) {
86         setToscaPresentationValue(IO_OPERATION_TYPE, operationType);
87     }
88
89     public String getToscaResourceName() {
90         return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
91     }
92     public void setToscaResourceName(String toscaResourceName) {
93         setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
94     }
95
96     public String getWorkflowId() {
97         return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
98     }
99     public void setWorkflowId(String workflowId) {
100         setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
101     }
102 }