From 71d87a36d125d6df59caab045553efa58125c508 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max" Date: Wed, 24 Jun 2020 10:44:53 -0400 Subject: merged ONAP refactor and fluent builder method WorkflowAction refactoring merged ONAP refactor and fluent builder method types Issue-ID: SO-3005 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I5c2a7dbcdf645efe408f81c1abbc7bfe8770fe9e --- .../entities/BuildingBlockBase.java | 101 +++++++++++++++++++++ .../entities/ExecuteBuildingBlock.java | 86 +----------------- 2 files changed, 104 insertions(+), 83 deletions(-) create mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java new file mode 100644 index 0000000000..5be06f9be2 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java @@ -0,0 +1,101 @@ +package org.onap.so.bpmn.servicedecomposition.entities; + +import java.io.Serializable; +import org.onap.so.serviceinstancebeans.RequestDetails; + +public abstract class BuildingBlockBase> implements Serializable { + + private static final long serialVersionUID = 4671883098039479717L; + + private Boolean aLaCarte; + private String apiVersion; + private Boolean isResume; + private String resourceId; + private String requestId; + private String requestAction; + private RequestDetails requestDetails; + private WorkflowResourceIds workflowResourceIds; + private String vnfType; + + public T setaLaCarte(Boolean aLaCarte) { + this.aLaCarte = aLaCarte; + return (T) this; + } + + public T setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (T) this; + } + + public T setResume(Boolean resume) { + isResume = resume; + return (T) this; + } + + public T setResourceId(String resourceId) { + this.resourceId = resourceId; + return (T) this; + } + + public T setRequestId(String requestId) { + this.requestId = requestId; + return (T) this; + } + + public T setRequestAction(String requestAction) { + this.requestAction = requestAction; + return (T) this; + } + + public T setRequestDetails(RequestDetails requestDetails) { + this.requestDetails = requestDetails; + return (T) this; + } + + public T setWorkflowResourceIds(WorkflowResourceIds workflowResourceIds) { + this.workflowResourceIds = workflowResourceIds; + return (T) this; + } + + public T setVnfType(String vnfType) { + this.vnfType = vnfType; + return (T) this; + } + + public Boolean isResume() { + return isResume; + } + + public String getRequestId() { + return requestId; + } + + public String getApiVersion() { + return apiVersion; + } + + public String getResourceId() { + return resourceId; + } + + public String getRequestAction() { + return requestAction; + } + + public Boolean isaLaCarte() { + return aLaCarte; + } + + public String getVnfType() { + return vnfType; + } + + public WorkflowResourceIds getWorkflowResourceIds() { + return workflowResourceIds; + } + + public RequestDetails getRequestDetails() { + return requestDetails; + } + +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java index abd301fa4d..e867b670b7 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java @@ -23,20 +23,12 @@ package org.onap.so.bpmn.servicedecomposition.entities; import java.io.Serializable; import org.onap.so.serviceinstancebeans.RequestDetails; -public class ExecuteBuildingBlock implements Serializable { +public class ExecuteBuildingBlock extends BuildingBlockBase implements Serializable { - private static final long serialVersionUID = 2L; private BuildingBlock buildingBlock; - private String requestId; - private String apiVersion; - private String resourceId; - private String requestAction; - private String vnfType; - private Boolean aLaCarte; - private Boolean homing = false; - private WorkflowResourceIds workflowResourceIds; - private RequestDetails requestDetails; private ConfigurationResourceKeys configurationResourceKeys; + private Boolean homing = false; + private static final long serialVersionUID = 3L; public BuildingBlock getBuildingBlock() { return buildingBlock; @@ -47,60 +39,6 @@ public class ExecuteBuildingBlock implements Serializable { return this; } - public String getRequestId() { - return requestId; - } - - public ExecuteBuildingBlock setRequestId(String requestId) { - this.requestId = requestId; - return this; - } - - public String getApiVersion() { - return apiVersion; - } - - public ExecuteBuildingBlock setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - public String getResourceId() { - return resourceId; - } - - public ExecuteBuildingBlock setResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - public String getRequestAction() { - return requestAction; - } - - public ExecuteBuildingBlock setRequestAction(String requestAction) { - this.requestAction = requestAction; - return this; - } - - public Boolean isaLaCarte() { - return aLaCarte; - } - - public ExecuteBuildingBlock setaLaCarte(Boolean aLaCarte) { - this.aLaCarte = aLaCarte; - return this; - } - - public String getVnfType() { - return vnfType; - } - - public ExecuteBuildingBlock setVnfType(String vnfType) { - this.vnfType = vnfType; - return this; - } - public Boolean isHoming() { return homing; } @@ -110,24 +48,6 @@ public class ExecuteBuildingBlock implements Serializable { return this; } - public WorkflowResourceIds getWorkflowResourceIds() { - return workflowResourceIds; - } - - public ExecuteBuildingBlock setWorkflowResourceIds(WorkflowResourceIds workflowResourceIds) { - this.workflowResourceIds = workflowResourceIds; - return this; - } - - public RequestDetails getRequestDetails() { - return requestDetails; - } - - public ExecuteBuildingBlock setRequestDetails(RequestDetails requestDetails) { - this.requestDetails = requestDetails; - return this; - } - public ConfigurationResourceKeys getConfigurationResourceKeys() { return configurationResourceKeys; } -- cgit 1.2.3-korg