diff options
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support')
12 files changed, 0 insertions, 2361 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java deleted file mode 100644 index 948d78a0..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -public class Attribute { - private double width; - private double top; - private double left; - private String name; - private double height; - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getTop() { - return top; - } - - public void setTop(double top) { - this.top = top; - } - - public double getLeft() { - return left; - } - - public void setLeft(double left) { - this.left = left; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public double getHeight() { - return height; - } - - public void setHeight(double height) { - this.height = height; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java deleted file mode 100644 index 32828b78..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.io.Serializable; -import java.util.HashSet; -import java.util.Set; - -public class CollaborateList implements Serializable { - - private static final long serialVersionUID = -4104440747626736243L; - private HashSet<String> userNameList = new HashSet<>(); - private static CollaborateList userListData = new CollaborateList(); - - private CollaborateList() { - } - - public static CollaborateList getInstance() { - return userListData; - } - - public Set<String> getAllUserName() { - return userNameList; - } - - public static void addUserName(String name) { - final Set<String> allUserName = CollaborateList.getInstance().getAllUserName(); - if (!allUserName.contains(name)) - allUserName.add(name); - } - - public static void delUserName(String name) { - final Set<String> allUserName = CollaborateList.getInstance().getAllUserName(); - allUserName.remove((String) name); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java deleted file mode 100644 index ed065b4a..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.util.List; -import java.util.Map; - -import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; - -public class Container { - - private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Container.class); - - String id; - - String name; - - Size size; - - Position p; - - Map<String, Container> containerRowCol; - - Map<String, Element> elementRowCol; - - int numOfRows; - - int numOfCols; - - double sum = 0; - - double interEleWd; - - double interEleH; - - double interEleToContainerWd; - - double interEleToContainerH; - - double interEleToInnerContainerWd; - - double interEleToInnerContainerH; - - double top; - - double left; - - double height; - - double width; - - String visibilityType; - - List<Container> innerCList; - - List<Element> elementList; - - public Container() { - - } - - public Container(String id, String name, int numOfRows, int numOfCols, double interEleWd, double interEleH, - double interEleToContainerWd, double interEleToContainerH, double interEleToInnerContainerWd, - double interEleToInnerContainerH) { - - this.id = id; - this.name = name; - this.numOfRows = numOfRows; - this.numOfCols = numOfCols; - this.interEleWd = interEleWd; - this.interEleH = interEleH; - this.interEleToContainerWd = interEleToContainerWd; - this.interEleToContainerH = interEleToContainerH; - this.interEleToInnerContainerWd = interEleToInnerContainerWd; - this.interEleToInnerContainerH = interEleToInnerContainerH; - - } - - public Map<String, Container> getContainerRowCol() { - return containerRowCol; - } - - public Map<String, Element> getElementRowCol() { - return elementRowCol; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public void setInnerContainer(Map<String, Container> innerCon) { - containerRowCol = innerCon; - } - - public void setElements(Map<String, Element> innerE) { - elementRowCol = innerE; - } - - public Position getP() { - return p; - } - - public void setP(Position p) { - this.p = p; - } - - public void setTop(double top) { - this.top = top; - } - - public void setLeft(double left) { - this.left = left; - } - - public void setHeight(double height) { - this.height = height; - } - - public void setWidth(double width) { - this.width = width; - } - - public void setInnerCList(List<Container> innerCList) { - this.innerCList = innerCList; - } - - public void setElementList(List<Element> elementList) { - this.elementList = elementList; - } - - public void setVisibilityType(String visibilityType) { - this.visibilityType = visibilityType; - } - - public Size computeSize() { - logger.debug("computeSize: name is {}", getName()); - Size size = new Size(); - double width = 0; - double height = 0; - for (int i = 0; i < numOfRows; i++) { - if ((containerRowCol != null && containerRowCol.containsKey(i + String.valueOf(numOfCols - 1))) - || (elementRowCol != null && elementRowCol.containsKey(i + String.valueOf(numOfCols - 1)))) { - for (int j = 0; j < numOfCols; j++) { - if (containerRowCol != null && containerRowCol.containsKey(i + String.valueOf(j))) { - width += containerRowCol.get(i + String.valueOf(j)).computeSize().getWidth(); - } else if (elementRowCol != null && elementRowCol.containsKey(i + String.valueOf(j))) - width += elementRowCol.get(i + String.valueOf(j)).computeSize().getWidth(); - } - break; - } - } - - if (this.getName().equals("Broadworks complex") || this.getName().equals("Application Servers") - || this.getName().equals("Call Session Control") || this.getName().equals("GMLC Provider") - || this.getName().equals("Neo") || this.getName().equals("Support")) { - width += (numOfCols - 1) * interEleWd + 2 * interEleToInnerContainerWd; - } else { - width += (numOfCols - 1) * interEleWd + 2 * interEleToContainerWd; - } - size.setWidth(width); - for (int j = 0; j < numOfCols; j++) { - if ((containerRowCol != null && containerRowCol.containsKey(String.valueOf(numOfRows - 1) + j)) - || (elementRowCol != null && elementRowCol.containsKey(String.valueOf(numOfRows - 1) + j))) { - for (int i = 0; i < numOfRows; i++) { - if (containerRowCol != null && containerRowCol.containsKey(i + String.valueOf(j))) { - height += containerRowCol.get(i + String.valueOf(j)).computeSize().getHeight(); - } else if (elementRowCol != null && elementRowCol.containsKey(i + String.valueOf(j))) - height += elementRowCol.get(String.valueOf(i) + String.valueOf(j)).computeSize().getHeight(); - } - break; - } - } - if (this.getName().equals("Broadworks complex") || this.getName().equals("Application Servers") - || this.getName().equals("Call Session Control") || this.getName().equals("GMLC Provider") - || this.getName().equals("Neo") || this.getName().equals("Support")) { - height += (numOfRows - 1) * interEleH + 2 * interEleToInnerContainerH + 0.1; - } else { - if (this.getName().equals("VoLTE UE") || this.getName().equals("3G UE") || this.getName().equals("HC UE-A") - || this.getName().equals("HC UE-B") || this.getName().equals("VNI UE") - || this.getName().equals("PSTN")) { - height += (numOfRows - 1) * interEleH + interEleToContainerH / 2; - } else - height += (numOfRows - 1) * interEleH + 2 * interEleToContainerH; - } - size.setHeight(height); - return size; - } - - public void computeElementPositions() { - double xsum = 0; - double ysum = 0; - for (int i = 0; i < numOfRows; i++) { - for (int j = 0; j < numOfCols; j++) { - if (containerRowCol != null && containerRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) { - Container c = containerRowCol.get(String.valueOf(i) + String.valueOf(j)); - Position p = new Position(); - p.x = j * interEleWd + xsum + this.getP().getX() + interEleToContainerWd; - ysum = 0; - for (int k = 0; k < i; k++) { - if (containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize() - .getHeight(); - else if (elementRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += elementRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize().getHeight(); - } - p.y = i * interEleH + ysum + this.getP().getY() + interEleToContainerH; - // containerCoord.add(c,p); - xsum += c.computeSize().getWidth(); - c.setP(p); - - } else if (elementRowCol != null && elementRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) { - Element e = elementRowCol.get(String.valueOf(i) + String.valueOf(j)); - Position p = new Position(); - if (j == numOfCols - 1) { - for (int t = 0; t < i; t++) { - if (containerRowCol != null - && containerRowCol.containsKey(String.valueOf(t) + String.valueOf(j - 1))) { - if (!elementRowCol.containsKey(String.valueOf(i) + String.valueOf(j - 1)) - && !containerRowCol.containsKey(String.valueOf(i) + String.valueOf(j - 1))) { - xsum += containerRowCol.get(String.valueOf(t) + String.valueOf(j - 1)).computeSize() - .getWidth(); - break; - } - } - } - } - if (this.getName().equals("Broadworks complex") || this.getName().equals("Application Servers") - || this.getName().equals("Call Session Control") || this.getName().equals("GMLC Provider") - || this.getName().equals("Neo") || this.getName().equals("Support")) { - p.x = j * interEleWd + xsum + this.getP().getX() + interEleToInnerContainerWd; - } else if (this.getName().equals("VNI UE") || this.getName().equals("PSTN") - || this.getName().equals("3G UE") || this.getName().equals("HC UE-A") - || this.getName().equals("HC UE-B")) { - p.x = j * interEleWd + xsum + this.getP().getX() + interEleToContainerWd - 0.8; - } else { - p.x = j * interEleWd + xsum + this.getP().getX() + interEleToContainerWd; - } - ysum = 0; - for (int k = 0; k < i; k++) { - if (containerRowCol != null - && containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize() - .getHeight(); - else if (elementRowCol != null - && elementRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += elementRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize().getHeight(); - else if (containerRowCol != null) { - for (int chk = j; chk > 0; chk--) { - if (containerRowCol.containsKey(String.valueOf(k) + String.valueOf(chk - 1))) { - if (containerRowCol.get(String.valueOf(k) + String.valueOf(chk - 1)).computeSize() - .getWidth() - + containerRowCol.get(String.valueOf(k) + String.valueOf(chk - 1)).getP() - .getX() > p.x) { - ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(chk - 1)) - .computeSize().getHeight(); - break; - } - } - } - } - - } - if (this.getName().equals("Broadworks complex") || this.getName().equals("Application Servers") - || this.getName().equals("Call Session Control") || this.getName().equals("GMLC Provider") - || this.getName().equals("Neo") || this.getName().equals("Support")) { - p.y = this.getP().getY() + ysum + i * interEleH + interEleToInnerContainerH + 1; - } else { - if (e.getName().equals("")) { - p.y = this.getP().getY() + ysum + i * interEleH + (interEleToContainerH); - } else - p.y = this.getP().getY() + ysum + i * interEleH + interEleToContainerH; - } - xsum += e.computeSize().getWidth(); - e.setP(p); - } - } - xsum = 0; - } - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java deleted file mode 100644 index afd4f589..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.util.List; -import java.util.Map; - -public class Domain { - // Unique identifier of the domain - String id; - String name; - Size size; - Position p; - // Horizontal space between a pair of containers - double interContWd = 1.0; - // Vertical space between a pair of containers - double interContH; - double domainToLayoutWd; - double domainToContH; - double domainToLayoutH; - int numOfRowsofContainer; - int numOfColsofContainer; - boolean indexChanged; - Map<String, Container> containerRowCol; - double top; - double left; - double height; - double width; - List<Container> containerList; - double newXafterColl; - double YafterColl; - - public Domain(String id, String name, double interContWd, double interContH, double domainToLayoutWd, - double domainToLayoutH, double domainToContH, int numOfRowsofContainer, int numOfColsofContainer) { - this.id = id; - this.name = name; - this.interContWd = interContWd; - this.interContH = interContH; - this.domainToLayoutWd = domainToLayoutWd; - this.domainToLayoutH = domainToLayoutH; - this.domainToContH = domainToContH; - this.numOfRowsofContainer = numOfRowsofContainer; - this.numOfColsofContainer = numOfColsofContainer; - } - - public Position getP() { - return p; - } - - public void setP(Position p) { - this.p = p; - } - - public void setNewXafterColl(double newXafterColl) { - this.newXafterColl = newXafterColl; - } - - public double getNewXafterColl() { - return newXafterColl; - } - - public double getYafterColl() { - return YafterColl; - } - - public void setYafterColl(double yafterColl) { - YafterColl = yafterColl; - } - - public void setDomainToLayoutWd(double domainToLayoutWd) { - this.domainToLayoutWd = domainToLayoutWd; - } - - public double getDomainToLayoutWd() { - return domainToLayoutWd; - } - - public double getTop() { - return top; - } - - public void setTop(double top) { - this.top = top; - } - - public double getLeft() { - return left; - } - - public void setLeft(double left) { - this.left = left; - } - - public double getHeight() { - return height; - } - - public void setHeight(double height) { - this.height = height; - } - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public void setName(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setContainers(Map<String, Container> containerRowCol) { - this.containerRowCol = containerRowCol; - } - - public Map<String, Container> getContainerRowCol() { - return containerRowCol; - } - - public void setContainerList(List<Container> containerList) { - this.containerList = containerList; - } - - public boolean isIndexChanged() { - return indexChanged; - } - - public void setIndexChanged(boolean indexChanged) { - this.indexChanged = indexChanged; - } - - // Compute the size of any domain - public Size computeSize() { - size = new Size(); - size.setHeight(5); - double myWidth = 0; - for (int i = 0; i < numOfRowsofContainer; i++) { - if (containerRowCol != null - && containerRowCol.containsKey(String.valueOf(i) + String.valueOf(numOfColsofContainer - 1))) { - for (int j = 0; j < numOfColsofContainer; j++) { - myWidth += containerRowCol.get(String.valueOf(i) + String.valueOf(j)).computeSize().getWidth(); - } - break; - } - - } - myWidth += (numOfColsofContainer - 1) * interContWd; - if (this.getName().equals("VNI")) - size.setWidth(myWidth - 4); - else - size.setWidth(myWidth); - return size; - } - - public void computeConatinerPositions() { - - double xsum = 0; - for (int i = 0; i < numOfRowsofContainer; i++) { - for (int j = 0; j < numOfColsofContainer; j++) { - if (containerRowCol != null && containerRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) { - Container c = containerRowCol.get(String.valueOf(i) + String.valueOf(j)); - Position p = new Position(); - p.x = j * interContWd + xsum + domainToLayoutWd; - double ysum = 0; - for (int k = 0; k < i; k++) { - if (containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize() - .getHeight(); - } - p.y = domainToLayoutH + ysum + this.computeSize().getHeight() + domainToContH + i * interContH; - c.setP(p); - xsum += c.computeSize().getWidth(); - } - } - xsum = 0; - - } - - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java deleted file mode 100644 index ba4a1f34..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.Date; -import java.util.Set; - -import org.onap.portalsdk.core.domain.FusionVo; -import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; - -/* Super class from which all data objects descend */ -public class DomainVo extends FusionVo implements Serializable, Cloneable, Comparable { - - private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DomainVo.class); - - private static final long serialVersionUID = 1L; - protected Long id; - protected Date created; - protected Date modified; - protected Long createdId; - protected Long modifiedId; - protected Long rowNum; - protected Serializable auditUserId; - protected Set auditTrail = null; - - public DomainVo() { - super(); - } - - public void setId(Long i) { - id = i; - } - - public void setCreated(Date created) { - this.created = created; - } - - public void setModified(Date modified) { - this.modified = modified; - } - - public void setCreatedId(Long createdId) { - this.createdId = createdId; - } - - public void setModifiedId(Long modifiedId) { - this.modifiedId = modifiedId; - } - - public void setAuditUserId(Serializable auditUserId) { - this.auditUserId = auditUserId; - } - - public void setRowNum(Long rowNum) { - this.rowNum = rowNum; - } - - public void setAuditTrail(Set auditTrail) { - this.auditTrail = auditTrail; - } - - public Long getId() { - return id; - } - - public Date getCreated() { - return created; - } - - public Date getModified() { - return modified; - } - - public Long getCreatedId() { - return createdId; - } - - public Long getModifiedId() { - return modifiedId; - } - - public Serializable getAuditUserId() { - return auditUserId; - } - - public Long getRowNum() { - return rowNum; - } - - public Set getAuditTrail() { - return auditTrail; - } - - public Object copy() { - return copy(false); - } - - public Object copy(boolean isIdNull) { - // let's create a "copy" of the object using serialization - ByteArrayOutputStream baos = null; - ByteArrayInputStream bais = null; - ObjectOutputStream oos = null; - ObjectInputStream ois = null; - - DomainVo newVo = null; - try { - baos = new ByteArrayOutputStream(); - oos = new ObjectOutputStream(baos); - oos.writeObject(this); - - bais = new ByteArrayInputStream(baos.toByteArray()); - ois = new ObjectInputStream(bais); - newVo = (DomainVo) ois.readObject(); - - if (isIdNull) { - newVo.setId(null); - } - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "copy failed", e); - } - - return newVo; - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - @Override - public boolean equals(Object other) { - if (this == other) - return true; - if (other == null) - return false; - if (!(other instanceof DomainVo)) - return false; - DomainVo castOther = (DomainVo) other; - return this.getId() == castOther.getId() - && this.getCreated().equals(castOther.getCreated()) - && this.getCreatedId() == castOther.getCreatedId() - && this.getModified().equals(castOther.getModified()) - && this.getModifiedId() == castOther.getModifiedId() - ; - } - - @Override - public int compareTo(Object obj) { - Long c1 = getId(); - Long c2 = ((DomainVo) obj).getId(); - return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java deleted file mode 100644 index 1bf6a150..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -public class Element { - - String id; - String name; - - double top; - - double left; - - double height; - - double width; - - String imgFileName; - - String borderType; - - String bgColor; - - ElementDetails details; - - Position p; - - public Element(String id, String name) { - this.id = id; - this.name = name; - } - - public Element(String id, String name, String imgFilename, String bgColor, String borderType, - ElementDetails details) { - this.id = id; - this.name = name; - this.imgFileName = imgFilename; - this.bgColor = bgColor; - this.borderType = borderType; - this.details = details; - - } - - public void setBgColor(String bgColor) { - this.bgColor = bgColor; - } - - public void setId(String id) { - this.id = id; - } - - public void setTop(double top) { - this.top = top; - } - - public void setLeft(double left) { - this.left = left; - } - - public void setHeight(double height) { - this.height = height; - } - - public void setWidth(double width) { - this.width = width; - } - - public String getId() { - return id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Position getP() { - return p; - } - - public void setP(Position p) { - this.p = p; - } - - public void setBorderType(String borderType) { - this.borderType = borderType; - } - - public String getImgFileName() { - return imgFileName; - } - - public void setImgFileName(String imgFileName) { - this.imgFileName = imgFileName; - } - - public String getBorderType() { - return borderType; - } - - public ElementDetails getDetails() { - return details; - } - - public void setDetails(ElementDetails details) { - this.details = details; - } - - public Size computeSize() { - Size size = new Size(); - size.setWidth(0.5 * 7.0); - size.setHeight(0.5 * 3.0); - return size; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java deleted file mode 100644 index 73ccd5d6..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -public class ElementDetails { - - String logical_group; - String display_longname; - String description; - String primary_function; - String network_function; - String key_interfaces; - String location; - String vendor; - String vendor_shortname; - String enclosingContainer; - - public ElementDetails(String logical_group, String display_longname, String description, String primary_function, - String network_function, String key_interfaces, String location, String vendor, String vendor_shortname, - String enclosingContainer) { - - this.logical_group = logical_group; - this.display_longname = display_longname; - this.description = description; - this.primary_function = primary_function; - this.network_function = network_function; - this.key_interfaces = key_interfaces; - this.location = location; - this.vendor = vendor; - this.vendor_shortname = vendor_shortname; - this.enclosingContainer = enclosingContainer; - } - - public String getLogical_group() { - return logical_group; - } - - public void setLogical_group(String logical_group) { - this.logical_group = logical_group; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java deleted file mode 100644 index 3ee8f642..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import org.onap.portalsdk.core.FusionObject; - -public class FusionCommand implements FusionObject { - - private String task; - - public String getTask() { - return task; - } - - public void setTask(String task) { - this.task = task; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java deleted file mode 100644 index c729eef4..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java +++ /dev/null @@ -1,955 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -public class Layout { - - Map<String, Domain> domainRowCol; - - Map<String, Domain> originalDomainRowCol; - - // Horizontal space between a pair of domains - double interDomainWd; - // Vertical space between a pair of domains - double interDomainH; - // Computing the co-ordinates of any domain - int numberofRowsofDomains; - - int numberofColsofDomains; - - Map<String, Domain> collapsedDomains; - - List<Domain> collapsedDomainsNewList; - - public Layout(Map<String, Domain> domainRowCol, double interDomainWd, double interDomainH, - int numberofRowsofDomains, int numberofColsofDomains) { - - this.domainRowCol = domainRowCol; - this.interDomainWd = interDomainWd; - this.interDomainH = interDomainH; - this.numberofRowsofDomains = numberofRowsofDomains; - this.numberofColsofDomains = numberofColsofDomains; - this.collapsedDomains = new HashMap<>(); - this.originalDomainRowCol = new TreeMap<>(); - // nline - this.collapsedDomainsNewList = new ArrayList<>(); - } - - public List<Domain> getCollapsedDomainsNewList() { - return collapsedDomainsNewList; - } - - public void setCollapsedDomainsNewList(List<Domain> collapsedDomainsNewList) { - this.collapsedDomainsNewList = collapsedDomainsNewList; - } - - public void setCollapsedDomains(Map<String, Domain> collapsedDomains) { - this.collapsedDomains = collapsedDomains; - } - - public Map<String, Domain> getCollapsedDomains() { - return collapsedDomains; - } - - public int getNumberofColsofDomains() { - return numberofColsofDomains; - } - - public void setNumberofColsofDomains(int numberofColsofDomains) { - this.numberofColsofDomains = numberofColsofDomains; - } - - public Map<String, Domain> getDomainRowCol() { - return domainRowCol; - } - - public void setDomainRowCol(Map<String, Domain> domainRowCol) { - this.domainRowCol = domainRowCol; - } - - public void computeDomainPositions() { - double xsum = 0; - double domainTolayout = 10.6; - for (int i = 0; i < numberofRowsofDomains; i++) { - for (int j = 0; j < numberofColsofDomains; j++) { - if (domainRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) { - Domain d = domainRowCol.get(String.valueOf(i) + String.valueOf(j)); - Position p = new Position(); - if (j == 0) - p.x = domainTolayout; - else - p.x = j * interDomainWd + xsum + domainTolayout; - if (getCollapsedDomainsNewList().size() > 0) - p.x += accountForPlusSpaceBefore(d); - xsum += d.computeSize().getWidth(); - double ysum = 0; - for (int k = 0; k < i; k++) { - if (domainRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += domainRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize().getHeight(); - } - p.y = (i + 1) * interDomainH + ysum; - d.setP(p); - - } - } - xsum = 0; - } - } - - public void computeDomainPositionsModified() { - for (int i = 0; i < numberofRowsofDomains; i++) { - for (int j = 0; j < numberofColsofDomains; j++) { - if (domainRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) { - Domain d = domainRowCol.get(String.valueOf(i) + String.valueOf(j)); - Position p = new Position(); - Map<String, Container> enclosedContainers = d.getContainerRowCol(); - for (Map.Entry<String, Container> entry : enclosedContainers.entrySet()) { - if (entry.getKey().equals("00")) { - double containerX = entry.getValue().getP().getX(); - p.x = containerX; - double ysum = 0; - for (int k = 0; k < i; k++) { - if (domainRowCol.containsKey(String.valueOf(k) + String.valueOf(j))) - ysum += domainRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize() - .getHeight(); - } - p.y = (i + 1) * interDomainH + ysum; - d.setP(p); - break; - } - } - } - } - } - - } - - public Layout collapseDomainModified(String domainsToCollapse) { - - if (domainsToCollapse == null || domainsToCollapse.isEmpty()) - return null; - - Map<String, Domain> updatedRC = new HashMap<>(); - - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - updatedRC.put(copyEntry.getKey(), copyEntry.getValue()); - } - - Map<String, Domain> updatedRCSorted = new TreeMap<>(updatedRC); - - Map<String, Domain> collapsedDomainMap = getCollapsedDomains(); - - List<Domain> collapsedDomainNewL = getCollapsedDomainsNewList(); - - if (collapsedDomainNewL.size() == 0) { - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - originalDomainRowCol.put(copyEntry.getKey(), copyEntry.getValue()); - } - } - - Map<String, Domain> updatedRCSortedTrunc = new TreeMap<>(); - - int colToDelete = 0; - for (Map.Entry<String, Domain> entry : updatedRCSorted.entrySet()) { - if (entry.getValue().getName().equals(domainsToCollapse)) { - if (entry.getValue().isIndexChanged()) { - collapsedDomainMap.put("0" + String.valueOf(Integer.parseInt(entry.getKey()) + 1), - entry.getValue()); - - } else { - collapsedDomainMap.put(entry.getKey(), entry.getValue()); - } - - collapsedDomainNewL.add(entry.getValue()); - setNumberofColsofDomains(getNumberofColsofDomains() - 1); - updatedRC.remove(entry.getKey()); - colToDelete = Character.getNumericValue(entry.getKey().toCharArray()[1]); - break; - } - } - - for (Map.Entry<String, Domain> copyEntry : updatedRCSorted.entrySet()) { - updatedRCSortedTrunc.put(copyEntry.getKey(), copyEntry.getValue()); - } - - for (Map.Entry<String, Domain> rmv : updatedRCSorted.entrySet()) { - if (Character.getNumericValue(rmv.getKey().toCharArray()[1]) <= colToDelete) { - updatedRCSortedTrunc.remove(rmv.getKey()); - } - } - - for (Map.Entry<String, Domain> updateOthers : updatedRCSortedTrunc.entrySet()) { - char update[] = updateOthers.getKey().toCharArray(); - int charToupdate = Character.getNumericValue(update[1]); - --charToupdate; - String resultRowCol = String.valueOf(update[0]) + String.valueOf(charToupdate); - updateOthers.getValue().setIndexChanged(true); - updatedRC.put(resultRowCol, updateOthers.getValue()); - updatedRC.remove(updateOthers.getKey()); - - } - setDomainRowCol(updatedRC); - - double currDistFromLftM = 11.0; - for (Map.Entry<String, Domain> cd : updatedRC.entrySet()) { - Domain d = cd.getValue(); - double accountPlus = accountForPlusSpaceBefore(d); - d.setDomainToLayoutWd(currDistFromLftM + accountPlus); - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - currDistFromLftM += d.computeSize().getWidth() + 2; - } - - // nline - // Insert method invocation - updatePlusPosition(collapsedDomainNewL, updatedRC); - - // order changed - setCollapsedDomains(collapsedDomainMap); - setCollapsedDomainsNewList(collapsedDomainNewL); - - computeDomainPositionsModified(); - return this; - } - - public Layout collapseDomainNew(String domainsToCollapse) { - - if (domainsToCollapse == null || domainsToCollapse.isEmpty()) - return null; - - Map<String, Domain> updatedRC = new HashMap<>(); - - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - updatedRC.put(copyEntry.getKey(), copyEntry.getValue()); - } - - Map<String, Domain> updatedRCSorted = new TreeMap<>(updatedRC); - - Map<String, Domain> collapsedDomainMap = getCollapsedDomains(); - - List<Domain> collapsedDomainNewL = getCollapsedDomainsNewList(); - - if (collapsedDomainNewL.isEmpty()) { - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - originalDomainRowCol.put(copyEntry.getKey(), copyEntry.getValue()); - } - } - - Map<String, Domain> updatedRCSortedTrunc = new TreeMap<>(); - - int colToDelete = 0; - for (Map.Entry<String, Domain> entry : updatedRCSorted.entrySet()) { - if (entry.getValue().getName().equals(domainsToCollapse)) { - if (entry.getValue().isIndexChanged()) { - collapsedDomainMap.put("0" + String.valueOf(Integer.parseInt(entry.getKey()) + 1), - entry.getValue()); - - } else { - collapsedDomainMap.put(entry.getKey(), entry.getValue()); - } - - collapsedDomainNewL.add(entry.getValue()); - setNumberofColsofDomains(getNumberofColsofDomains() - 1); - updatedRC.remove(entry.getKey()); - colToDelete = Character.getNumericValue(entry.getKey().toCharArray()[1]); - break; - } - } - - for (Map.Entry<String, Domain> copyEntry : updatedRCSorted.entrySet()) { - updatedRCSortedTrunc.put(copyEntry.getKey(), copyEntry.getValue()); - } - - for (Map.Entry<String, Domain> rmv : updatedRCSorted.entrySet()) { - if (Character.getNumericValue(rmv.getKey().toCharArray()[1]) <= colToDelete) { - updatedRCSortedTrunc.remove(rmv.getKey()); - } - } - - for (Map.Entry<String, Domain> updateOthers : updatedRCSortedTrunc.entrySet()) { - char[] update = updateOthers.getKey().toCharArray(); - int charToupdate = Character.getNumericValue(update[1]); - --charToupdate; - String resultRowCol = String.valueOf(update[0]) + String.valueOf(charToupdate); - updateOthers.getValue().setIndexChanged(true); - updatedRC.put(resultRowCol, updateOthers.getValue()); - updatedRC.remove(updateOthers.getKey()); - - } - setDomainRowCol(updatedRC); - - double currDistFromLftM = 11.0; - - boolean isDisplayed; - for (Map.Entry<String, Domain> orgEntry : originalDomainRowCol.entrySet()) { - isDisplayed = false; - for (Map.Entry<String, Domain> cd : updatedRC.entrySet()) { - if (cd.getValue().getName().equals(orgEntry.getValue().getName())) { - Domain d = cd.getValue(); - d.setDomainToLayoutWd(currDistFromLftM); - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - currDistFromLftM += d.computeSize().getWidth() + 1; - isDisplayed = true; - break; - } - } - - if (!isDisplayed) { - Domain myCollapsed = orgEntry.getValue(); - myCollapsed.setNewXafterColl(currDistFromLftM); - myCollapsed.setYafterColl(myCollapsed.getP().getY()); - currDistFromLftM += 4; - } - } - - setCollapsedDomains(collapsedDomainMap); - setCollapsedDomainsNewList(collapsedDomainNewL); - - computeDomainPositionsModified(); - return this; - - } - - public Layout collapseDomain(String domainsToCollapse) { - - Map<String, Domain> updatedRC = new HashMap<>(); - - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - updatedRC.put(copyEntry.getKey(), copyEntry.getValue()); - } - - Map<String, Domain> updatedRCSorted = new TreeMap<>(updatedRC); - - Map<String, Domain> collapsedDomainMap = getCollapsedDomains(); - - if (collapsedDomainMap.size() == 0) { - for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) { - originalDomainRowCol.put(copyEntry.getKey(), copyEntry.getValue()); - } - } - - double prevDomXCordinate = 0.0; - Map<String, Domain> updatedRCSortedTrunc = new TreeMap<>(); - int colToDelete = 0; - for (Map.Entry<String, Domain> entry : updatedRCSorted.entrySet()) { - if (entry.getValue().getName().equals(domainsToCollapse)) { - if (entry.getValue().isIndexChanged()) - collapsedDomainMap.put("0" + String.valueOf(Integer.parseInt(entry.getKey()) + 1), - entry.getValue()); - else - collapsedDomainMap.put(entry.getKey(), entry.getValue()); - prevDomXCordinate = entry.getValue().getP().getX(); - entry.getValue().getP().setX(prevDomXCordinate - 2); - setNumberofColsofDomains(getNumberofColsofDomains() - 1); - updatedRC.remove(entry.getKey()); - colToDelete = Character.getNumericValue(entry.getKey().toCharArray()[1]); - break; - } - } - - setCollapsedDomains(collapsedDomainMap); - - for (Map.Entry<String, Domain> copyEntry : updatedRCSorted.entrySet()) { - updatedRCSortedTrunc.put(copyEntry.getKey(), copyEntry.getValue()); - } - - for (Map.Entry<String, Domain> rmv : updatedRCSorted.entrySet()) { - if (Character.getNumericValue(rmv.getKey().toCharArray()[1]) <= colToDelete) { - updatedRCSortedTrunc.remove(rmv.getKey()); - } - } - - for (Map.Entry<String, Domain> updateOthers : updatedRCSortedTrunc.entrySet()) { - char update[] = updateOthers.getKey().toCharArray(); - int charToupdate = Character.getNumericValue(update[1]); - --charToupdate; - String resultRowCol = String.valueOf(update[0]) + String.valueOf(charToupdate); - updateOthers.getValue().setIndexChanged(true); - updatedRC.put(resultRowCol, updateOthers.getValue()); - updatedRC.remove(updateOthers.getKey()); - - } - - setDomainRowCol(updatedRC); - - for (Map.Entry<String, Domain> entry : updatedRCSortedTrunc.entrySet()) { - Domain d = entry.getValue(); - if (collapsedDomains.size() == 2 && collapsedDomains.containsKey("00") && collapsedDomains.containsKey("01") - && domainsToCollapse.equals("RAN")) { - if (d.getName().equals("USP")) - d.setDomainToLayoutWd(prevDomXCordinate); - else if (d.getName().equals("VNI")) - d.setDomainToLayoutWd(prevDomXCordinate + 8); - else - d.setDomainToLayoutWd(prevDomXCordinate + 10); - } else if (domainsToCollapse.equals("RAN") && !d.getName().equals("EPC") && collapsedDomains.size() < 3) - d.setDomainToLayoutWd(prevDomXCordinate + 11); - else if (domainsToCollapse.equals("RAN") && collapsedDomains.size() == 3 - && collapsedDomains.containsKey("01") && collapsedDomains.containsKey("04")) { - if (d.getName().equals("USP")) - d.setDomainToLayoutWd(prevDomXCordinate); - else - d.setDomainToLayoutWd(prevDomXCordinate + 10); - } - - else if (collapsedDomains.containsKey("00") && collapsedDomains.size() == 3 - && collapsedDomains.containsKey("01") && collapsedDomains.containsKey("02")) { - if (d.getName().equals("VNI")) - d.setDomainToLayoutWd(prevDomXCordinate + 10); - else - d.setDomainToLayoutWd(prevDomXCordinate); - - } - - else if (collapsedDomains.containsKey("00") && collapsedDomains.size() == 3 - && collapsedDomains.containsKey("01") && collapsedDomains.containsKey("03")) { - if (d.getName().equals("VNI")) - d.setDomainToLayoutWd(prevDomXCordinate + 10); - else - d.setDomainToLayoutWd(prevDomXCordinate); - - } - - else { - d.setDomainToLayoutWd(prevDomXCordinate); - } - d.computeConatinerPositions(); - prevDomXCordinate = d.getP().getX(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - } - computeDomainPositions(); - return this; - - } - - public Layout uncollapseDomainModified(String domainToUnCollapse) { - Map<String, Domain> currentDomainsSorted = new TreeMap<>(domainRowCol); - Map<String, Domain> updateDomains = new TreeMap<>(); - Map<String, Domain> collapsedDomainList = getCollapsedDomains(); - Map<String, Domain> collapsedDomainListSorted = new TreeMap<>(collapsedDomainList); - - List<Domain> domainstoUpd = new ArrayList<>(); - - int colToUnCollapse = 99; - - Domain domainToInsert = null; - - if (collapsedDomains.size() == 0) { - for (Map.Entry<String, Domain> unindexDomain : originalDomainRowCol.entrySet()) { - Domain dm = unindexDomain.getValue(); - dm.setIndexChanged(false); - } - } - - for (Map.Entry<String, Domain> entry : collapsedDomainListSorted.entrySet()) { - if (entry.getValue().getName().equals(domainToUnCollapse)) { - colToUnCollapse = Character.getNumericValue(entry.getKey().toCharArray()[1]); - domainToInsert = entry.getValue(); - collapsedDomainList.remove(entry.getKey()); - break; - } - } - - domainstoUpd.add(domainToInsert); - - int lastKeyCol = -1; - for (Map.Entry<String, Domain> entry : originalDomainRowCol.entrySet()) { - int currcol = Character.getNumericValue(entry.getKey().toCharArray()[1]); - if (currcol < colToUnCollapse) { - for (Map.Entry<String, Domain> currDomainsEntry : currentDomainsSorted.entrySet()) { - if (currDomainsEntry.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(currDomainsEntry.getKey(), currDomainsEntry.getValue()); - lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]); - break; - } - } - } else { - String newKey = "0" + String.valueOf(lastKeyCol + 1); - if (currcol == colToUnCollapse) { - updateDomains.put(newKey, domainToInsert); - ++lastKeyCol; - } else { - for (Map.Entry<String, Domain> currDomainsEnt : currentDomainsSorted.entrySet()) { - if (currDomainsEnt.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(newKey, currDomainsEnt.getValue()); - domainstoUpd.add(currDomainsEnt.getValue()); - ++lastKeyCol; - break; - } - } - } - - } - } - - setNumberofColsofDomains(getNumberofColsofDomains() + 1); - setDomainRowCol(updateDomains); - setCollapsedDomains(collapsedDomainList); - - for (int i = 0; i < domainstoUpd.size(); i++) { - Domain d = domainstoUpd.get(i); - double newX = 0.0; - if (i + 1 < domainstoUpd.size()) - newX = domainstoUpd.get(i + 1).getP().getX(); - else - newX = domainstoUpd.get(i).getP().getX() + 32; - - if (d.getName().equals("Datacenter with AIC")) - newX += 2; - d.setDomainToLayoutWd(newX); - - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - - } - - computeDomainPositions(); - return this; - - } - - public Layout uncollapseDomain(String domainToCollapse) { - Map<String, Domain> currentDomainsSorted = new TreeMap<>(domainRowCol); - Map<String, Domain> updateDomains = new TreeMap<String, Domain>(); - Map<String, Domain> collapsedDomainList = getCollapsedDomains(); - Map<String, Domain> collapsedDomainListSorted = new TreeMap<String, Domain>(collapsedDomainList); - - List<Domain> domainstoUpd = new ArrayList<>(); - for (Map.Entry<String, Domain> entry : collapsedDomainListSorted.entrySet()) { - if (entry.getValue().getName().equals(domainToCollapse)) { - Domain domainInserted = entry.getValue(); - if (currentDomainsSorted != null) { - int colToUnCollapse = Character.getNumericValue(entry.getKey().toCharArray()[1]); - for (Map.Entry<String, Domain> curr : currentDomainsSorted.entrySet()) { - if (Character.getNumericValue(curr.getKey().toCharArray()[1]) < colToUnCollapse) { - updateDomains.put(curr.getKey(), curr.getValue()); - } else { - updateDomains.put("0" + String.valueOf(Integer.parseInt(curr.getKey()) + 1), - curr.getValue()); - domainstoUpd.add(curr.getValue()); - } - } - } - updateDomains.put(entry.getKey(), entry.getValue()); - collapsedDomainList.remove(entry.getKey()); - break; - - } - } - setNumberofColsofDomains(getNumberofColsofDomains() + 1); - setDomainRowCol(updateDomains); - setCollapsedDomains(collapsedDomainList); - - for (int i = 0; i < domainstoUpd.size(); i++) { - Domain d = domainstoUpd.get(i); - double newX = 0.0; - if (i + 1 < domainstoUpd.size()) - newX = domainstoUpd.get(i + 1).getP().getX(); - // d.setDomainToLayoutWd(domainstoUpd.get(i+1).getP().getX()); - else - newX = domainstoUpd.get(i).getP().getX() + 38; - - d.setDomainToLayoutWd(newX); - - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - } - - computeDomainPositions(); - return this; - } - - public Layout uncollapseDomainNew(String domainToUnCollapse) { - Map<String, Domain> currentDomainsSorted = new TreeMap<String, Domain>(domainRowCol); - Map<String, Domain> updateDomains = new TreeMap<String, Domain>(); - Map<String, Domain> collapsedDomainList = getCollapsedDomains(); - - List<Domain> domainstoUpd = new ArrayList<>(); - - // nline - List<Domain> collapsedDomainNewLL = getCollapsedDomainsNewList(); - - int colToUnCollapse = 99; - - Domain domainToInsert = null; - - // nline - if (collapsedDomainNewLL.isEmpty()) { - for (Map.Entry<String, Domain> unindexDomain : originalDomainRowCol.entrySet()) { - Domain dm = unindexDomain.getValue(); - dm.setIndexChanged(false); - } - } - - for (Map.Entry<String, Domain> entry : originalDomainRowCol.entrySet()) { - if (entry.getValue().getName().equals(domainToUnCollapse)) { - colToUnCollapse = Character.getNumericValue(entry.getKey().toCharArray()[1]); - domainToInsert = entry.getValue(); - collapsedDomainList.remove(entry.getKey()); - // nline - collapsedDomainNewLL.remove(entry.getValue()); - break; - } - } - - domainstoUpd.add(domainToInsert); - - int lastKeyCol = -1; - for (Map.Entry<String, Domain> entry : originalDomainRowCol.entrySet()) { - int currcol = Character.getNumericValue(entry.getKey().toCharArray()[1]); - if (currcol < colToUnCollapse) { - for (Map.Entry<String, Domain> currDomainsEntry : currentDomainsSorted.entrySet()) { - if (currDomainsEntry.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(currDomainsEntry.getKey(), currDomainsEntry.getValue()); - lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]); - break; - } - } - } else { - String newKey = "0" + String.valueOf(lastKeyCol + 1); - if (currcol == colToUnCollapse) { - updateDomains.put(newKey, domainToInsert); - ++lastKeyCol; - } else { - for (Map.Entry<String, Domain> currDomainsEnt : currentDomainsSorted.entrySet()) { - if (currDomainsEnt.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(newKey, currDomainsEnt.getValue()); - domainstoUpd.add(currDomainsEnt.getValue()); - ++lastKeyCol; - break; - } - } - } - - } - } - - setNumberofColsofDomains(getNumberofColsofDomains() + 1); - setDomainRowCol(updateDomains); - - double currDistFromLftMargin = 11.0; - for (Map.Entry<String, Domain> cd : updateDomains.entrySet()) { - Domain d = cd.getValue(); - double accountPlus = accountForPlusSpaceBefore(d); - d.setDomainToLayoutWd(currDistFromLftMargin + accountPlus); - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - currDistFromLftMargin += d.computeSize().getWidth() + 2; - - } - - // nline - updatePlusPosition(collapsedDomainNewLL, updateDomains); - - // order changed - setCollapsedDomains(collapsedDomainList); - - // nline - setCollapsedDomainsNewList(collapsedDomainNewLL); - - computeDomainPositionsModified(); - return this; - - } - - public Layout uncollapseDomainNew1(String domainToUnCollapse) { - - if (domainToUnCollapse == null || domainToUnCollapse.isEmpty()) - return null; - - Map<String, Domain> currentDomainsSorted = new TreeMap<String, Domain>(domainRowCol); - Map<String, Domain> updateDomains = new TreeMap<String, Domain>(); - Map<String, Domain> collapsedDomainList = getCollapsedDomains(); - - List<Domain> domainstoUpd = new ArrayList<>(); - - // nline - List<Domain> collapsedDomainNewLL = getCollapsedDomainsNewList(); - - int colToUnCollapse = 99; - - Domain domainToInsert = null; - - // nline - if (collapsedDomainNewLL.isEmpty()) { - for (Map.Entry<String, Domain> unindexDomain : originalDomainRowCol.entrySet()) { - Domain dm = unindexDomain.getValue(); - dm.setIndexChanged(false); - } - } - - for (Map.Entry<String, Domain> entry : originalDomainRowCol.entrySet()) { - if (entry.getValue().getName().equals(domainToUnCollapse)) { - colToUnCollapse = Character.getNumericValue(entry.getKey().toCharArray()[1]); - domainToInsert = entry.getValue(); - collapsedDomainList.remove(entry.getKey()); - // nline - collapsedDomainNewLL.remove(entry.getValue()); - break; - } - } - - domainstoUpd.add(domainToInsert); - - int lastKeyCol = -1; - for (Map.Entry<String, Domain> entry : originalDomainRowCol.entrySet()) { - int currcol = Character.getNumericValue(entry.getKey().toCharArray()[1]); - if (currcol < colToUnCollapse) { - for (Map.Entry<String, Domain> currDomainsEntry : currentDomainsSorted.entrySet()) { - if (currDomainsEntry.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(currDomainsEntry.getKey(), currDomainsEntry.getValue()); - lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]); - break; - } - } - } else { - String newKey = "0" + String.valueOf(lastKeyCol + 1); - if (currcol == colToUnCollapse) { - updateDomains.put(newKey, domainToInsert); - ++lastKeyCol; - } else { - for (Map.Entry<String, Domain> currDomainsEnt : currentDomainsSorted.entrySet()) { - if (currDomainsEnt.getValue().getName().equals(entry.getValue().getName())) { - updateDomains.put(newKey, currDomainsEnt.getValue()); - domainstoUpd.add(currDomainsEnt.getValue()); - ++lastKeyCol; - break; - } - } - } - - } - } - - setNumberofColsofDomains(getNumberofColsofDomains() + 1); - setDomainRowCol(updateDomains); - - double currDistFromLftM = 11.0; - - boolean isDisplayed; - for (Map.Entry<String, Domain> orgEntry : originalDomainRowCol.entrySet()) { - isDisplayed = false; - for (Map.Entry<String, Domain> cd : updateDomains.entrySet()) { - if (cd.getValue().getName().equals(orgEntry.getValue().getName())) { - Domain d = cd.getValue(); - d.setDomainToLayoutWd(currDistFromLftM); - d.computeConatinerPositions(); - for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) { - Container c = entry1.getValue(); - c.computeSize(); - c.computeElementPositions(); - if (c.getContainerRowCol() != null) { - for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) { - Container inner = entryInner.getValue(); - inner.computeElementPositions(); - } - } - } - currDistFromLftM += d.computeSize().getWidth() + 1; - isDisplayed = true; - break; - } - } - - if (!isDisplayed) { - Domain myCollapsed = orgEntry.getValue(); - myCollapsed.setNewXafterColl(currDistFromLftM); - currDistFromLftM += 4; - } - } - - // order changed - setCollapsedDomains(collapsedDomainList); - - // nline - setCollapsedDomainsNewList(collapsedDomainNewLL); - - computeDomainPositionsModified(); - return this; - - } - - private void updatePlusPosition(List<Domain> collapsedDNewL, Map<String, Domain> displayedDomainMap) { - List<Domain> copyCollapseList = new ArrayList<>(); - - for (Domain copyCollapse : collapsedDNewL) { - copyCollapseList.add(copyCollapse); - } - - int orgColofCollapsed = -1; - int orgColofDisplayed = -1; - int orgColofDisplayedOtherPlus = -1; - - for (Domain plus : collapsedDNewL) { - double distOfCollFrmLft = 0.0; - for (Map.Entry<String, Domain> colCheck : originalDomainRowCol.entrySet()) { - if (colCheck.getValue().getName().equals(plus.getName())) { - orgColofCollapsed = Character.getNumericValue(colCheck.getKey().toCharArray()[1]); - break; - } - } - for (Map.Entry<String, Domain> displayedEntry : displayedDomainMap.entrySet()) { - - for (Map.Entry<String, Domain> colCheck1 : originalDomainRowCol.entrySet()) { - if (colCheck1.getValue().getName().equals(displayedEntry.getValue().getName())) { - orgColofDisplayed = Character.getNumericValue(colCheck1.getKey().toCharArray()[1]); - break; - } - } - if (orgColofDisplayed < orgColofCollapsed) { - distOfCollFrmLft += displayedEntry.getValue().computeSize().getWidth(); - } - - } - - for (Domain collp : copyCollapseList) { - if (!collp.getName().equals(plus.getName())) { - for (Map.Entry<String, Domain> colCheck2 : originalDomainRowCol.entrySet()) { - if (colCheck2.getValue().getName().equals(collp.getName())) { - orgColofDisplayedOtherPlus = Character.getNumericValue(colCheck2.getKey().toCharArray()[1]); - break; - } - } - if (orgColofDisplayedOtherPlus < orgColofCollapsed) { - distOfCollFrmLft += 3.0; - } - } - } - - plus.setNewXafterColl(distOfCollFrmLft + 1.5); - - } - } - - private double accountForPlusSpaceBefore(Domain d) { - - int orgColofCollapsed = 0; - int orgColofDisplayed = 0; - double distFromLftM = 0.0; - - for (Map.Entry<String, Domain> colCheckk : originalDomainRowCol.entrySet()) { - if (colCheckk.getValue().getName().equals(d.getName())) { - orgColofDisplayed = Character.getNumericValue(colCheckk.getKey().toCharArray()[1]); - break; - } - } - - for (Domain collapsed : getCollapsedDomainsNewList()) { - for (Map.Entry<String, Domain> colCheck : originalDomainRowCol.entrySet()) { - if (colCheck.getValue().getName().equals(collapsed.getName())) { - orgColofCollapsed = Character.getNumericValue(colCheck.getKey().toCharArray()[1]); - break; - } - } - - if (orgColofCollapsed < orgColofDisplayed) { - distFromLftM += 2; - } - } - return distFromLftM; - - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java deleted file mode 100644 index eef7c27a..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -import java.io.Serializable; - -public class NameValueId implements Serializable { - - private static final long serialVersionUID = 1L; - private String lab; - private String val; - - public NameValueId() { - // No-arg constructor - } - - public NameValueId(String value, String label) { - setVal(value); - setLab(label); - } - - public String getLab() { - return lab; - } - - public String getVal() { - return val; - } - - public void setLab(String label) { - this.lab = label; - } - - public void setVal(String value) { - this.val = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (o == null) { - return false; - } - - if (!(o instanceof NameValueId)) { - return false; - } - - final NameValueId nameValueId = (NameValueId) o; - - if (!getVal().equals(nameValueId.getVal())) { - return false; - } - - if (!getLab().equals(nameValueId.getLab())) { - return false; - } - - return true; - } - - @Override - public int hashCode() { - return getVal().hashCode(); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java deleted file mode 100644 index e0946d0b..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -public class Position { - double x; - double y; - - public double getX() { - return x; - } - - public void setX(double x) { - this.x = x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java deleted file mode 100644 index 6fcd178e..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * ============LICENSE_START========================================== - * ONAP Portal SDK - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); - * you may not use this software 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. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.onap.portalsdk.core.domain.support; - -public class Size { - private double width; - private double height; - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getHeight() { - return height; - } - - public void setHeight(double height) { - this.height = height; - } - -} |