bbc3164f50f0aa9a2207e014cf513ebff1990c09
[sdc.git] /
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 com.fasterxml.jackson.annotation.JsonCreator;
21 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
22
23 import java.io.Serializable;
24
25 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.ARTIFACT_UUID;
26 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRIPTION;
27 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_INPUT_PARAMETERS;
28 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OPERATION_TYPE;
29 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OUTPUT_PARAMETERS;
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;
32 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
33 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.UNIQUE_ID;
34
35 public class InterfaceOperationDataDefinition extends ToscaDataDefinition implements Serializable {
36
37     @JsonCreator
38     public InterfaceOperationDataDefinition() {
39         super();
40     }
41
42     public InterfaceOperationDataDefinition(InterfaceOperationDataDefinition iodd) {
43         super();
44         setUniqueId(iodd.getUniqueId());
45         setInputParams(iodd.getInputParams());
46         setOutputParams(iodd.getOutputParams());
47         setDescription(iodd.getDescription());
48         setToscaResourceName(iodd.getToscaResourceName());
49         setOperationType(iodd.getOperationType());
50         setArtifactUUID(iodd.getArtifactUUID());
51         setWorkflowId(iodd.getWorkflowId());
52         setWorkflowVersionId(iodd.getWorkflowVersionId());
53     }
54
55     public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
56         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
57                 getToscaPresentationValue(IO_INPUT_PARAMETERS);
58     }
59     public void setInputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
60                                        inputParams) {
61         setToscaPresentationValue(IO_INPUT_PARAMETERS, inputParams);
62     }
63
64     public ListDataDefinition<InterfaceOperationParamDataDefinition> getOutputParams() {
65         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
66                 getToscaPresentationValue(IO_OUTPUT_PARAMETERS);
67     }
68     public void setOutputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
69                                         outputParams) {
70         setToscaPresentationValue(IO_OUTPUT_PARAMETERS, outputParams);
71     }
72
73     public String getUniqueId() {
74         return (String) getToscaPresentationValue(UNIQUE_ID);
75     }
76     public void setUniqueId(String uid) {
77         setToscaPresentationValue(UNIQUE_ID, uid);
78     }
79
80     public String getDescription() {
81         return (String) getToscaPresentationValue(DESCRIPTION);
82     }
83     public void setDescription(String description) {
84         setToscaPresentationValue(DESCRIPTION, description);
85     }
86
87     public String getOperationType() {
88         return (String) getToscaPresentationValue(IO_OPERATION_TYPE);
89     }
90     public void setOperationType(String operationType) {
91         setToscaPresentationValue(IO_OPERATION_TYPE, operationType);
92     }
93
94     public String getToscaResourceName() {
95         return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
96     }
97     public void setToscaResourceName(String toscaResourceName) {
98         setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
99     }
100
101     public String getWorkflowId(){
102         return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
103     }
104     public void setWorkflowId(String workflowId) {
105         setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
106     }
107
108     public String getWorkflowVersionId() {
109         return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
110     }
111     public void setWorkflowVersionId(String workflowVersionId) {
112         setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
113     }
114
115     public String getArtifactUUID() {
116         return (String) getToscaPresentationValue(ARTIFACT_UUID);
117     }
118     public void setArtifactUUID(String artifactUUID) {
119         setToscaPresentationValue(ARTIFACT_UUID, artifactUUID);
120     }
121 }