From f8b65d4fedbb40a9abba2459a45ba67c7381a9db Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Fri, 17 May 2019 10:31:27 -0400 Subject: Initial checkin of updates for vf module replace fix toString method and add unit tests for new code Fix Null pointer issue in UT, extra chars Initial checkin of updates for vf module replace Change-Id: I2d62f5c2077cd022ccf796d126494e526ad48c54 Issue-ID: SO-1893 Signed-off-by: Benjamin, Max (mb388a) --- .../so/serviceinstancebeans/RequestParameters.java | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestParameters.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestParameters.java index 1df2c10411..9fceed1641 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestParameters.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestParameters.java @@ -20,11 +20,11 @@ package org.onap.so.serviceinstancebeans; -import java.beans.Transient; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.apache.commons.lang3.builder.ToStringBuilder; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; @@ -52,9 +52,21 @@ public class RequestParameters implements Serializable { private Boolean cascadeDelete; @JsonProperty("testApi") private String testApi; // usePreload would always be true for Update + @JsonProperty("retainAssignments") + private Boolean retainAssignments; // usePreload would always be true for Update @JsonProperty("rebuildVolumeGroups") private Boolean rebuildVolumeGroups; + @Override + public String toString() { + return new ToStringBuilder(this).append("subscriptionServiceType", subscriptionServiceType) + .append("userParams", userParams).append("aLaCarte", aLaCarte).append("payload", payload) + .append("usePreload", usePreload).append("autoBuildVfModules", autoBuildVfModules) + .append("cascadeDelete", cascadeDelete).append("testApi", testApi) + .append("retainAssignments", retainAssignments).append("rebuildVolumeGroups", rebuildVolumeGroups) + .toString(); + } + public String getSubscriptionServiceType() { return subscriptionServiceType; } @@ -150,11 +162,13 @@ public class RequestParameters implements Serializable { this.rebuildVolumeGroups = rebuildVolumeGroups; } - @Override - public String toString() { - return "RequestParameters [subscriptionServiceType=" + subscriptionServiceType + ", userParams=" + userParams - + ", aLaCarte=" + aLaCarte + ", testApi= " + testApi + ", autoBuildVfModules=" + autoBuildVfModules - + ", usePreload=" + usePreload + ", rebuildVolumeGroups=" + rebuildVolumeGroups + ", payload=" + payload - + "]"; + public Boolean getRetainAssignments() { + return retainAssignments; + } + + public void setRetainAssignments(Boolean retainAssignments) { + this.retainAssignments = retainAssignments; } + + } -- cgit 1.2.3-korg