From 23755c690fdbd4c7b5139dd62476ca13950f0120 Mon Sep 17 00:00:00 2001 From: zm330 Date: Wed, 4 Mar 2020 13:57:15 +0800 Subject: Add service beans in bpmn Issue-ID: SO-2368 Signed-off-by: zm330 Change-Id: I64cfa0cbb55a6609289fba70b2419dd628583ad5 --- .../org/onap/so/bpmn/core/domain/ServiceInfo.java | 97 ++++++++++++++++++++++ .../org/onap/so/bpmn/core/domain/ServiceProxy.java | 78 +++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInfo.java create mode 100644 bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceProxy.java diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInfo.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInfo.java new file mode 100644 index 0000000000..542fa2d463 --- /dev/null +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInfo.java @@ -0,0 +1,97 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2019, CMCC Technologies Co., Ltd. + # + # Licensed under the Apache License, Version 2.0 (the "License") + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.so.bpmn.core.domain; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.*; + + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"id", "serviceInput", "serviceProperties", "serviceArtifact"}) +@JsonRootName("serviceInfo") +public class ServiceInfo extends JsonWrapper implements Serializable { + private static final long serialVersionUID = 1L; + @JsonProperty("id") + private Integer id; + @JsonProperty("serviceInput") + private String serviceInput; + @JsonProperty("serviceProperties") + private String serviceProperties; + @JsonProperty("serviceArtifact") + private List serviceArtifact = null; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("id") + public Integer getId() { + return id; + } + + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + @JsonProperty("serviceInput") + public String getServiceInput() { + return serviceInput; + } + + @JsonProperty("serviceInput") + public void setServiceInput(String serviceInput) { + this.serviceInput = serviceInput; + } + + @JsonProperty("serviceProperties") + public String getServiceProperties() { + return serviceProperties; + } + + @JsonProperty("serviceProperties") + public void setServiceProperties(String serviceProperties) { + this.serviceProperties = serviceProperties; + } + + @JsonProperty("serviceArtifact") + public List getServiceArtifact() { + return serviceArtifact; + } + + @JsonProperty("serviceArtifact") + public void setServiceArtifact(List serviceArtifact) { + this.serviceArtifact = serviceArtifact; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} + + diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceProxy.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceProxy.java new file mode 100644 index 0000000000..6903d34987 --- /dev/null +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceProxy.java @@ -0,0 +1,78 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2019, CMCC Technologies Co., Ltd. + # + # Licensed under the Apache License, Version 2.0 (the "License") + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.so.bpmn.core.domain; + +import java.io.Serializable; +import com.fasterxml.jackson.annotation.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"modelInfo", "toscaNodeType", "description", "sourceModelUuid"}) +@JsonRootName("serviceProxy") +public class ServiceProxy extends JsonWrapper implements Serializable { + private static final long serialVersionUID = 1L; + @JsonProperty("modelInfo") + private ModelInfo modelInfo; + @JsonProperty("toscaNodeType") + private String toscaNodeType; + @JsonProperty("description") + private String description; + @JsonProperty("sourceModelUuid") + private String sourceModelUuid; + + @JsonProperty("modelInfo") + public ModelInfo getModelInfo() { + return modelInfo; + } + + @JsonProperty("modelInfo") + public void setModelInfo(ModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + + @JsonProperty("toscaNodeType") + public String getToscaNodeType() { + return toscaNodeType; + } + + @JsonProperty("toscaNodeType") + public void setToscaNodeType(String toscaNodeType) { + this.toscaNodeType = toscaNodeType; + } + + @JsonProperty("description") + public String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @JsonProperty("sourceModelUuid") + public String getSourceModelUuid() { + return sourceModelUuid; + } + + @JsonProperty("sourceModelUuid") + public void setSourceModelUuid(String sourceModelUuid) { + this.sourceModelUuid = sourceModelUuid; + } +} -- cgit 1.2.3-korg