f93e41cf512bb5ff2b87ad1f2af395e7890bf8a7
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / OperationDataDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.openecomp.sdc.be.datatypes.elements;
22
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;
26
27 import java.io.Serializable;
28
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;
34
35 public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
36
37
38     @JsonCreator
39     public OperationDataDefinition() {
40         super();
41     }
42
43     public OperationDataDefinition(String description) {
44         super();
45         setDescription(description);
46     }
47
48     public OperationDataDefinition(OperationDataDefinition p) {
49         setDescription(p.getDescription());
50         setImplementation(p.getImplementation());
51         setInputs(p.getInputs());
52         setOutputs(p.getOutputs());
53         setName(p.getName());
54         setUniqueId(p.getUniqueId());
55         setWorkflowId(p.getWorkflowId());
56         setWorkflowVersionId(p.getWorkflowVersionId());
57         setWorkflowAssociationType(p.getWorkflowAssociationType());
58         setWorkflowName(p.getWorkflowName());
59         setWorkflowVersion(p.getWorkflowVersion());
60     }
61
62     public String getDescription() {
63         return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
64     }
65
66     public void setDescription(String description) {
67         setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
68     }
69
70     public ArtifactDataDefinition getImplementation() {
71         return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
72     }
73
74     public void setImplementation(ArtifactDataDefinition implementation) {
75         setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
76     }
77
78     public ListDataDefinition<OperationInputDefinition> getInputs() {
79         return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(
80                 JsonPresentationFields.OPERATION_INPUTS);
81     }
82
83     public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
84         setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
85     }
86
87     public ListDataDefinition<OperationOutputDefinition> getOutputs() {
88         return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(
89                 JsonPresentationFields.OPERATION_OUTPUTS);
90     }
91
92     public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
93         setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
94     }
95
96     public String getName() {
97         return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
98     }
99
100     public String getUniqueId() {
101         return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
102     }
103
104     public void setUniqueId(String uniqueId) {
105         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
106     }
107
108     public String getWorkflowId() {
109         return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
110     }
111
112     public void setWorkflowId(String workflowId) {
113         setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
114     }
115
116     public String getWorkflowName() {
117         return (String) getToscaPresentationValue(IO_WORKFLOW_NAME);
118     }
119
120     public void setWorkflowName(String workflowName) {
121         setToscaPresentationValue(IO_WORKFLOW_NAME, workflowName);
122     }
123
124     public String getWorkflowVersionId() {
125         return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
126     }
127
128     public void setWorkflowVersionId(String workflowVersionId) {
129         setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
130     }
131
132     public String getWorkflowVersion() {
133         return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION);
134     }
135
136     public void setWorkflowVersion(String workflowVersion) {
137         setToscaPresentationValue(IO_WORKFLOW_VERSION, workflowVersion);
138     }
139
140     public String getWorkflowAssociationType() {
141         return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
142     }
143
144     public void setWorkflowAssociationType(String workflowAssociationType) {
145         setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
146     }
147
148     public void setName(String name) {
149         setToscaPresentationValue(JsonPresentationFields.NAME, name);
150     }
151
152     public Long getCreationDate() {
153         return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
154     }
155
156     public void setCreationDate(Long creationDate) {
157         setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
158     }
159
160     public Long getLastUpdateDate() {
161         return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
162     }
163
164     public void setLastUpdateDate(Long lastUpdateDate) {
165         setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
166     }
167 }