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;
25 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
26 import org.openecomp.sdc.be.datatypes.enums.MilestoneTypeEnum;
27 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
29 import java.io.Serializable;
31 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE;
32 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
33 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_NAME;
34 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION;
35 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
37 public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
41 public OperationDataDefinition() {
45 public OperationDataDefinition(String description) {
47 setDescription(description);
50 public OperationDataDefinition(OperationDataDefinition p) {
51 setMilestones(p.getMilestones());
52 setDescription(p.getDescription());
53 setImplementation(p.getImplementation());
54 setInputs(p.getInputs());
55 setOutputs(p.getOutputs());
57 setUniqueId(p.getUniqueId());
58 setWorkflowId(p.getWorkflowId());
59 setWorkflowVersionId(p.getWorkflowVersionId());
60 setWorkflowAssociationType(p.getWorkflowAssociationType());
61 setWorkflowName(p.getWorkflowName());
62 setWorkflowVersion(p.getWorkflowVersion());
65 public void setMilestones(Map<String, MilestoneDataDefinition> milestones) {
66 setToscaPresentationValue(JsonPresentationFields.OPERATION_MILESTONES, milestones);
69 public Map<String, MilestoneDataDefinition> getMilestones() {
70 return (Map<String, MilestoneDataDefinition> ) getToscaPresentationValue(
71 JsonPresentationFields.OPERATION_MILESTONES);
74 public String getDescription() {
75 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
78 public void setDescription(String description) {
79 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
82 public ArtifactDataDefinition getImplementation() {
83 return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
86 public void setImplementation(ArtifactDataDefinition implementation) {
87 setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
90 public ListDataDefinition<OperationInputDefinition> getInputs() {
91 return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(
92 JsonPresentationFields.OPERATION_INPUTS);
95 public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
96 setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
99 public ListDataDefinition<OperationOutputDefinition> getOutputs() {
100 return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(
101 JsonPresentationFields.OPERATION_OUTPUTS);
104 public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
105 setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
108 public String getName() {
109 return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
112 public String getUniqueId() {
113 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
116 public void setUniqueId(String uniqueId) {
117 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
120 public String getWorkflowId() {
121 return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
124 public void setWorkflowId(String workflowId) {
125 setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
128 public String getWorkflowName() {
129 return (String) getToscaPresentationValue(IO_WORKFLOW_NAME);
132 public void setWorkflowName(String workflowName) {
133 setToscaPresentationValue(IO_WORKFLOW_NAME, workflowName);
136 public String getWorkflowVersionId() {
137 return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
140 public void setWorkflowVersionId(String workflowVersionId) {
141 setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
144 public String getWorkflowVersion() {
145 return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION);
148 public void setWorkflowVersion(String workflowVersion) {
149 setToscaPresentationValue(IO_WORKFLOW_VERSION, workflowVersion);
152 public String getWorkflowAssociationType() {
153 return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
156 public void setWorkflowAssociationType(String workflowAssociationType) {
157 setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
160 public void setName(String name) {
161 setToscaPresentationValue(JsonPresentationFields.NAME, name);
164 public Long getCreationDate() {
165 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
168 public void setCreationDate(Long creationDate) {
169 setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
172 public Long getLastUpdateDate() {
173 return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
176 public void setLastUpdateDate(Long lastUpdateDate) {
177 setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);