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