diff options
Diffstat (limited to 'ecomp-sdk/epsdk-core')
2 files changed, 9 insertions, 4 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 210e494d..7fdc5609 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 @@ -655,10 +655,14 @@ public class ElementMapService { Domain eachDomain = domainMap.get(domainsKey); domainWidth += eachDomain.computeSize().getWidth(); } - thisDomain = new Domain(id, name, 2, 2, domainWidth, 10, 3, rows, columns); + thisDomain = new Domain.DomainBuilder().setId(id).setName(name).setInterContWd(2).setInterContH(2) + .setDomainToLayoutWd(domainWidth).setDomainToLayoutH(10).setDomainToContH(3) + .setNumOfRowsofContainer(rows).setNumOfColsofContainer(columns).createDomain(); } else { - thisDomain = new Domain(id, name, 2, 1, 11, 10, 3, rows, columns); + thisDomain = new Domain.DomainBuilder().setId(id).setName(name).setInterContWd(2).setInterContH(1) + .setDomainToLayoutWd(11).setDomainToLayoutH(10).setDomainToContH(3).setNumOfRowsofContainer(rows) + .setNumOfColsofContainer(columns).createDomain(); } thisDomain.setContainers(domainContainersMap); diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java index f0e4304c..e2655b59 100644 --- a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java @@ -130,8 +130,9 @@ public class ElementMapServiceTest { Layout layout = new Layout(null, 0, 0, 2, 2); Map<String, Domain> domainRowCol = new HashMap<>(); - Domain domain = new Domain("test", "XYZ", 0, 0, 0, 0, 0, 2, 2); - + Domain domain = new Domain.DomainBuilder().setId("test").setName("XYZ").setInterContWd(0).setInterContH(0) + .setDomainToLayoutWd(0).setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2) + .setNumOfColsofContainer(2).createDomain(); Position position = new Position(); position.setX(10); position.setY(10); |