diff options
author | 2019-02-25 18:08:57 +0900 | |
---|---|---|
committer | 2019-02-25 18:55:50 +0900 | |
commit | 3911c26a7fda32b8f3332ceb7fa3adc34b4ece62 (patch) | |
tree | b32411a7e841b78f464d63fdd94c730a4337c42e /ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java | |
parent | 7b740b078f8fb593c2615e8b6689d30ea46a0c86 (diff) |
Reduce method parameter by implementing builder
Issue-ID: PORTAL-529
Change-Id: I1f5adc677d43c2fdc4e18f893e11b708608b0b36
Signed-off-by: arindamm <arind.mondal@samsung.com>
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java')
-rw-r--r-- | ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java index f8a547db..210e494d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java @@ -49,11 +49,7 @@ import java.util.TreeSet; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.StringUtils; -import org.onap.portalsdk.core.domain.support.Container; -import org.onap.portalsdk.core.domain.support.Domain; -import org.onap.portalsdk.core.domain.support.Element; -import org.onap.portalsdk.core.domain.support.ElementDetails; -import org.onap.portalsdk.core.domain.support.Layout; +import org.onap.portalsdk.core.domain.support.*; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.portalsdk.core.util.YamlUtils; @@ -734,9 +730,7 @@ public class ElementMapService { String bgColor = elementDetails.get("background_color") == null ? "bgColor" : elementDetails.get("background_color"); - ElementDetails details = new ElementDetails(logical_group, display_longname, description, - primary_function, network_function, key_interfaces, location, vendor, - vendor_shortname, enclosingContainer); + ElementDetails details = new ElementDetails.ElementDetailsBuilder().setLogical_group(logical_group).setDisplay_longname(display_longname).setDescription(description).setPrimary_function(primary_function).setNetwork_function(network_function).setKey_interfaces(key_interfaces).setLocation(location).setVendor(vendor).setVendor_shortname(vendor_shortname).setEnclosingContainer(enclosingContainer).createElementDetails(); return new Element(name, display_shortname, imgPath, bgColor, borderType, details); } |