summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain')
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java7
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java115
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java191
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java17
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java81
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java9
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java325
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java86
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java66
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java60
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java68
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java187
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java75
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java16
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java259
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java67
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java83
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java115
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java714
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java58
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java20
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java37
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java27
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java40
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java321
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java187
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java269
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java121
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java52
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java21
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java1490
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java101
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java10
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java12
34 files changed, 2438 insertions, 2869 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java
index dfc4ae3c..0fa94a10 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -58,7 +58,7 @@ public class App extends DomainVo {
private String alternateUrl; // app_alternate_url
private String restEndpoint; // app_rest_endpoint
private String mlAppName; // ml_app_name
- private String mlAppAdminId; // ml_app_admin_id;
+ private String mlAppAdminId; // ml_app_admin_id
private String motsId; // mots_id
private String appPassword; // app_password
private String open;
@@ -216,6 +216,7 @@ public class App extends DomainVo {
/**
* Answers true if the objects have the same ID.
*/
+ @Override
public int compareTo(Object obj) {
Long c1 = getId();
Long c2 = ((App) obj).getId();
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java
index 7cebc1af..b9f49519 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -47,61 +47,60 @@ public class AuditLog extends DomainVo {
*
*/
private static final long serialVersionUID = 1L;
- public static final String CD_ACTIVITY_LOGIN = "login";
- public static final String CD_ACTIVITY_LOGOUT = "logout";
- public static final String CD_ACTIVITY_MOBILE_LOGIN = "mobile_login";
- public static final String CD_ACTIVITY_MOBILE_LOGOUT = "mobile_logout";
-
- /*-------Profile activities -----------*/
- public static final String CD_ACTIVITY_ROLE_ADD = "add_role";
- public static final String CD_ACTIVITY_ROLE_REMOVE = "remove_role";
- public static final String CD_ACTIVITY_CHILD_ROLE_ADD = "add_child_role";
- public static final String CD_ACTIVITY_CHILD_ROLE_REMOVE = "remove_child_role";
- public static final String CD_ACTIVITY_ROLE_ADD_FUNCTION = "add_role_function";
- public static final String CD_ACTIVITY_ROLE_REMOVE_FUNCTION = "remove_role_function";
- public static final String CD_ACTIVITY_USER_ROLE_ADD = "add_user_role";
- public static final String CD_ACTIVITY_USER_ROLE_REMOVE = "remove_user_role";
-
- /*Audit activities*/
- public static final String CD_ACTIVITY_FUNCTIONAL_ACCESS = "functional_access";
- public static final String CD_ACTIVITY_TAB_ACCESS = "tab_access";
- public static final String CD_ACTIVITY_APP_ACCESS = "app_access";
- public static final String CD_ACTIVITY_LEFT_MENU_ACCESS = "left_menu_access";
-
-
- private String activityCode;
- private String affectedRecordId;
- private String comments;
- private Date auditDate;
- private Long userId;
-
- public AuditLog() {
- setCreated(new Date());
- }
-
- public String getActivityCode() {
- return activityCode;
- }
-
- public String getComments() {
- return comments;
- }
-
- public String getAffectedRecordId() {
- return affectedRecordId;
- }
-
- public void setActivityCode(String activityCode) {
- this.activityCode = activityCode;
- }
-
- public void setComments(String comments) {
- this.comments = comments;
- }
-
- public void setAffectedRecordId(String affectedRecordId) {
- this.affectedRecordId = affectedRecordId;
- }
+ public static final String CD_ACTIVITY_LOGIN = "login";
+ public static final String CD_ACTIVITY_LOGOUT = "logout";
+ public static final String CD_ACTIVITY_MOBILE_LOGIN = "mobile_login";
+ public static final String CD_ACTIVITY_MOBILE_LOGOUT = "mobile_logout";
+
+ /*-------Profile activities -----------*/
+ public static final String CD_ACTIVITY_ROLE_ADD = "add_role";
+ public static final String CD_ACTIVITY_ROLE_REMOVE = "remove_role";
+ public static final String CD_ACTIVITY_CHILD_ROLE_ADD = "add_child_role";
+ public static final String CD_ACTIVITY_CHILD_ROLE_REMOVE = "remove_child_role";
+ public static final String CD_ACTIVITY_ROLE_ADD_FUNCTION = "add_role_function";
+ public static final String CD_ACTIVITY_ROLE_REMOVE_FUNCTION = "remove_role_function";
+ public static final String CD_ACTIVITY_USER_ROLE_ADD = "add_user_role";
+ public static final String CD_ACTIVITY_USER_ROLE_REMOVE = "remove_user_role";
+
+ /* Audit activities */
+ public static final String CD_ACTIVITY_FUNCTIONAL_ACCESS = "functional_access";
+ public static final String CD_ACTIVITY_TAB_ACCESS = "tab_access";
+ public static final String CD_ACTIVITY_APP_ACCESS = "app_access";
+ public static final String CD_ACTIVITY_LEFT_MENU_ACCESS = "left_menu_access";
+
+ private String activityCode;
+ private String affectedRecordId;
+ private String comments;
+ private Date auditDate;
+ private Long userId;
+
+ public AuditLog() {
+ setCreated(new Date());
+ }
+
+ public String getActivityCode() {
+ return activityCode;
+ }
+
+ public String getComments() {
+ return comments;
+ }
+
+ public String getAffectedRecordId() {
+ return affectedRecordId;
+ }
+
+ public void setActivityCode(String activityCode) {
+ this.activityCode = activityCode;
+ }
+
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+
+ public void setAffectedRecordId(String affectedRecordId) {
+ this.affectedRecordId = affectedRecordId;
+ }
public Date getAuditDate() {
return auditDate;
@@ -118,7 +117,5 @@ public class AuditLog extends DomainVo {
public void setUserId(Long userId) {
this.userId = userId;
}
-
-
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java
index d75a030a..01d6caed 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,106 +37,99 @@
*/
package org.onap.portalsdk.core.domain;
-import java.util.*;
+import java.util.Date;
import org.onap.portalsdk.core.domain.support.DomainVo;
public class BroadcastMessage extends DomainVo {
-
- /**
- *
- */
-
- private static final long serialVersionUID = 1L;
- public BroadcastMessage() {
- }
-
- public static final String ID_MESSAGE_LOCATION_LOGIN = "10";
- public static final String ID_MESSAGE_LOCATION_WELCOME = "20";
-
- private String messageText;
- private Integer locationId;
- private Date startDate;
- private Date endDate;
- private Integer sortOrder;
- private Boolean active;
- private String siteCd;
-
- public Boolean getActive() {
- return active;
- }
-
- public Date getEndDate() {
- return endDate;
- }
-
- public Integer getLocationId() {
- return locationId;
- }
-
- public String getMessageText() {
- return messageText;
- }
-
- public Integer getSortOrder() {
- return sortOrder;
- }
-
- public Date getStartDate() {
- return startDate;
- }
-
- public String getSiteCd() {
- return siteCd;
- }
-
-
- public void setActive(Boolean active) {
- this.active = active;
- }
-
- public void setEndDate(Date endDate) {
- this.endDate = endDate;
- }
-
- public void setLocationId(Integer locationId) {
- this.locationId = locationId;
- }
-
- public void setMessageText(String messageText) {
- this.messageText = messageText;
- }
-
- public void setSortOrder(Integer sortOrder) {
- this.sortOrder = sortOrder;
- }
-
- public void setStartDate(Date startDate) {
- this.startDate = startDate;
- }
-
- public void setSiteCd(String siteCd) {
- this.siteCd = siteCd;
- }
-
-
- public int compareTo(Object obj){
- Integer c1 = getLocationId();
- Integer c2 = ((BroadcastMessage)obj).getLocationId();
-
- if (c1.compareTo(c2) == 0) {
- c1 = getSortOrder();
- c2 = ((BroadcastMessage)obj).getSortOrder();
-
- if (c1.compareTo(c2) == 0) {
- Long c3 = getId();
- Long c4 = ((BroadcastMessage)obj).getId();
-
- return c3.compareTo(c4);
- }
- }
-
- return c1.compareTo(c2);
- }
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String ID_MESSAGE_LOCATION_LOGIN = "10";
+ public static final String ID_MESSAGE_LOCATION_WELCOME = "20";
+
+ private String messageText;
+ private Integer locationId;
+ private Date startDate;
+ private Date endDate;
+ private Integer sortOrder;
+ private Boolean active;
+ private String siteCd;
+
+ public Boolean getActive() {
+ return active;
+ }
+
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ public Integer getLocationId() {
+ return locationId;
+ }
+
+ public String getMessageText() {
+ return messageText;
+ }
+
+ public Integer getSortOrder() {
+ return sortOrder;
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public String getSiteCd() {
+ return siteCd;
+ }
+
+ public void setActive(Boolean active) {
+ this.active = active;
+ }
+
+ public void setEndDate(Date endDate) {
+ this.endDate = endDate;
+ }
+
+ public void setLocationId(Integer locationId) {
+ this.locationId = locationId;
+ }
+
+ public void setMessageText(String messageText) {
+ this.messageText = messageText;
+ }
+
+ public void setSortOrder(Integer sortOrder) {
+ this.sortOrder = sortOrder;
+ }
+
+ public void setStartDate(Date startDate) {
+ this.startDate = startDate;
+ }
+
+ public void setSiteCd(String siteCd) {
+ this.siteCd = siteCd;
+ }
+
+ @Override
+ public int compareTo(Object obj) {
+ Integer c1 = getLocationId();
+ Integer c2 = ((BroadcastMessage) obj).getLocationId();
+
+ if (c1.compareTo(c2) == 0) {
+ c1 = getSortOrder();
+ c2 = ((BroadcastMessage) obj).getSortOrder();
+
+ if (c1.compareTo(c2) == 0) {
+ Long c3 = getId();
+ Long c4 = ((BroadcastMessage) obj).getId();
+
+ return c3.compareTo(c4);
+ }
+ }
+
+ return c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java
index 355f36cb..2818bf04 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -48,7 +48,7 @@ import java.util.Set;
/* Super class from which all data objects descend
*
- * Per Sunder T on 3 June 2016:
+ * @deprecated per Sunder T on 3 June 2016:
*
* Yes, we need to get rid of domain.DomainVO and fold all the references to the support.DomainVO.
*/
@@ -56,9 +56,6 @@ import java.util.Set;
@Deprecated
public class DomainVo extends FusionVo implements Serializable, Cloneable, Comparable {
- /**
- *
- */
private static final long serialVersionUID = 1L;
protected Long id;
protected Date created;
@@ -71,9 +68,6 @@ public class DomainVo extends FusionVo implements Serializable, Cloneable, Compa
Set auditTrail = null;
- public DomainVo() {
- }
-
public void setId(Long i) {
id = i;
}
@@ -147,10 +141,6 @@ public class DomainVo extends FusionVo implements Serializable, Cloneable, Compa
getAuditTrail().add(auditLog);
}
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
public Object copy() {
return copy(false);
}
@@ -185,6 +175,7 @@ public class DomainVo extends FusionVo implements Serializable, Cloneable, Compa
return newVo;
}
+ @Override
public int compareTo(Object obj) {
Long c1 = getId();
Long c2 = ((DomainVo) obj).getId();
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java
index f4ed41e4..894c35f1 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,123 +37,148 @@
*/
package org.onap.portalsdk.core.domain;
-
import org.onap.portalsdk.core.domain.support.DomainVo;
/**
- * <p>RoleFunction.java</p>
+ * <p>
+ * RoleFunction.java
+ * </p>
*
- * <p>Represents a role function data object.</p>
+ * <p>
+ * Represents a role function data object.
+ * </p>
*
* @version 1.0
*/
public class FnMenu extends DomainVo {
- /**
- *
- */
+
private static final long serialVersionUID = 1L;
- public FnMenu() {}
-
- private Integer menuId;
- private String label;
- private Integer parentId;
- private String action;
- private String functionCd;
- private Integer sortOrder;
- private String servlet;
- private String queryString;
- private String externalUrl;
- private String target;
- private String active;
- private String separator;
- private String imageSrc;
- private String menuSetCode;
-
+
+ private Integer menuId;
+ private String label;
+ private Integer parentId;
+ private String action;
+ private String functionCd;
+ private Integer sortOrder;
+ private String servlet;
+ private String queryString;
+ private String externalUrl;
+ private String target;
+ private String active;
+ private String separator;
+ private String imageSrc;
+ private String menuSetCode;
+
public Integer getMenuId() {
return menuId;
}
+
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
+
public String getLabel() {
return label;
}
+
public void setLabel(String label) {
this.label = label;
}
+
public Integer getParentId() {
return parentId;
}
+
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
+
public String getAction() {
return action;
}
+
public void setAction(String action) {
this.action = action;
}
+
public String getFunctionCd() {
return functionCd;
}
+
public void setFunctionCd(String functionCd) {
this.functionCd = functionCd;
}
+
public Integer getSortOrder() {
return sortOrder;
}
+
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
+
public String getServlet() {
return servlet;
}
+
public void setServlet(String servlet) {
this.servlet = servlet;
}
+
public String getQueryString() {
return queryString;
}
+
public void setQueryString(String queryString) {
this.queryString = queryString;
}
+
public String getExternalUrl() {
return externalUrl;
}
+
public void setExternalUrl(String externalUrl) {
this.externalUrl = externalUrl;
}
+
public String getTarget() {
return target;
}
+
public void setTarget(String target) {
this.target = target;
}
+
public String getActive() {
return active;
}
+
public void setActive(String active) {
this.active = active;
}
+
public String getSeparator() {
return separator;
}
+
public void setSeparator(String separator) {
this.separator = separator;
}
+
public String getImageSrc() {
return imageSrc;
}
+
public void setImageSrc(String imageSrc) {
this.imageSrc = imageSrc;
}
+
public String getMenuSetCode() {
return menuSetCode;
}
+
public void setMenuSetCode(String menuSetCode) {
this.menuSetCode = menuSetCode;
}
-
-
-
+
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java
index bf2321ba..ac25ae10 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -40,6 +40,7 @@ package org.onap.portalsdk.core.domain;
import org.onap.portalsdk.core.FusionObject;
public class FusionVo implements FusionObject {
- public FusionVo() {
- }
+ public FusionVo() {
+ // No-argument constructor
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java
index 742f26b6..f6675a01 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -44,162 +44,169 @@ import org.onap.portalsdk.core.domain.support.FusionCommand;
@SuppressWarnings("rawtypes")
public class LoginBean extends FusionCommand {
- private String loginId;
- private String loginPwd;
- private String hrid;
- private String orgUserId;
- private String siteAccess;
- private String loginErrorMessage;
-
- private User user;
- private Set menu;
- private Set businessDirectMenu;
-
- /**
- * getLoginId
- *
- * @return String
- */
- public String getLoginId() {
- return loginId;
- }
-
- /**
- * getLoginPwd
- *
- * @return String
- */
- public String getLoginPwd() {
- return loginPwd;
- }
-
- /**
- * getMenu
- *
- * @return Set
- */
- public Set getMenu() {
- return menu;
- }
-
- /**
- * getUser
- *
- * @return User
- */
- public User getUser() {
- return user;
- }
-
- /**
- * getHrid
- *
- * @return String
- */
- public String getHrid() {
- return hrid;
- }
-
- /**
- * getSiteAccess
- *
- * @return String
- */
- public String getSiteAccess() {
- return siteAccess;
- }
-
- /**
- * getBusinessDirectMenu
- *
- * @return Set
- */
- public Set getBusinessDirectMenu() {
- return businessDirectMenu;
- }
-
- /**
- * getLoginErrorMessage
- *
- * @return String
- */
- public String getLoginErrorMessage() {
- return loginErrorMessage;
- }
-
- public String getOrgUserId() {
- return orgUserId;
- }
-
- /**
- * setLoginId
- *
- * @param loginId String
- */
- public void setLoginId(String loginId) {
- this.loginId = loginId;
- }
-
- /**
- * setLoginPwd
- *
- * @param loginPwd String
- */
- public void setLoginPwd(String loginPwd) {
- this.loginPwd = loginPwd;
- }
-
- public void setMenu(Set menu) {
- this.menu = menu;
- }
-
- /**
- * setUser
- *
- * @param user User
- */
- public void setUser(User user) {
- this.user = user;
- }
-
- /**
- * setHrid
- *
- * @param hrid String
- */
- public void setHrid(String hrid) {
- this.hrid = hrid;
- }
-
- /**
- * setSiteAccess
- *
- * @param siteAccess String
- */
- public void setSiteAccess(String siteAccess) {
- this.siteAccess = siteAccess;
- }
-
- /**
- * setBusinessDirectMenu
- *
- * @param businessDirectMenu Set
- */
- public void setBusinessDirectMenu(Set businessDirectMenu) {
- this.businessDirectMenu = businessDirectMenu;
- }
-
- /**
- * setLoginErrorMessage
- *
- * @param loginErrorMessage String
- */
- public void setLoginErrorMessage(String loginErrorMessage) {
- this.loginErrorMessage = loginErrorMessage;
- }
-
- public void setOrgUserId(String orgUserId) {
- this.orgUserId = orgUserId;
- }
+ private String loginId;
+ private String loginPwd;
+ private String hrid;
+ private String orgUserId;
+ private String siteAccess;
+ private String loginErrorMessage;
+
+ private User user;
+ private Set menu;
+ private Set businessDirectMenu;
+
+ /**
+ * getLoginId
+ *
+ * @return String
+ */
+ public String getLoginId() {
+ return loginId;
+ }
+
+ /**
+ * getLoginPwd
+ *
+ * @return String
+ */
+ public String getLoginPwd() {
+ return loginPwd;
+ }
+
+ /**
+ * getMenu
+ *
+ * @return Set
+ */
+ public Set getMenu() {
+ return menu;
+ }
+
+ /**
+ * getUser
+ *
+ * @return User
+ */
+ public User getUser() {
+ return user;
+ }
+
+ /**
+ * getHrid
+ *
+ * @return String
+ */
+ public String getHrid() {
+ return hrid;
+ }
+
+ /**
+ * getSiteAccess
+ *
+ * @return String
+ */
+ public String getSiteAccess() {
+ return siteAccess;
+ }
+
+ /**
+ * getBusinessDirectMenu
+ *
+ * @return Set
+ */
+ public Set getBusinessDirectMenu() {
+ return businessDirectMenu;
+ }
+
+ /**
+ * getLoginErrorMessage
+ *
+ * @return String
+ */
+ public String getLoginErrorMessage() {
+ return loginErrorMessage;
+ }
+
+ public String getOrgUserId() {
+ return orgUserId;
+ }
+
+ /**
+ * setLoginId
+ *
+ * @param loginId
+ * String
+ */
+ public void setLoginId(String loginId) {
+ this.loginId = loginId;
+ }
+
+ /**
+ * setLoginPwd
+ *
+ * @param loginPwd
+ * String
+ */
+ public void setLoginPwd(String loginPwd) {
+ this.loginPwd = loginPwd;
+ }
+
+ public void setMenu(Set menu) {
+ this.menu = menu;
+ }
+
+ /**
+ * setUser
+ *
+ * @param user
+ * User
+ */
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+ /**
+ * setHrid
+ *
+ * @param hrid
+ * String
+ */
+ public void setHrid(String hrid) {
+ this.hrid = hrid;
+ }
+
+ /**
+ * setSiteAccess
+ *
+ * @param siteAccess
+ * String
+ */
+ public void setSiteAccess(String siteAccess) {
+ this.siteAccess = siteAccess;
+ }
+
+ /**
+ * setBusinessDirectMenu
+ *
+ * @param businessDirectMenu
+ * Set
+ */
+ public void setBusinessDirectMenu(Set businessDirectMenu) {
+ this.businessDirectMenu = businessDirectMenu;
+ }
+
+ /**
+ * setLoginErrorMessage
+ *
+ * @param loginErrorMessage
+ * String
+ */
+ public void setLoginErrorMessage(String loginErrorMessage) {
+ this.loginErrorMessage = loginErrorMessage;
+ }
+
+ public void setOrgUserId(String orgUserId) {
+ this.orgUserId = orgUserId;
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java
index 6248de85..cf7163ca 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -44,56 +44,56 @@ import org.onap.portalsdk.core.domain.support.NameValueId;
public class Lookup extends FusionVo implements Serializable {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private NameValueId nameValueId = new NameValueId();
+ private NameValueId nameValueId = new NameValueId();
- public Lookup() {}
+ public Lookup() {
+ super();
+ }
- public Lookup(String label, String value) {
- this();
- setLabel(label);
- setValue(value);
- }
+ public Lookup(String label, String value) {
+ this();
+ setLabel(label);
+ setValue(value);
+ }
- public String getValue() {
- return getNameValueId().getVal();
- }
+ public String getValue() {
+ return getNameValueId().getVal();
+ }
- public String getLabel() {
- return getNameValueId().getLab();
- }
+ public String getLabel() {
+ return getNameValueId().getLab();
+ }
- public void setValue(String value) {
- getNameValueId().setVal(value);
- }
+ public void setValue(String value) {
+ getNameValueId().setVal(value);
+ }
- public void setLabel(String label) {
- getNameValueId().setLab(label);
- }
+ public void setLabel(String label) {
+ getNameValueId().setLab(label);
+ }
- public NameValueId getNameValueId() {
- return nameValueId;
- }
+ public NameValueId getNameValueId() {
+ return nameValueId;
+ }
- public void setNameValueId(NameValueId nameValueId) {
- this.nameValueId = nameValueId;
- }
+ public void setNameValueId(NameValueId nameValueId) {
+ this.nameValueId = nameValueId;
+ }
- // required by ZK for to set the selectedItems of Listboxes (used heavily for <select>-style drop-downs)
- @Override
- public int hashCode() {
- return Objects.hash(getValue(), getLabel());
- }
+ // required by ZK for to set the selectedItems of Listboxes (used heavily for
+ // <select>-style drop-downs)
+ @Override
+ public int hashCode() {
+ return Objects.hash(getValue(), getLabel());
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof Lookup))
+ return false;
+ Lookup lookup = (Lookup) obj;
+ return Objects.equals(lookup.getValue(), getValue()) && Objects.equals(lookup.getLabel(), getLabel());
+ }
- @Override
- public boolean equals( Object obj ) {
- if (obj == null || !(obj instanceof Lookup))
- return false;
- Lookup lookup = (Lookup)obj;
- return Objects.equals(lookup.getValue(), getValue()) && Objects.equals(lookup.getLabel(), getLabel());
- }
-
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java
index 2aa8a7db..c3f1c6ed 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,43 +37,39 @@
*/
package org.onap.portalsdk.core.domain;
-
-import org.onap.portalsdk.core.domain.support.*;
-
-
/**
- * <p>luCountry.java</p>
*
- * <p>Represents a country data object.</p>
+ * <p>
+ * Represents a country data object.
+ * </p>
*
* @version 1.0
*/
public class LuCountry extends DomainVo {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- LuCountry() {}
+ private String abbr;
+ private String country;
+ private String fullName;
+ private String webphoneCountryLabel;
- public String getCountry() {
- return country;
- }
-
- public String getAbbr() {
- return abbr;
- }
+ public String getCountry() {
+ return country;
+ }
- public void setCountry(String country) {
- this.country = country;
- }
+ public String getAbbr() {
+ return abbr;
+ }
- public void setAbbr(String abbr) {
- this.abbr = abbr;
- }
+ public void setCountry(String country) {
+ this.country = country;
+ }
+ public void setAbbr(String abbr) {
+ this.abbr = abbr;
+ }
- public String getFullName() {
+ public String getFullName() {
return fullName;
}
@@ -89,17 +85,11 @@ public class LuCountry extends DomainVo {
this.webphoneCountryLabel = webphoneCountryLabel;
}
- public int compareTo(Object obj){
- String c1 = getCountry();
- String c2 = ((LuCountry)obj).getCountry();
-
- return c1.compareTo(c2);
- }
-
-
- private String abbr;
- private String country;
- private String fullName;
- private String webphoneCountryLabel;
+ @Override
+ public int compareTo(Object obj) {
+ String c1 = getCountry();
+ String c2 = ((LuCountry) obj).getCountry();
+ return c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java
index 23b1ec99..d82eab65 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,52 +37,42 @@
*/
package org.onap.portalsdk.core.domain;
-
-import org.onap.portalsdk.core.domain.support.*;
-
-
/**
- * <p>State.java</p>
- *
- * <p>Represents a state data object.</p>
+ * <p>
+ * Represents a state data object.
+ * </p>
*
* @version 1.0
*/
public class LuState extends DomainVo {
- /**
- *
- */
private static final long serialVersionUID = 1L;
-
- LuState() {}
-
- public String getState() {
- return state;
- }
-
- public String getAbbr() {
- return abbr;
- }
- public void setState(String state) {
- this.state = state;
- }
+ private String abbr;
+ private String state;
- public void setAbbr(String abbr) {
- this.abbr = abbr;
- }
+ public String getState() {
+ return state;
+ }
+ public String getAbbr() {
+ return abbr;
+ }
- public int compareTo(Object obj){
- String c1 = getState();
- String c2 = ((LuState)obj).getState();
+ public void setState(String state) {
+ this.state = state;
+ }
- return c1.compareTo(c2);
- }
+ public void setAbbr(String abbr) {
+ this.abbr = abbr;
+ }
+ @Override
+ public int compareTo(Object obj) {
+ String c1 = getState();
+ String c2 = ((LuState) obj).getState();
- private String abbr;
- private String state;
+ return c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java
index ad17754a..f1494627 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,44 +37,41 @@
*/
package org.onap.portalsdk.core.domain;
-
-import org.onap.portalsdk.core.domain.support.*;
-
-
/**
- * <p>LuTimeZone.java</p>
+ * <p>
+ * LuTimeZone.java
+ * </p>
*
- * <p>Represents a LuTimeZone data object.</p>
+ * <p>
+ * Represents a LuTimeZone data object.
+ * </p>
*
* @version 1.0
*/
public class LuTimeZone extends DomainVo {
- /**
- *
- */
private static final long serialVersionUID = 1L;
-
- LuTimeZone() {}
+ private String name;
+ private Long timezoneId;
+ private String value;
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
+ public String getName() {
+ return name;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ public String getValue() {
+ return value;
+ }
- public void setValue(String value) {
- this.value = value;
- }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
- public Long getTimezoneId() {
+ public Long getTimezoneId() {
return timezoneId;
}
@@ -82,16 +79,11 @@ public class LuTimeZone extends DomainVo {
this.timezoneId = timezoneId;
}
- public int compareTo(Object obj){
- Long c1 = getId();
- Long c2 = ((LuTimeZone)obj).getId();
-
- return c1.compareTo(c2);
- }
-
-
- private String name;
- private Long timezoneId;
- private String value;
+ @Override
+ public int compareTo(Object obj) {
+ Long c1 = getId();
+ Long c2 = ((LuTimeZone) obj).getId();
+ return c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java
index 9f3f83e2..a13f17a4 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,114 +37,124 @@
*/
package org.onap.portalsdk.core.domain;
-
import org.onap.portalsdk.core.domain.support.DomainVo;
public class Menu extends DomainVo {
-
- /**
- *
- */
+
private static final long serialVersionUID = 1L;
- public Menu() {}
- public String getAction() {
- return action;
- }
+ private String menuLevel;
+ private String label;
+ private Long parentId;
+ private String action;
+ private String functionCd;
+ private Short sortOrder;
+ private String servlet;
+ private String queryString;
+ private String externalUrl;
+ private String target;
+ private boolean active;
+ private String menuSetCode;
+ private boolean separator;
+ private String imageSrc;
+
+ public String getAction() {
+ return action;
+ }
- public boolean isActive() {
- return active;
- }
+ public boolean isActive() {
+ return active;
+ }
- public String getExternalUrl() {
- return externalUrl;
- }
+ public String getExternalUrl() {
+ return externalUrl;
+ }
- public String getFunctionCd() {
- return functionCd;
- }
+ public String getFunctionCd() {
+ return functionCd;
+ }
- public String getLabel() {
- return label;
- }
+ public String getLabel() {
+ return label;
+ }
- public String getMenuLevel() {
- return menuLevel;
- }
+ public String getMenuLevel() {
+ return menuLevel;
+ }
- public Long getParentId() {
- return parentId;
- }
+ public Long getParentId() {
+ return parentId;
+ }
- public String getQueryString() {
- return queryString;
- }
+ public String getQueryString() {
+ return queryString;
+ }
- public String getServlet() {
- return servlet;
- }
+ public String getServlet() {
+ return servlet;
+ }
- public Short getSortOrder() {
- return sortOrder;
- }
+ public Short getSortOrder() {
+ return sortOrder;
+ }
- public String getTarget() {
- return target;
- }
+ public String getTarget() {
+ return target;
+ }
- public String getMenuSetCode() {
- return menuSetCode;
- }
+ public String getMenuSetCode() {
+ return menuSetCode;
+ }
- public void setAction(String action) {
- this.action = action;
- }
+ public void setAction(String action) {
+ this.action = action;
+ }
- public void setActive(boolean active) {
- this.active = active;
- }
+ public void setActive(boolean active) {
+ this.active = active;
+ }
- public void setExternalUrl(String externalUrl) {
- this.externalUrl = externalUrl;
- }
+ public void setExternalUrl(String externalUrl) {
+ this.externalUrl = externalUrl;
+ }
- public void setFunctionCd(String functionCd) {
- this.functionCd = functionCd;
- }
+ public void setFunctionCd(String functionCd) {
+ this.functionCd = functionCd;
+ }
- public void setLabel(String label) {
- this.label = label;
- }
+ public void setLabel(String label) {
+ this.label = label;
+ }
- public void setMenuLevel(String menuLevel) {
- this.menuLevel = menuLevel;
- }
+ public void setMenuLevel(String menuLevel) {
+ this.menuLevel = menuLevel;
+ }
- public void setParentId(Long parentId) {
- this.parentId = parentId;
- }
+ public void setParentId(Long parentId) {
+ this.parentId = parentId;
+ }
- public void setQueryString(String queryString) {
- this.queryString = queryString;
- }
+ public void setQueryString(String queryString) {
+ this.queryString = queryString;
+ }
- public void setServlet(String servlet) {
- this.servlet = servlet;
- }
+ public void setServlet(String servlet) {
+ this.servlet = servlet;
+ }
- public void setSortOrder(Short sortOrder) {
- this.sortOrder = sortOrder;
- }
+ public void setSortOrder(Short sortOrder) {
+ this.sortOrder = sortOrder;
+ }
- public void setTarget(String target) {
- this.target = target;
- }
+ public void setTarget(String target) {
+ this.target = target;
+ }
- public void setMenuSetCode(String menuSetCode) {
- this.menuSetCode = menuSetCode;
- }
+ public void setMenuSetCode(String menuSetCode) {
+ this.menuSetCode = menuSetCode;
+ }
- public boolean isSeparator() {
+ public boolean isSeparator() {
return separator;
}
@@ -160,19 +170,4 @@ public class Menu extends DomainVo {
this.imageSrc = imageSrc;
}
- private String menuLevel;
- private String label;
- private Long parentId;
- private String action;
- private String functionCd;
- private Short sortOrder;
- private String servlet;
- private String queryString;
- private String externalUrl;
- private String target;
- private boolean active;
- private String menuSetCode;
- private boolean separator;
- private String imageSrc;
-
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java
index 8967b4f4..be8264a6 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,54 +37,51 @@
*/
package org.onap.portalsdk.core.domain;
-import java.util.*;
+import java.util.Set;
+import java.util.TreeSet;
public class MenuData extends Menu {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private MenuData parentMenu;
- private Set childMenus = new TreeSet();
+ private static final long serialVersionUID = 1L;
+ private MenuData parentMenu;
+ private Set childMenus = new TreeSet();
- public MenuData() {}
+ public MenuData() {
+ }
- public Set getChildMenus() {
- return childMenus;
- }
+ public Set getChildMenus() {
+ return childMenus;
+ }
- public MenuData getParentMenu() {
- return parentMenu;
- }
+ public void setChildMenus(Set childMenus) {
+ this.childMenus = childMenus;
+ }
- public void setChildMenus(Set childMenus) {
- this.childMenus = childMenus;
- }
+ public MenuData getParentMenu() {
+ return parentMenu;
+ }
- public void setParentMenu(MenuData parentMenu) {
- this.parentMenu = parentMenu;
- }
+ public void setParentMenu(MenuData parentMenu) {
+ this.parentMenu = parentMenu;
+ }
- public int compareTo(Object obj){
+ public String getActiveAsString() {
+ return String.valueOf(isActive());
+ }
- Short c1 = getSortOrder();
- Short c2 = ((MenuData)obj).getSortOrder();
-
- return (c1 == null || c2 == null) ? 1 : ((c1.compareTo(c2) == 0) ? 1 : c1.compareTo(c2));
- }
-
- public String getActiveAsString(){
- return String.valueOf(isActive());
- }
+ public String getParentIdAsString() {
+ return String.valueOf(getParentId());
+ }
- public String getParentIdAsString(){
- return String.valueOf(getParentId());
- }
-
- public String getSeparatorAsString(){
- return String.valueOf(isSeparator());
- }
+ public String getSeparatorAsString() {
+ return String.valueOf(isSeparator());
+ }
+ @Override
+ public int compareTo(Object obj) {
+ Short c1 = getSortOrder();
+ Short c2 = ((MenuData) obj).getSortOrder();
+ return (c1 == null || c2 == null) ? 1 : ((c1.compareTo(c2) == 0) ? 1 : c1.compareTo(c2));
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java
index 02d1c838..9df131de 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -36,9 +36,10 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.portalsdk.core.domain;
+
import org.onap.portalsdk.core.domain.support.DomainVo;
-public class Profile extends DomainVo{
+public class Profile extends DomainVo {
private static final long serialVersionUID = 3409056457412656883L;
@@ -49,19 +50,17 @@ public class Profile extends DomainVo{
private String orgManagerUserId;
private String active_yn;
private String orgUserId;
- public Profile() {}
-
+ @Override
public Long getId() {
return id;
}
-
+ @Override
public void setId(Long id) {
this.id = id;
}
-
public String getFirst_name() {
return first_name;
}
@@ -109,6 +108,5 @@ public class Profile extends DomainVo{
public void setOrgUserId(String orgUserId) {
this.orgUserId = orgUserId;
}
-
-
+
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java
index b2cdce05..2d772943 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,7 +37,6 @@
*/
package org.onap.portalsdk.core.domain;
-
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
@@ -47,146 +46,140 @@ import org.onap.portalsdk.core.domain.support.DomainVo;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
- * <p>Role.java</p>
- * <p>Represents a role data object.</p>
+ * <p>
+ * Role.java
+ * </p>
+ * <p>
+ * Represents a role data object.
+ * </p>
*
* @version 1.0
*/
public class Role extends DomainVo {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private String name;
- private boolean active;
- private Integer priority;
-
- private Set roleFunctions = new TreeSet();
-
- private Set childRoles = new TreeSet();
- @JsonIgnore
- private Set parentRoles = new TreeSet();
-
- public Role() {}
-
- public String getName() {
- return name;
- }
-
- public boolean getActive() {
- return active;
- }
-
- public Set getRoleFunctions() {
- return roleFunctions;
- }
-
- public Integer getPriority() {
- return priority;
- }
-
- public Set getChildRoles() {
- return childRoles;
- }
-
- public Set getParentRoles() {
- return parentRoles;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-
- public void setRoleFunctions(Set roleFunctions) {
- this.roleFunctions = roleFunctions;
- }
-
- public void setPriority(Integer priority) {
- this.priority = priority;
- }
-
-
- public void setChildRoles(Set childRoles) {
- this.childRoles = childRoles;
- }
-
- public void setParentRoles(Set parentRoles) {
- this.parentRoles = parentRoles;
- }
-
- @SuppressWarnings("unchecked")
- public void addRoleFunction(RoleFunction roleFunction) {
- this.roleFunctions.add(roleFunction);
- }
-
- @SuppressWarnings("unchecked")
- public void addChildRole(Role role) {
- this.childRoles.add(role);
- }
-
- @SuppressWarnings("unchecked")
- public void addParentRole(Role role) {
- this.parentRoles.add(role);
- }
-
- public String getEditUrl() {
- return "/role.htm?role_id=" + getId();
- }
-
+ private String name;
+ private boolean active;
+ private Integer priority;
+
+ private Set roleFunctions = new TreeSet();
+ private Set childRoles = new TreeSet();
+ @JsonIgnore
+ private Set parentRoles = new TreeSet();
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean getActive() {
+ return active;
+ }
+
+ public Set getRoleFunctions() {
+ return roleFunctions;
+ }
+
+ public Integer getPriority() {
+ return priority;
+ }
+
+ public Set getChildRoles() {
+ return childRoles;
+ }
+
+ public Set getParentRoles() {
+ return parentRoles;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ public void setRoleFunctions(Set roleFunctions) {
+ this.roleFunctions = roleFunctions;
+ }
+
+ public void setPriority(Integer priority) {
+ this.priority = priority;
+ }
+
+ public void setChildRoles(Set childRoles) {
+ this.childRoles = childRoles;
+ }
+
+ public void setParentRoles(Set parentRoles) {
+ this.parentRoles = parentRoles;
+ }
+
+ @SuppressWarnings("unchecked")
+ public void addRoleFunction(RoleFunction roleFunction) {
+ this.roleFunctions.add(roleFunction);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void addChildRole(Role role) {
+ this.childRoles.add(role);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void addParentRole(Role role) {
+ this.parentRoles.add(role);
+ }
+
+ public String getEditUrl() {
+ return "/role.htm?role_id=" + getId();
+ }
+
public String getToggleActiveImage() {
- return "/static/fusion/images/" + (getActive() ? "active.png" : "inactive.png" );
+ return "/static/fusion/images/" + (getActive() ? "active.png" : "inactive.png");
}
public String getToggleActiveAltText() {
return getActive() ? "Click to Deactivate Role" : "Click to Activate Role";
}
-
- public void removeChildRole(Long roleId) {
- Iterator i = this.childRoles.iterator();
-
- while (i.hasNext()) {
- Role childRole = (Role)i.next();
- if (childRole.getId().equals(roleId)) {
- this.childRoles.remove(childRole);
- break;
- }
- }
- }
-
- public void removeParentRole(Long roleId) {
- Iterator i = this.parentRoles.iterator();
-
- while (i.hasNext()) {
- Role parentRole = (Role)i.next();
- if (parentRole.getId().equals(roleId)) {
- this.parentRoles.remove(parentRole);
- break;
- }
- }
- }
-
- public void removeRoleFunction(String roleFunctionCd) {
- Iterator i = this.roleFunctions.iterator();
-
- while (i.hasNext()) {
- RoleFunction roleFunction = (RoleFunction)i.next();
- if (roleFunction.getCode().equals(roleFunctionCd)) {
- this.roleFunctions.remove(roleFunction);
- break;
- }
- }
- }
-
- public int compareTo(Object obj){
- String c1 = getName();
- String c2 = ((Role)obj).getName();
-
- return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
- }
-
+
+ public void removeChildRole(Long roleId) {
+ Iterator i = this.childRoles.iterator();
+ while (i.hasNext()) {
+ Role childRole = (Role) i.next();
+ if (childRole.getId().equals(roleId)) {
+ this.childRoles.remove(childRole);
+ break;
+ }
+ }
+ }
+
+ public void removeParentRole(Long roleId) {
+ Iterator i = this.parentRoles.iterator();
+ while (i.hasNext()) {
+ Role parentRole = (Role) i.next();
+ if (parentRole.getId().equals(roleId)) {
+ this.parentRoles.remove(parentRole);
+ break;
+ }
+ }
+ }
+
+ public void removeRoleFunction(String roleFunctionCd) {
+ Iterator i = this.roleFunctions.iterator();
+ while (i.hasNext()) {
+ RoleFunction roleFunction = (RoleFunction) i.next();
+ if (roleFunction.getCode().equals(roleFunctionCd)) {
+ this.roleFunctions.remove(roleFunction);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public int compareTo(Object obj) {
+ String c1 = getName();
+ String c2 = ((Role) obj).getName();
+ return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
+ }
+
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java
index 448cc232..1114bca0 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,53 +37,50 @@
*/
package org.onap.portalsdk.core.domain;
-
import org.onap.portalsdk.core.domain.support.DomainVo;
/**
- * <p>RoleFunction.java</p>
+ * <p>
+ * RoleFunction.java
+ * </p>
*
- * <p>Represents a role function data object.</p>
+ * <p>
+ * Represents a role function data object.
+ * </p>
*
* @version 1.0
*/
public class RoleFunction extends DomainVo {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public RoleFunction() {}
- public String getName() {
- return name;
- }
+ private static final long serialVersionUID = 1L;
+ private String code;
+ private String name;
- public String getCode() {
- return code;
- }
+ public String getName() {
+ return name;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ public String getCode() {
+ return code;
+ }
- public void setCode(String code) {
- this.code = code;
- }
+ public void setName(String name) {
+ this.name = name;
+ }
- public String getEditUrl() {
- return "/role_function.htm?role_function_id=" + getCode();
- }
-
- public int compareTo(Object obj){
- String c1 = getName();
- String c2 = ((RoleFunction)obj).getName();
+ public void setCode(String code) {
+ this.code = code;
+ }
- return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
- }
+ public String getEditUrl() {
+ return "/role_function.htm?role_function_id=" + getCode();
+ }
- private String code;
- private String name;
- private String editUrl;
+ @Override
+ public int compareTo(Object obj) {
+ String c1 = getName();
+ String c2 = ((RoleFunction) obj).getName();
+ return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java
index f7237ed5..55fe3624 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -42,55 +42,54 @@ import java.util.Objects;
public class UrlsAccessible extends FusionVo implements Serializable {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private UrlsAccessibleKey urlsAccessibleKey = new UrlsAccessibleKey();
+ private UrlsAccessibleKey urlsAccessibleKey = new UrlsAccessibleKey();
- public UrlsAccessible() {}
+ public UrlsAccessible() {
+ super();
+ }
- public UrlsAccessible(String url, String functionCd) {
- this();
- setUrl(url);
- setFunctionCd(functionCd);
- }
+ public UrlsAccessible(String url, String functionCd) {
+ this();
+ setUrl(url);
+ setFunctionCd(functionCd);
+ }
- public String getUrl() {
- return getUrlsAccessibleKey().getUrl();
- }
+ public String getUrl() {
+ return getUrlsAccessibleKey().getUrl();
+ }
- public String getFunctionCd() {
- return getUrlsAccessibleKey().getFunctionCd();
- }
+ public String getFunctionCd() {
+ return getUrlsAccessibleKey().getFunctionCd();
+ }
- public void setUrl(String url) {
- getUrlsAccessibleKey().setUrl(url);
- }
+ public void setUrl(String url) {
+ getUrlsAccessibleKey().setUrl(url);
+ }
- public void setFunctionCd(String functionCd) {
- getUrlsAccessibleKey().setFunctionCd(functionCd);
- }
+ public void setFunctionCd(String functionCd) {
+ getUrlsAccessibleKey().setFunctionCd(functionCd);
+ }
- public UrlsAccessibleKey getUrlsAccessibleKey() {
- return urlsAccessibleKey;
- }
+ public UrlsAccessibleKey getUrlsAccessibleKey() {
+ return urlsAccessibleKey;
+ }
- public void setUrlsAccessibleKey(UrlsAccessibleKey urlsAccessibleKey) {
- this.urlsAccessibleKey = urlsAccessibleKey;
- }
+ public void setUrlsAccessibleKey(UrlsAccessibleKey urlsAccessibleKey) {
+ this.urlsAccessibleKey = urlsAccessibleKey;
+ }
- @Override
- public int hashCode() {
- return Objects.hash(getUrl(), getFunctionCd());
- }
+ @Override
+ public int hashCode() {
+ return Objects.hash(getUrl(), getFunctionCd());
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof UrlsAccessible))
+ return false;
+ UrlsAccessible ua = (UrlsAccessible) obj;
+ return Objects.equals(ua.getUrl(), getUrl()) && Objects.equals(ua.getFunctionCd(), getFunctionCd());
+ }
- @Override
- public boolean equals( Object obj ) {
- if (obj == null || !(obj instanceof UrlsAccessible))
- return false;
- UrlsAccessible ua = (UrlsAccessible)obj;
- return Objects.equals(ua.getUrl(), getUrl()) && Objects.equals(ua.getFunctionCd(), getFunctionCd());
- }
-
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java
index e7bdc5a6..59732b27 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,72 +37,57 @@
*/
package org.onap.portalsdk.core.domain;
-import java.io.*;
-
+import java.io.Serializable;
public class UrlsAccessibleKey implements Serializable {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private String url;
- private String functionCd;
-
- public UrlsAccessibleKey() {
- }
-
- public UrlsAccessibleKey(String url, String functionCd) {
- setUrl(url);
- setFunctionCd(functionCd);
- }
-
-
- public String getUrl() {
- return url;
- }
-
-
- public String getFunctionCd() {
- return functionCd;
- }
-
-
- public void setUrl(String url) {
- this.url = url;
- }
-
-
- public void setFunctionCd(String functionCd) {
- this.functionCd = functionCd;
- }
-
-
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null) {
- return false;
- }
-
- if (!(o instanceof UrlsAccessibleKey)) {
- return false;
- }
-
- final UrlsAccessibleKey key = (UrlsAccessibleKey)o;
-
- if (getFunctionCd().equals(key.getFunctionCd()) & getUrl().equals(key.getUrl())) {
- return true;
- }
-
- return false;
- }
-
-
- public int hashCode() {
- return getUrl().hashCode() + getFunctionCd().hashCode();
- }
+ private String url;
+ private String functionCd;
+
+ public UrlsAccessibleKey() {
+ super();
+ }
+
+ public UrlsAccessibleKey(String url, String functionCd) {
+ setUrl(url);
+ setFunctionCd(functionCd);
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getFunctionCd() {
+ return functionCd;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public void setFunctionCd(String functionCd) {
+ this.functionCd = functionCd;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null)
+ return false;
+ if (!(o instanceof UrlsAccessibleKey))
+ return false;
+ final UrlsAccessibleKey key = (UrlsAccessibleKey) o;
+ if (getFunctionCd().equals(key.getFunctionCd()) && getUrl().equals(key.getUrl()))
+ return true;
+
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return getUrl().hashCode() + getFunctionCd().hashCode();
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java
index a72f1d6a..6d823817 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,7 +37,6 @@
*/
package org.onap.portalsdk.core.domain;
-
import java.util.Date;
import java.util.Iterator;
import java.util.Set;
@@ -47,374 +46,370 @@ import java.util.TreeSet;
import org.onap.portalsdk.core.domain.support.DomainVo;
/**
- * <p>User.java</p>
+ * <p>
+ * User.java
+ * </p>
*
- * <p>Represents a user data object.</p>
+ * <p>
+ * Represents a user data object.
+ * </p>
*
* @version 1.0
*/
public class User extends DomainVo {
-
- /**
- *
- */
+
private static final long serialVersionUID = 1L;
- private Long orgId;
- private Long managerId;
- private String firstName;
- private String middleInitial;
- private String lastName;
- private String phone;
- private String fax;
- private String cellular;
- private String email;
- private Long addressId;
- private String alertMethodCd;
- private String hrid;
- private String orgUserId;
- private String orgCode;
- private String address1;
- private String address2;
- private String city;
- private String state;
- private String zipCode;
- private String country;
- private String orgManagerUserId;
- private String locationClli;
- private String businessCountryCode;
- private String businessCountryName;
- private String businessUnit;
- private String businessUnitName;
- private String department;
- private String departmentName;
- private String companyCode;
- private String company;
- private String zipCodeSuffix;
- private String jobTitle;
- private String commandChain;
- private String siloStatus;
- private String costCenter;
- private String financialLocCode;
-
-
-
- private String loginId;
- private String loginPwd;
- private Date lastLoginDate;
- private boolean active;
- private boolean internal;
- private Long selectedProfileId;
- private Long timeZoneId;
- private boolean online;
- private String chatId;
-
- private Set userApps = new TreeSet();
-
- private Set pseudoRoles = new TreeSet();
-
-
- public User() {}
-
- public Long getAddressId() {
- return addressId;
- }
-
- public String getAlertMethodCd() {
- return alertMethodCd;
- }
-
- public String getCellular() {
- return cellular;
- }
-
- public String getEmail() {
- return email;
- }
-
- public String getFax() {
- return fax;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public String getHrid() {
- return hrid;
- }
-
- public Date getLastLoginDate() {
- return lastLoginDate;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public String getFullName() {
- return getFirstName() + " " + getLastName();
- }
-
- public String getLoginId() {
- return loginId;
- }
-
- public String getLoginPwd() {
- return loginPwd;
- }
-
- public Long getManagerId() {
- return managerId;
- }
-
- public String getMiddleInitial() {
- return middleInitial;
- }
-
- public String getOrgCode() {
- return orgCode;
- }
-
- public Long getOrgId() {
- return orgId;
- }
-
- public String getPhone() {
- return phone;
- }
-
- public String getOrgUserId() {
- return orgUserId;
- }
-
- public boolean getActive() {
- return active;
- }
-
- public boolean getInternal() {
- return internal;
- }
-
- public String getAddress1() {
- return address1;
- }
-
- public String getAddress2() {
- return address2;
- }
-
- public String getCity() {
- return city;
- }
+ private Long orgId;
+ private Long managerId;
+ private String firstName;
+ private String middleInitial;
+ private String lastName;
+ private String phone;
+ private String fax;
+ private String cellular;
+ private String email;
+ private Long addressId;
+ private String alertMethodCd;
+ private String hrid;
+ private String orgUserId;
+ private String orgCode;
+ private String address1;
+ private String address2;
+ private String city;
+ private String state;
+ private String zipCode;
+ private String country;
+ private String orgManagerUserId;
+ private String locationClli;
+ private String businessCountryCode;
+ private String businessCountryName;
+ private String businessUnit;
+ private String businessUnitName;
+ private String department;
+ private String departmentName;
+ private String companyCode;
+ private String company;
+ private String zipCodeSuffix;
+ private String jobTitle;
+ private String commandChain;
+ private String siloStatus;
+ private String costCenter;
+ private String financialLocCode;
+
+ private String loginId;
+ private String loginPwd;
+ private Date lastLoginDate;
+ private boolean active;
+ private boolean internal;
+ private Long selectedProfileId;
+ private Long timeZoneId;
+ private boolean online;
+ private String chatId;
+
+ private Set userApps = new TreeSet();
+
+ private Set pseudoRoles = new TreeSet();
+
+ public Long getAddressId() {
+ return addressId;
+ }
+
+ public String getAlertMethodCd() {
+ return alertMethodCd;
+ }
+
+ public String getCellular() {
+ return cellular;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public String getFax() {
+ return fax;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public String getHrid() {
+ return hrid;
+ }
+
+ public Date getLastLoginDate() {
+ return lastLoginDate;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public String getFullName() {
+ return getFirstName() + " " + getLastName();
+ }
+
+ public String getLoginId() {
+ return loginId;
+ }
+
+ public String getLoginPwd() {
+ return loginPwd;
+ }
+
+ public Long getManagerId() {
+ return managerId;
+ }
+
+ public String getMiddleInitial() {
+ return middleInitial;
+ }
- public String getCountry() {
- return country;
- }
+ public String getOrgCode() {
+ return orgCode;
+ }
- public String getState() {
- return state;
- }
+ public Long getOrgId() {
+ return orgId;
+ }
- public String getZipCode() {
- return zipCode;
- }
+ public String getPhone() {
+ return phone;
+ }
- public String getBusinessCountryCode() {
- return businessCountryCode;
- }
+ public String getOrgUserId() {
+ return orgUserId;
+ }
- public String getCommandChain() {
- return commandChain;
- }
+ public boolean getActive() {
+ return active;
+ }
- public String getCompany() {
- return company;
- }
+ public boolean getInternal() {
+ return internal;
+ }
- public String getCompanyCode() {
- return companyCode;
- }
+ public String getAddress1() {
+ return address1;
+ }
- public String getDepartment() {
- return department;
- }
+ public String getAddress2() {
+ return address2;
+ }
- public String getJobTitle() {
- return jobTitle;
- }
+ public String getCity() {
+ return city;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public String getZipCode() {
+ return zipCode;
+ }
+
+ public String getBusinessCountryCode() {
+ return businessCountryCode;
+ }
+
+ public String getCommandChain() {
+ return commandChain;
+ }
+
+ public String getCompany() {
+ return company;
+ }
+
+ public String getCompanyCode() {
+ return companyCode;
+ }
+
+ public String getDepartment() {
+ return department;
+ }
+
+ public String getJobTitle() {
+ return jobTitle;
+ }
+
+ public String getLocationClli() {
+ return locationClli;
+ }
- public String getLocationClli() {
- return locationClli;
- }
+ public String getOrgManagerUserId() {
+ return orgManagerUserId;
+ }
- public String getOrgManagerUserId() {
- return orgManagerUserId;
- }
+ public String getZipCodeSuffix() {
+ return zipCodeSuffix;
+ }
- public String getZipCodeSuffix() {
- return zipCodeSuffix;
- }
+ public String getBusinessCountryName() {
+ return businessCountryName;
+ }
- public String getBusinessCountryName() {
- return businessCountryName;
- }
+ public Set getPseudoRoles() {
+ return pseudoRoles;
+ }
- public Set getPseudoRoles() {
- return pseudoRoles;
- }
+ public Long getSelectedProfileId() {
+ return selectedProfileId;
+ }
- public Long getSelectedProfileId() {
- return selectedProfileId;
- }
+ public void setAddressId(Long addressId) {
+ this.addressId = addressId;
+ }
- public void setAddressId(Long addressId) {
- this.addressId = addressId;
- }
+ public void setAlertMethodCd(String alertMethodCd) {
+ this.alertMethodCd = alertMethodCd;
+ }
- public void setAlertMethodCd(String alertMethodCd) {
- this.alertMethodCd = alertMethodCd;
- }
+ public void setCellular(String cellular) {
+ this.cellular = cellular;
+ }
- public void setCellular(String cellular) {
- this.cellular = cellular;
- }
+ public void setEmail(String email) {
+ this.email = email;
+ }
- public void setEmail(String email) {
- this.email = email;
- }
+ public void setFax(String fax) {
+ this.fax = fax;
+ }
- public void setFax(String fax) {
- this.fax = fax;
- }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
+ public void setHrid(String hrid) {
+ this.hrid = hrid;
+ }
- public void setHrid(String hrid) {
- this.hrid = hrid;
- }
+ public void setLastLoginDate(Date lastLoginDate) {
+ this.lastLoginDate = lastLoginDate;
+ }
- public void setLastLoginDate(Date lastLoginDate) {
- this.lastLoginDate = lastLoginDate;
- }
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
+ public void setLoginId(String loginId) {
+ this.loginId = loginId;
+ }
- public void setLoginId(String loginId) {
- this.loginId = loginId;
- }
+ public void setLoginPwd(String loginPwd) {
+ this.loginPwd = loginPwd;
+ }
- public void setLoginPwd(String loginPwd) {
- this.loginPwd = loginPwd;
- }
+ public void setManagerId(Long managerId) {
+ this.managerId = managerId;
+ }
- public void setManagerId(Long managerId) {
- this.managerId = managerId;
- }
+ public void setMiddleInitial(String middleInitial) {
+ this.middleInitial = middleInitial;
+ }
- public void setMiddleInitial(String middleInitial) {
- this.middleInitial = middleInitial;
- }
+ public void setOrgCode(String orgCode) {
+ this.orgCode = orgCode;
+ }
- public void setOrgCode(String orgCode) {
- this.orgCode = orgCode;
- }
+ public void setOrgId(Long orgId) {
+ this.orgId = orgId;
+ }
- public void setOrgId(Long orgId) {
- this.orgId = orgId;
- }
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
- public void setPhone(String phone) {
- this.phone = phone;
- }
+ public void setOrgUserId(String orgUserId) {
+ this.orgUserId = orgUserId;
+ }
- public void setOrgUserId(String orgUserId) {
- this.orgUserId = orgUserId;
- }
+ public void setActive(boolean active) {
+ this.active = active;
+ }
- public void setActive(boolean active) {
- this.active = active;
- }
+ public void setInternal(boolean internal) {
+ this.internal = internal;
+ }
- public void setInternal(boolean internal) {
- this.internal = internal;
- }
+ public void setAddress1(String address1) {
+ this.address1 = address1;
+ }
- public void setAddress1(String address1) {
- this.address1 = address1;
- }
+ public void setAddress2(String address2) {
+ this.address2 = address2;
+ }
- public void setAddress2(String address2) {
- this.address2 = address2;
- }
+ public void setCity(String city) {
+ this.city = city;
+ }
- public void setCity(String city) {
- this.city = city;
- }
+ public void setCountry(String country) {
+ this.country = country;
+ }
- public void setCountry(String country) {
- this.country = country;
- }
+ public void setState(String state) {
+ this.state = state;
+ }
- public void setState(String state) {
- this.state = state;
- }
+ public void setZipCode(String zipCode) {
+ this.zipCode = zipCode;
+ }
- public void setZipCode(String zipCode) {
- this.zipCode = zipCode;
- }
+ public void setBusinessCountryCode(String businessCountryCode) {
+ this.businessCountryCode = businessCountryCode;
+ }
- public void setBusinessCountryCode(String businessCountryCode) {
- this.businessCountryCode = businessCountryCode;
- }
+ public void setCommandChain(String commandChain) {
+ this.commandChain = commandChain;
+ }
- public void setCommandChain(String commandChain) {
- this.commandChain = commandChain;
- }
+ public void setCompany(String company) {
+ this.company = company;
+ }
- public void setCompany(String company) {
- this.company = company;
- }
+ public void setCompanyCode(String companyCode) {
+ this.companyCode = companyCode;
+ }
- public void setCompanyCode(String companyCode) {
- this.companyCode = companyCode;
- }
+ public void setDepartment(String department) {
+ this.department = department;
+ }
- public void setDepartment(String department) {
- this.department = department;
- }
+ public void setJobTitle(String jobTitle) {
+ this.jobTitle = jobTitle;
+ }
- public void setJobTitle(String jobTitle) {
- this.jobTitle = jobTitle;
- }
+ public void setLocationClli(String locationClli) {
+ this.locationClli = locationClli;
+ }
- public void setLocationClli(String locationClli) {
- this.locationClli = locationClli;
- }
+ public void setOrgManagerUserId(String orgManagerUserId) {
+ this.orgManagerUserId = orgManagerUserId;
+ }
- public void setOrgManagerUserId(String orgManagerUserId) {
- this.orgManagerUserId = orgManagerUserId;
- }
+ public void setZipCodeSuffix(String zipCodeSuffix) {
+ this.zipCodeSuffix = zipCodeSuffix;
+ }
- public void setZipCodeSuffix(String zipCodeSuffix) {
- this.zipCodeSuffix = zipCodeSuffix;
- }
+ public void setBusinessCountryName(String businessCountryName) {
+ this.businessCountryName = businessCountryName;
+ }
- public void setBusinessCountryName(String businessCountryName) {
- this.businessCountryName = businessCountryName;
- }
+ public void setPseudoRoles(Set pseudoRoles) {
+ this.pseudoRoles = pseudoRoles;
+ }
- public void setPseudoRoles(Set pseudoRoles) {
- this.pseudoRoles = pseudoRoles;
- }
+ public void setSelectedProfileId(Long selectedProfileId) {
+ this.selectedProfileId = selectedProfileId;
+ }
- public void setSelectedProfileId(Long selectedProfileId) {
- this.selectedProfileId = selectedProfileId;
- }
-
public Long getTimeZoneId() {
return timeZoneId;
}
@@ -454,7 +449,7 @@ public class User extends DomainVo {
public void setFinancialLocCode(String financialLocCode) {
this.financialLocCode = financialLocCode;
}
-
+
public String getBusinessUnitName() {
return businessUnitName;
}
@@ -471,15 +466,6 @@ public class User extends DomainVo {
this.departmentName = departmentName;
}
- public int compareTo(Object obj){
- User user = (User)obj;
-
- String c1 = getLastName() + getFirstName() + getMiddleInitial();
- String c2 = user.getLastName() + user.getFirstName() + user.getMiddleInitial();
-
- return c1.compareTo(c2);
- }
-
public boolean isOnline() {
return online;
}
@@ -503,28 +489,27 @@ public class User extends DomainVo {
public void setUserApps(Set userApps) {
this.userApps = userApps;
}
-
+
@SuppressWarnings("unchecked")
public void addAppRoles(App app, SortedSet<Role> roles) {
- if(roles!=null){
- //add all
- Set userApps = new TreeSet();
+ if (roles != null) {
+ // add all
+ Set newUserApps = new TreeSet();
Iterator itr = roles.iterator();
- while(itr.hasNext()){
+ while (itr.hasNext()) {
Role role = (Role) itr.next();
UserApp userApp = new UserApp();
userApp.setUserId(this.id);
userApp.setApp(app);
userApp.setRole(role);
- userApps.add(userApp);
+ newUserApps.add(userApp);
}
- setUserApps(userApps);
+ setUserApps(newUserApps);
} else {
- //remove all
+ // remove all
this.userApps.clear();
}
-
}
@SuppressWarnings("unchecked")
@@ -532,13 +517,11 @@ public class User extends DomainVo {
SortedSet<Role> roles = new TreeSet();
Set apps = getUserApps();
Iterator appsItr = apps.iterator();
- UserApp userApp = null;
- //getting default app
- while(appsItr.hasNext()){
- UserApp tempUserApp = (UserApp)appsItr.next();
- if(tempUserApp.getApp().getId().equals(app.getId())){
- userApp = tempUserApp;
- roles.add(userApp.getRole());
+ // getting default app
+ while (appsItr.hasNext()) {
+ UserApp tempUserApp = (UserApp) appsItr.next();
+ if (tempUserApp.getApp().getId().equals(app.getId())) {
+ roles.add(tempUserApp.getRole());
}
}
return roles;
@@ -550,53 +533,62 @@ public class User extends DomainVo {
app.setName("Default");
return getAppRoles(app);
}
-
- public UserApp getDefaultUserApp(){
+
+ public UserApp getDefaultUserApp() {
Set apps = getUserApps();
Iterator appsItr = apps.iterator();
UserApp userApp = null;
- //getting default app
- while(appsItr.hasNext()){
- UserApp tempApp = (UserApp)appsItr.next();
- if(tempApp.equals(new Long(1))){
+ // getting default app
+ while (appsItr.hasNext()) {
+ UserApp tempApp = (UserApp) appsItr.next();
+ if (tempApp.getApp().getId().equals(new Long(1))) {
userApp = tempApp;
break;
}
}
return userApp;
}
-
+
public void setRoles(SortedSet<Role> roles) {
App app = new App();
app.setId(new Long(1));
app.setName("Default");
- addAppRoles(app,roles);
+ addAppRoles(app, roles);
}
-
+
public void removeRole(Long roleId) {
Set apps = getUserApps();
Iterator appsItr = apps.iterator();
- //getting default app
- while(appsItr.hasNext()){
- UserApp tempUserApp = (UserApp)appsItr.next();
- if(tempUserApp.getRole().getId().equals(roleId)){
- appsItr.remove();
- }
+ // getting default app
+ while (appsItr.hasNext()) {
+ UserApp tempUserApp = (UserApp) appsItr.next();
+ if (tempUserApp.getRole().getId().equals(roleId)) {
+ appsItr.remove();
}
-
+ }
+
}
-
+
@SuppressWarnings("unchecked")
- public void addRole(Role role){
- if(role!=null){
+ public void addRole(Role role) {
+ if (role != null) {
SortedSet<Role> roles = getRoles();
- if(roles==null){
+ if (roles == null) {
roles = new TreeSet();
- }
+ }
roles.add(role);
- setRoles(roles);
+ setRoles(roles);
}
+ }
+
+ @Override
+ public int compareTo(Object obj) {
+ User user = (User) obj;
+
+ String c1 = getLastName() + getFirstName() + getMiddleInitial();
+ String c2 = user.getLastName() + user.getFirstName() + user.getMiddleInitial();
+ return c1.compareTo(c2);
}
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java
index 74f7dd75..edaf0013 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,29 +37,16 @@
*/
package org.onap.portalsdk.core.domain;
-import java.util.Set;
-import java.util.TreeSet;
-// Generated Aug 27, 2014 5:51:36 PM by Hibernate Tools 3.4.0.CR1
-
-/**
- * FnUserRole generated by hbm2java
- */
@SuppressWarnings("rawtypes")
public class UserApp implements java.io.Serializable, Comparable {
- /**
- *
- */
private static final long serialVersionUID = 1L;
private Long userId;
private App app;
private Role role;
private Short priority;
- public UserApp() {
- }
-
public Long getUserId() {
return userId;
}
@@ -83,7 +70,7 @@ public class UserApp implements java.io.Serializable, Comparable {
public void setRole(Role role) {
this.role = role;
}
-
+
public Short getPriority() {
return this.priority;
}
@@ -92,10 +79,11 @@ public class UserApp implements java.io.Serializable, Comparable {
this.priority = priority;
}
+ @Override
public boolean equals(Object other) {
- if ((this == other))
+ if (this == other)
return true;
- if ((other == null))
+ if (other == null)
return false;
if (!(other instanceof UserApp))
return false;
@@ -104,26 +92,32 @@ public class UserApp implements java.io.Serializable, Comparable {
return (this.getUserId().equals(castOther.getUserId()))
&& (this.getApp().getId().equals(castOther.getApp().getId()))
&& (this.getRole().getId().equals(castOther.getRole().getId()))
- && ((this.priority==null && castOther.getPriority()==null) || this.getPriority().equals(castOther.getPriority()));
+ && ((this.priority == null && castOther.getPriority() == null)
+ || this.getPriority().equals(castOther.getPriority()));
}
+ @Override
public int hashCode() {
int result = 17;
-
- result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue());
- result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue());
- result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue());
- result = 37 * result + (int) (this.priority==null ? 0 : this.priority);
+ result = 37 * result + (int) (this.getUserId() == null ? 0 : this.getUserId().intValue());
+ result = 37 * result + (int) (this.getApp().getId() == null ? 0 : this.getApp().getId().intValue());
+ result = 37 * result + (int) (this.getRole().getId() == null ? 0 : this.getRole().getId().intValue());
+ result = 37 * result + (int) (this.priority == null ? 0 : this.priority);
return result;
}
- public int compareTo(Object other){
- UserApp castOther = (UserApp) other;
-
- Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()) + (this.priority==null ? 0 : this.priority);
- Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()) + (castOther.priority==null ? 0 : castOther.priority);
-
- return c1.compareTo(c2);
- }
+ @Override
+ public int compareTo(Object other) {
+ UserApp castOther = (UserApp) other;
+ Long c1 = (this.getUserId() == null ? 0 : this.getUserId())
+ + (this.getApp() == null || this.getApp().getId() == null ? 0 : this.getApp().getId())
+ + (this.getRole() == null || this.getRole().getId() == null ? 0 : this.getRole().getId())
+ + (this.priority == null ? 0 : this.priority);
+ Long c2 = (castOther.getUserId() == null ? 0 : castOther.getUserId())
+ + (castOther.getApp() == null || castOther.getApp().getId() == null ? 0 : castOther.getApp().getId())
+ + (castOther.getRole() == null || castOther.getRole().getId() == null ? 0 : castOther.getRole().getId())
+ + (castOther.priority == null ? 0 : castOther.priority);
+ return c1.compareTo(c2);
+ }
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java
index a9ec9760..d1fac039 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -80,26 +80,26 @@ public class UserAppId implements java.io.Serializable {
this.role = role;
}
+ @Override
public boolean equals(Object other) {
- if ((this == other))
+ if (this == other)
return true;
- if ((other == null))
+ if (other == null)
return false;
if (!(other instanceof UserAppId))
return false;
UserAppId castOther = (UserAppId) other;
- return (this.getUserId() == castOther.getUserId())
- && (this.getApp().getId() == castOther.getApp().getId())
+ return (this.getUserId() == castOther.getUserId()) && (this.getApp().getId() == castOther.getApp().getId())
&& (this.getRole().getId() == castOther.getRole().getId());
}
+ @Override
public int hashCode() {
int result = 17;
-
- result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue());
- result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue());
- result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue());
+ result = 37 * result + (int) (this.getUserId() == null ? 0 : this.getUserId().intValue());
+ result = 37 * result + (int) (this.getApp().getId() == null ? 0 : this.getApp().getId().intValue());
+ result = 37 * result + (int) (this.getRole().getId() == null ? 0 : this.getRole().getId().intValue());
return result;
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java
index cf296175..22b8b80a 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,19 +37,19 @@
*/
package org.onap.portalsdk.core.domain.sessionmgt;
-public class TimeoutVO implements Comparable<TimeoutVO>{
-
+public class TimeoutVO implements Comparable<TimeoutVO> {
+
private String jSessionId;
private Long sessionTimOutMilliSec;
-
- public TimeoutVO(){
-
+
+ public TimeoutVO() {
+ super();
}
-
+
public TimeoutVO(String _jSessionId, Long _sessionTimOutMilliSec) {
setjSessionId(_jSessionId);
setSessionTimOutMilliSec(_sessionTimOutMilliSec);
-
+
}
public String getjSessionId() {
@@ -69,13 +69,20 @@ public class TimeoutVO implements Comparable<TimeoutVO>{
}
@Override
+ public boolean equals(Object other) {
+ if (this == other)
+ return true;
+ if (other == null)
+ return false;
+ if (!(other instanceof TimeoutVO))
+ return false;
+ TimeoutVO castOther = (TimeoutVO) other;
+ return this.getSessionTimOutMilliSec() == castOther.getSessionTimOutMilliSec();
+ }
+
+ @Override
public int compareTo(TimeoutVO o) {
return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec);
}
-
-
-
-
-
-
+
} \ No newline at end of file
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
index e78589f8..948d78a0 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -38,43 +38,50 @@
package org.onap.portalsdk.core.domain.support;
public class Attribute {
- public double width;
- public double top;
- public double left;
- public String name;
- public double height;
-
+ 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
index 2f0c5d50..32828b78 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -39,36 +39,34 @@ package org.onap.portalsdk.core.domain.support;
import java.io.Serializable;
import java.util.HashSet;
+import java.util.Set;
+
+public class CollaborateList implements Serializable {
-public class CollaborateList implements Serializable {
-
private static final long serialVersionUID = -4104440747626736243L;
- private HashSet<String> userNameList = new HashSet<String>();
+ private HashSet<String> userNameList = new HashSet<>();
private static CollaborateList userListData = new CollaborateList();
- private CollaborateList(){}
- public static CollaborateList getInstance(){
+ private CollaborateList() {
+ }
+
+ public static CollaborateList getInstance() {
return userListData;
}
-
- public HashSet<String> getAllUserName(){
+
+ public Set<String> getAllUserName() {
return userNameList;
}
-
- public static void addUserName(String name){
- final HashSet<String> allUserName = CollaborateList.getInstance().getAllUserName();
- if(allUserName.contains(name)){
- //System.out.println("cannot add this user");
- }else{
+
+ 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 HashSet<String> allUserName = CollaborateList.getInstance().getAllUserName();
+
+ 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
index cdbf6611..ed065b4a 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -40,56 +40,64 @@ 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;
-
- public String name;
-
+
+ String name;
+
Size size;
-
+
Position p;
-
- public Map<String,Container> containerRowCol;
-
- public Map<String,Element> elementRowCol;
-
+
+ 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;
-
- public double top;
-
- public double left;
-
- public double height;
-
- public double width;
-
- public String visibilityType;
-
-
-
-
-
- public Container(String id, String name, int numOfRows, int numOfCols, 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;
@@ -100,27 +108,13 @@ public class Container {
this.interEleToContainerH = interEleToContainerH;
this.interEleToInnerContainerWd = interEleToInnerContainerWd;
this.interEleToInnerContainerH = interEleToInnerContainerH;
-
- }
-
-
- public List<Container> innerCList;
-
- public List<Element> elementList;
-
- public Container() {
-
+
}
-
-
-
+
public Map<String, Container> getContainerRowCol() {
return containerRowCol;
}
-
-
-
public Map<String, Element> getElementRowCol() {
return elementRowCol;
}
@@ -133,16 +127,14 @@ public class Container {
this.name = name;
}
-
- public void setInnerContainer(Map<String,Container> innerCon) {
+ public void setInnerContainer(Map<String, Container> innerCon) {
containerRowCol = innerCon;
}
-
- public void setElements(Map<String,Element> innerE) {
+
+ public void setElements(Map<String, Element> innerE) {
elementRowCol = innerE;
}
-
-
+
public Position getP() {
return p;
}
@@ -151,33 +143,26 @@ public class Container {
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;
}
@@ -187,103 +172,92 @@ public class Container {
}
public Size computeSize() {
+ logger.debug("computeSize: name is {}", getName());
Size size = new Size();
double width = 0;
double height = 0;
- // System.out.println("Inside computesize");
- 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();
- // System.out.println(containerRowCol.get(i+String.valueOf(j)).getName()+" "+
- // 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;
+ 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;
}
}
- // System.out.println("Object name "+this.getName());
+
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;
+ || 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;
+ width += (numOfCols - 1) * interEleWd + 2 * interEleToContainerWd;
}
size.setWidth(width);
- for (int j = 0; j<numOfCols; j++) {
- // System.out.println("Inside computesize height "+numOfCols);
- // System.out.println(containerRowCol.toString());
- if ((containerRowCol != null && containerRowCol.containsKey(String.valueOf(numOfRows-1)+j)) ||
- (elementRowCol!= null && elementRowCol.containsKey(String.valueOf(numOfRows-1)+j))) {
- //System.out.println("Inside if");
+ 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();
- //System.out.println("My C name "+this.getName()+":"+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 (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;
+ || 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;
+ || 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);
- // System.out.println("C name "+this.getName()+" height "+height);
- // System.out.println("test C height "+this.getName()+" height "+height+" (numOfRows-1)*interEleH "+(numOfRows-1)*interEleH+
- // " interEleToContainerH "+interEleToContainerH/2);
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));
+ 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();
- //System.out.println("within container");
- p.x =j*interEleWd+xsum+this.getP().getX()+
- interEleToContainerWd;
+ 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();
+ 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();
+ 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));
+ } 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();
- // System.out.println("i "+i+"j "+j);
- // System.out.println("element "+e.getName());
- // System.out.println("Is this "+this.getP());
- 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();
+ 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;
}
}
@@ -292,55 +266,52 @@ public class Container {
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;
- //System.out.println("element name "+e.getName()+" j*interEleWd "+j*interEleWd
- // +" xsum " +xsum+"this.getP().getX() "+this.getP().getX()+" interEleToContainerWd " +interEleToContainerWd+" p.x "+p.x);
+ 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;
- }
+ 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;
+ || 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 {
- // System.out.println("element name "+e.getName()+" this.getP().getY() "+this.getP().getY()
- // +" ysum " +ysum+" i*interEleH "+i*interEleH+" interEleToContainerH " +interEleToContainerH);
if (e.getName().equals("")) {
- p.y = this.getP().getY()+ysum+i*interEleH+(interEleToContainerH);
- //System.out.println("test element name "+this.getName()+" Container height "+this.computeSize().getHeight()+" this.getP().getY() "+this.getP().getY()
- // +" ysum " +ysum+" i*interEleH "+i*interEleH+" interEleToContainerH-3 " +interEleToContainerH+" p.y "+p.y);
- }else
- p.y = this.getP().getY()+ysum+i*interEleH+interEleToContainerH;
- // System.out.println(e.getName()+"My contain this.getP().getY() "+this.getP().getY()
- // +"elements Y "+p.y);
+ 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);
- //System.out.println("my element name "+e.getName()+" e.getP().getX() "+e.getP().getX());
- //System.out.println();
- }
+ 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
index b4adaf95..2ef50419 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,32 +37,18 @@
*/
package org.onap.portalsdk.core.domain.support;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Domain {
- // Unique identifier of the domain
+ // Unique identifier of the domain
String id;
- // List<Container> cList;
-
- public String name;
- Size size;
+ String name;
+ Size size;
Position p;
-
- //Attribute1 at;
-
- public Position getP() {
- return p;
- }
-
- public void setP(Position p) {
- this.p = p;
- }
-
- //Horizontal space between a pair of containers
+ // Horizontal space between a pair of containers
double interContWd = 1.0;
- //Vertical space between a pair of containers
+ // Vertical space between a pair of containers
double interContH;
double domainToLayoutWd;
double domainToContH;
@@ -70,7 +56,15 @@ public class Domain {
int numOfRowsofContainer;
int numOfColsofContainer;
boolean indexChanged;
- Map<String,Container> containerRowCol;
+ 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;
@@ -82,26 +76,16 @@ public class Domain {
this.domainToContH = domainToContH;
this.numOfRowsofContainer = numOfRowsofContainer;
this.numOfColsofContainer = numOfColsofContainer;
- // at = new Attribute1();
}
-
-
-
-
- public double top;
-
- public double left;
-
- public double height;
-
- public double width;
-
- public List<Container> containerList;
-
- public double newXafterColl;
-
- public double YafterColl;
-
+
+ public Position getP() {
+ return p;
+ }
+
+ public void setP(Position p) {
+ this.p = p;
+ }
+
public void setNewXafterColl(double newXafterColl) {
this.newXafterColl = newXafterColl;
}
@@ -109,7 +93,7 @@ public class Domain {
public double getNewXafterColl() {
return newXafterColl;
}
-
+
public double getYafterColl() {
return YafterColl;
}
@@ -121,7 +105,7 @@ public class Domain {
public void setDomainToLayoutWd(double domainToLayoutWd) {
this.domainToLayoutWd = domainToLayoutWd;
}
-
+
public double getDomainToLayoutWd() {
return domainToLayoutWd;
}
@@ -166,38 +150,18 @@ public class Domain {
return name;
}
- public void setContainers(Map<String,Container> containerRowCol) {
+ public void setContainers(Map<String, Container> containerRowCol) {
this.containerRowCol = containerRowCol;
}
-
+
public Map<String, Container> getContainerRowCol() {
return containerRowCol;
}
-
- /* public Attribute1 getAt() {
- return at;
- }
-
- public void setAt(Attribute1 at) {
- this.at = at;
- }*/
-
public void setContainerList(List<Container> containerList) {
- // new ArrayList<Container>();
this.containerList = containerList;
}
-
-
-/* public boolean isCollapsed() {
- return collapsed;
- }
-
- public void setCollapsed(boolean collapsed) {
- this.collapsed = collapsed;
- }*/
-
public boolean isIndexChanged() {
return indexChanged;
}
@@ -206,72 +170,63 @@ public class Domain {
this.indexChanged = indexChanged;
}
- //Compute the size of any domain
+ // Compute the size of any domain
public Size computeSize() {
size = new Size();
size.setHeight(5);
- double width = 0;
+ 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++) {
- width+=containerRowCol.get(String.valueOf(i)+String.valueOf(j)).computeSize().getWidth();
- }
- break;
- }
-
+ 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;
+ }
+
}
- width+=(numOfColsofContainer-1)*interContWd;
- if (this.getName().equals("VNI"))
- size.setWidth(width-4);
+ myWidth += (numOfColsofContainer - 1) * interContWd;
+ if (this.getName().equals("VNI"))
+ size.setWidth(myWidth - 4);
else
- size.setWidth(width);
+ size.setWidth(myWidth);
return size;
}
public void computeConatinerPositions() {
-
+
double xsum = 0;
- double ysum = 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));
- // System.out.println("container "+c.toString());
- Position p = new Position();
- if (this.getName().equals("VNI")) {
- p.x = j*(interContWd-2)+xsum+domainToLayoutWd;
- } else
- p.x = j*interContWd+xsum+domainToLayoutWd;
- // this.computeSize();
- // p.x = j*interContWd+xsum+this.getP().getX();
- ysum = 0;
- for (int k=0; k<i; k++) {
- // System.out.println("i value "+i);
- if (containerRowCol.containsKey(String.valueOf(k)+ String.valueOf(j)))
- ysum+= containerRowCol.get(String.valueOf(k)+ String.valueOf(j)).computeSize().getHeight();
- // System.out.println("Container height "+containerRowCol.get(String.valueOf(k)+ String.valueOf(j)).getName()+
- // ":"+" "+containerRowCol.get(String.valueOf(k)+ String.valueOf(j)).computeSize().getHeight());
- else if (j>0 && containerRowCol.containsKey(String.valueOf(k)+ String.valueOf(j-1)) &&
- !containerRowCol.get(String.valueOf(i)+ String.valueOf(j)).getName().equals("AIC - Alpharetta")) {
- ysum+= containerRowCol.get(String.valueOf(k)+ String.valueOf(j-1)).computeSize().getHeight();
- }
+ 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();
+ if (this.getName().equals("VNI")) {
+ p.x = j * (interContWd - 2) + xsum + domainToLayoutWd;
+ } else
+ 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();
+
+ else if (j > 0 && containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j - 1))
+ && !containerRowCol.get(String.valueOf(i) + String.valueOf(j)).getName()
+ .equals("AIC - Alpharetta")) {
+ ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j - 1)).computeSize()
+ .getHeight();
}
- //System.out.println("C name "+c.getName()+" ysum "+ysum+" domainToLayoutH "+domainToLayoutH+" this.computeSize().getHeight() "+
- // this.computeSize().getHeight()+" domainToContH "+domainToContH+" interContH "+interContH);
- p.y = domainToLayoutH+ysum+this.computeSize().getHeight()+
- domainToContH+i*interContH;
-
- c.setP(p);
- xsum+= c.computeSize().getWidth();
-
- }
+ }
+ p.y = domainToLayoutH + ysum + this.computeSize().getHeight() + domainToContH + i * interContH;
+ c.setP(p);
+ xsum += c.computeSize().getWidth();
}
- xsum = 0;
-
+ }
+ 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
index 57718ed4..ba4a1f34 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -46,139 +46,150 @@ 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 {
- protected Long id;
- protected Date created;
- protected Date modified;
- protected Long createdId;
- protected Long modifiedId;
- protected Long rowNum;
-
- protected Serializable auditUserId;
-
- Set auditTrail = null;
-
- public DomainVo() {}
-
-
- 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;
- }
-
-
+ 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();
}
-
-
- 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) {
- e.printStackTrace();
- }
-
- return newVo;
- }
-
-
-
- public int compareTo(Object obj){
- Long c1 = getId();
- Long c2 = ((DomainVo)obj).getId();
-
- return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
- }
-
+
+ @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
index 85147e48..1bf6a150 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,32 +37,45 @@
*/
package org.onap.portalsdk.core.domain.support;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
public class Element {
-
- public String id;
- public String name;
-
- public double top;
-
- public double left;
-
- public double height;
-
- public String imgFileName;
-
- public String borderType;
-
- public String bgColor;
-
- public ElementDetails details;
-
- //public List<ElementDetails> details;
-
-
+
+ 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;
}
@@ -87,15 +100,10 @@ public class Element {
this.width = width;
}
-
- public double width;
-
-
public String getId() {
return id;
}
-
-
+
public String getName() {
return name;
}
@@ -103,10 +111,7 @@ public class Element {
public void setName(String name) {
this.name = name;
}
-
- Position p;
-
public Position getP() {
return p;
}
@@ -115,34 +120,6 @@ public class Element {
this.p = p;
}
-
-
- public Element(String id, String name, String imgPath, String bgColor, String logical_group, String display_longname,
- String description, String primary_function, String key_interfaces, String location, String vendor, String vendor_shortname) {
- this.id = id;
- this.name = name;
- this.imgFileName = imgPath;
- this.bgColor = bgColor;
-
-
- }
-
- 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 setBorderType(String borderType) {
this.borderType = borderType;
}
@@ -154,29 +131,23 @@ public class Element {
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);
- // size.setWidth(0.5*10.0);
- // size.setHeight(0.5*6.0);
+ 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
index 58c8d416..73ccd5d6 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -37,37 +37,23 @@
*/
package org.onap.portalsdk.core.domain.support;
-import java.util.HashMap;
-import java.util.Map;
-
public class ElementDetails {
- public String logical_group;
- public String display_longname;
- public String description;
- public String primary_function;
- public String network_function;
- public String key_interfaces;
- public String location;
- public String vendor;
- public String vendor_shortname;
- public String enclosingContainer;
+ 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 Map<String,String> details1;
+ 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) {
-// public ElementDetails(Map<String, String> details) {
-
- // this.details = new HashMap<String, String>();
- // this.details1 = details;
-// }
-
-
-
-
-
- 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;
@@ -80,10 +66,12 @@ public class ElementDetails {
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
index 08736f0d..3ee8f642 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -41,17 +41,14 @@ import org.onap.portalsdk.core.FusionObject;
public class FusionCommand implements FusionObject {
- private String task;
+ private String task;
- public FusionCommand() {
- }
+ public String getTask() {
+ return task;
+ }
- public String getTask() {
- return task;
- }
-
- public void setTask(String task) {
- this.task = 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
index 957bb9af..09c8372d 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -39,36 +39,43 @@ package org.onap.portalsdk.core.domain.support;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.TreeMap;
public class Layout {
- //width of the screen
-// double width;
- //height of the screen;
-// double height;
- // Total number of domains present on the screen and assume that
-
- public Map<String,Domain> domainRowCol;
-
- Map<String,Domain> originalDomainRowCol;
-
- //Horizontal space between a pair of domains
+
+ Map<String, Domain> domainRowCol;
+
+ Map<String, Domain> originalDomainRowCol;
+
+ // Horizontal space between a pair of domains
double interDomainWd;
- //Vertical space between a pair of domains
+ // Vertical space between a pair of domains
double interDomainH;
- //Computing the co-ordinates of any domain
+ // 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;
}
@@ -93,20 +100,6 @@ public class Layout {
this.numberofColsofDomains = numberofColsofDomains;
}
- 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<String, Domain>();
- this.originalDomainRowCol = new TreeMap<String,Domain>();
- //nline
- this.collapsedDomainsNewList = new ArrayList<Domain>();
- }
-
public Map<String, Domain> getDomainRowCol() {
return domainRowCol;
}
@@ -114,60 +107,54 @@ public class Layout {
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));
+ 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 = (j+1)* (interDomainWd+2.6) + xsum;
+ if (j == 0)
p.x = domainTolayout;
else
- // p.x = (j+1)* interDomainWd + xsum;
- p.x = j*interDomainWd + xsum + domainTolayout;
+ 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.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 = domainToLayoutH+ysum+this.computeSize().getHeight()+
- // domainToContH+i*interContH;
- p.y = (i+1)* interDomainH + ysum;
+ p.y = (i + 1) * interDomainH + ysum;
d.setP(p);
-
- }
+
+ }
}
xsum = 0;
}
}
public void computeDomainPositionsModified() {
- //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));
+ 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();
+ 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();
+ 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;
+ p.y = (i + 1) * interDomainH + ysum;
d.setP(p);
break;
}
@@ -175,118 +162,80 @@ public class Layout {
}
}
}
-
-
+
}
+
public Layout collapseDomainModified(String domainsToCollapse) {
-
- if(domainsToCollapse == null || domainsToCollapse.isEmpty())
- return null;
-
- Map<String,Domain> updatedRC = new HashMap<String, Domain>();
-
+
+ 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());
- // System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
}
-
- Map<String, Domain> updatedRCSorted = new TreeMap<String, Domain>(updatedRC);
-
- Map<String, Domain> collapsedDomainMap = getCollapsedDomains();
-
+
+ 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());
- // System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
}
}
-
-
- Map<String, Domain> updatedRCSortedTrunc = new TreeMap<String, Domain>();
-
- 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());
-
- }
- //Domain toRemove = 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());
- //System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
- }
-
- for (Map.Entry<String, Domain> rmv : updatedRCSorted.entrySet()) {
- if (Character.getNumericValue(rmv.getKey().toCharArray()[1]) <= colToDelete) {
- updatedRCSortedTrunc.remove(rmv.getKey());
+
+ 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> entry : updatedRCSortedTrunc.entrySet()) {
- System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }*/
-
- 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());
-
+ }
+
+ 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 : updatedRC.entrySet()) {
- System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }*/
-
+
double currDistFromLftM = 11.0;
- int orgColofCollapsedd = -1;
- int orgColofDisplayedd = -1;
- for (Map.Entry<String,Domain> cd : updatedRC.entrySet()) {
- /*for (Domain pl : collapsedDomainNewL) {
- for (Map.Entry<String, Domain> colCheck : originalDomainRowCol.entrySet()) {
- if (colCheck.getValue().getName().equals(pl.getName())) {
- orgColofCollapsedd = Character.getNumericValue(colCheck.getKey().toCharArray()[1]);
- break;
- }
- }
-
- for (Map.Entry<String, Domain> colCheckk : originalDomainRowCol.entrySet()) {
- if (colCheckk.getValue().getName().equals(cd.getValue().getName())) {
- orgColofDisplayedd = Character.getNumericValue(colCheckk.getKey().toCharArray()[1]);
- break;
- }
- }
-
- if (orgColofCollapsedd < orgColofDisplayedd) {
- currDistFromLftM+= 3;
- }
- }*/
+ for (Map.Entry<String, Domain> cd : updatedRC.entrySet()) {
Domain d = cd.getValue();
double accountPlus = accountForPlusSpaceBefore(d);
- // currDistFromLftM+= accountForPlusSpaceBefore(d);
- d.setDomainToLayoutWd(currDistFromLftM+accountPlus);
+ d.setDomainToLayoutWd(currDistFromLftM + accountPlus);
d.computeConatinerPositions();
for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) {
Container c = entry1.getValue();
@@ -296,420 +245,331 @@ public class Layout {
for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) {
Container inner = entryInner.getValue();
inner.computeElementPositions();
- }
+ }
}
}
- currDistFromLftM += d.computeSize().getWidth()+2;
-
+ currDistFromLftM += d.computeSize().getWidth() + 2;
}
-
-
-
-
- //nline
+
+ // nline
// Insert method invocation
updatePlusPosition(collapsedDomainNewL, updatedRC);
-
- //order changed
+
+ // 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<String, Domain>();
-
+
+ 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()) {
- updatedRC.put(copyEntry.getKey(), copyEntry.getValue());
- //System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
+ originalDomainRowCol.put(copyEntry.getKey(), copyEntry.getValue());
}
-
- Map<String, Domain> updatedRCSorted = new TreeMap<String, Domain>(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());
- // System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+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;
}
-
-
- Map<String, Domain> updatedRCSortedTrunc = new TreeMap<String, Domain>();
-
- 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());
-
- }
- //Domain toRemove = 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());
- //System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+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> entry : updatedRCSortedTrunc.entrySet()) {
- System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }*/
-
- 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();
- }
+ }
+
+ 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;
+ currDistFromLftM += d.computeSize().getWidth() + 1;
+ isDisplayed = true;
+ break;
}
}
-
- setCollapsedDomains(collapsedDomainMap);
- setCollapsedDomainsNewList(collapsedDomainNewL);
-
-
- computeDomainPositionsModified();
- return this;
-
+
+ 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<String, Domain>();
-
+
+ Map<String, Domain> updatedRC = new HashMap<>();
+
for (Map.Entry<String, Domain> copyEntry : domainRowCol.entrySet()) {
updatedRC.put(copyEntry.getKey(), copyEntry.getValue());
- //System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
}
-
- Map<String, Domain> updatedRCSorted = new TreeMap<String, Domain>(updatedRC);
-
- Map<String, Domain> collapsedDomainMap = getCollapsedDomains();
-
+
+ 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());
- // System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+copyEntry.getValue());
}
}
-
-
- // List<Domain> collapsedDomainsList = getCollapsedDomains();
-
- /* for (Map.Entry<String, Domain> entry : updatedRCSorted.entrySet()) {
- System.out.println("Sorted Key: "+entry.getKey());
- }*/
-
+
double prevDomXCordinate = 0.0;
- Map<String, Domain> updatedRCSortedTrunc = new TreeMap<String, Domain>();
- // for (String dToCollapse : domainsToCollapse) {
- 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());
- //Domain toRemove = entry.getValue();
- else
- collapsedDomainMap.put(entry.getKey(),entry.getValue());
- prevDomXCordinate = entry.getValue().getP().getX();
- entry.getValue().getP().setX(prevDomXCordinate-2);
- // toRemove.setCollapsed(true);
- setNumberofColsofDomains(getNumberofColsofDomains()-1);
- updatedRC.remove(entry.getKey());
- colToDelete = Character.getNumericValue(entry.getKey().toCharArray()[1]);
- // collapsedDomainList.put(entry.getKey(),entry.getValue());
- break;
- }
- }
-
- /* for (Map.Entry<String, Domain> entry : updatedRC.entrySet()) {
- System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }*/
-
- setCollapsedDomains(collapsedDomainMap);
-
- for (Map.Entry<String, Domain> copyEntry : updatedRCSorted.entrySet()) {
- updatedRCSortedTrunc.put(copyEntry.getKey(), copyEntry.getValue());
- //System.out.println("copyEntry.getKey() "+copyEntry.getKey()+ " copyEntry.getValue() "+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());
+ 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;
}
-
- 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> entry : updatedRCSortedTrunc.entrySet()) {
- System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }*/
-
- for (Map.Entry<String, Domain> updateOthers : updatedRCSortedTrunc.entrySet()) {
- // if (!updateOthers.getValue().getName().equals(dToCollapse)) {
- // if ((int)updateOthers.getKey().toCharArray()[1] > colToDelete) {
- char update[] = updateOthers.getKey().toCharArray();
- int charToupdate = Character.getNumericValue(update[1]);
- --charToupdate;
- String resultRowCol = String.valueOf(update[0])+String.valueOf(charToupdate);
- // update[1] = (char)charToupdate;
- // updatedRC.put(String.valueOf(update), updateOthers.getValue());
- updateOthers.getValue().setIndexChanged(true);
- updatedRC.put(resultRowCol, updateOthers.getValue());
- updatedRC.remove(updateOthers.getKey());
- // }
- // }
+ }
+
+ 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 (d.getName().equals("Datacenter with AIC") || d.getName().equals("VNI")) {
- // d.setDomainToLayoutWd(d.getDomainToLayoutWd()-33);
- 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);
- //System.out.println("Inside RAN EPC");
- }
- 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")) {
- //System.out.println("Inside test");
- 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")) {
- //System.out.println("Inside test");
- if (d.getName().equals("VNI"))
- d.setDomainToLayoutWd(prevDomXCordinate+10);
- else
- d.setDomainToLayoutWd(prevDomXCordinate);
-
- }
-
-
-
- else {
+ if (collapsedDomains.size() == 2 && collapsedDomains.containsKey("00") && collapsedDomains.containsKey("01")
+ && domainsToCollapse.equals("RAN")) {
+ if (d.getName().equals("USP"))
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();
- }
+ 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();
}
}
- // }
- // System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }
- // setNumberofColsofDomains(getNumberofColsofDomains()-1);
+ }
+ }
computeDomainPositions();
return this;
- /* CoordinateMain cm = new CoordinateMain();
- try {
- cm.convertToYAML(this);
- } catch (Exception e) {
-
- }*/
-
- }
-
+
+ }
+
public Layout uncollapseDomainModified(String domainToUnCollapse) {
- Map<String, Domain> currentDomainsSorted = new TreeMap<String,Domain>(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<Domain>();
-
- 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);
-
- //for (Map.Entry<String, Domain> e : originalDomainRowCol.entrySet())
- // System.out.println("Original key value"+e.getKey()+":"+e.getValue().getName());
-
- 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;
- }
- }
+ 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);
+ 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;
- // lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]);
- break;
- }
- }
+ 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 (Map.Entry<String, Domain> e : updateDomains.entrySet())
- // System.out.println("me Updatedomains key value"+e.getKey()+":"+e.getValue().getName());
-
- // for (int i = 1; i < domainstoUpd.size(); i++) {
- for (int i = 0; i < domainstoUpd.size(); i++) {
+ }
+
+ 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()+domainstoUpd.get(i-1).computeSize().getWidth()+5;
- newX = domainstoUpd.get(i+1).getP().getX();
- //d.setDomainToLayoutWd(domainstoUpd.get(i+1).getP().getX());
+ if (i + 1 < domainstoUpd.size())
+ newX = domainstoUpd.get(i + 1).getP().getX();
else
- newX = domainstoUpd.get(i).getP().getX()+32;
- // d.setDomainToLayoutWd(domainstoUpd.get(i).getP().getX()+38);
- /* if (i > 0) {
- if (d.getWidth() < domainstoUpd.get(i-1).getWidth())
- newX+= domainstoUpd.get(i-1).getWidth() - d.getWidth();
- else if (d.getWidth() > domainstoUpd.get(i-1).getWidth())
- newX-= d.getWidth() - domainstoUpd.get(i-1).getWidth() ;
- } else {
- if (d.getWidth() < domainInserted.getWidth())
- newX+= domainInserted.getWidth() - d.getWidth();
- else if (d.getWidth() > domainInserted.getWidth())
- newX-= d.getWidth() - domainInserted.getWidth() ;
- }*/
+ newX = domainstoUpd.get(i).getP().getX() + 32;
+
if (d.getName().equals("Datacenter with AIC"))
- newX+= 2;
+ newX += 2;
d.setDomainToLayoutWd(newX);
- /* if (i == 0)
- d.setDomainToLayoutWd(domainInserted.getP().getX()+domainInserted.getWidth());
- else
- d.setDomainToLayoutWd(domainstoUpd.get(i-1).getP().getX()+domainstoUpd.get(i-1).getWidth());*/
+
d.computeConatinerPositions();
for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) {
Container c = entry1.getValue();
@@ -719,108 +579,62 @@ public class Layout {
for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) {
Container inner = entryInner.getValue();
inner.computeElementPositions();
- }
+ }
}
}
- // }
- // System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }
-
- computeDomainPositions();
- return this;
-
+
+ }
+
+ computeDomainPositions();
+ return this;
+
}
-
-
-
+
public Layout uncollapseDomain(String domainToCollapse) {
- Map<String, Domain> currentDomainsSorted = new TreeMap<String,Domain>(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<Domain>();
- /* for (Map.Entry<String, Domain> entry : collapsedDomainListSorted.entrySet()) {
- if (entry.getValue().getName().equals("domainToCollapse")) {
- if (currentDomainsSorted != null) {
- if (!currentDomainsSorted.containsKey(entry.getKey())) {
- updateDomains.put(entry.getKey(), entry.getValue());
- collapsedDomainList.remove(entry.getKey());
- break;
- } else {
- 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(curr.getKey()+1,curr.getValue());
-
- }
- }
- updateDomains.put(entry.getKey(), entry.getValue());
- }
- }
-
-
- }
- }*/
-
- Domain domainInserted = null;
- for (Map.Entry<String, Domain> entry : collapsedDomainListSorted.entrySet()) {
- if (entry.getValue().getName().equals(domainToCollapse)) {
- 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 (Map.Entry<String, Domain> e : updateDomains.entrySet())
- // System.out.println("Updatedomains key value"+e.getKey()+":"+e.getValue().getName());
-
-
- for (int i = 0; i < domainstoUpd.size(); i++) {
+ 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());
+ 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(domainstoUpd.get(i).getP().getX()+38);
- /* if (i > 0) {
- if (d.getWidth() < domainstoUpd.get(i-1).getWidth())
- newX+= domainstoUpd.get(i-1).getWidth() - d.getWidth();
- else if (d.getWidth() > domainstoUpd.get(i-1).getWidth())
- newX-= d.getWidth() - domainstoUpd.get(i-1).getWidth() ;
- } else {
- if (d.getWidth() < domainInserted.getWidth())
- newX+= domainInserted.getWidth() - d.getWidth();
- else if (d.getWidth() > domainInserted.getWidth())
- newX-= d.getWidth() - domainInserted.getWidth() ;
- }*/
+ newX = domainstoUpd.get(i).getP().getX() + 38;
+
if (d.getName().equals("Datacenter with AIC"))
- newX+= 5;
+ newX += 5;
d.setDomainToLayoutWd(newX);
- /* if (i == 0)
- d.setDomainToLayoutWd(domainInserted.getP().getX()+domainInserted.getWidth());
- else
- d.setDomainToLayoutWd(domainstoUpd.get(i-1).getP().getX()+domainstoUpd.get(i-1).getWidth());*/
+
d.computeConatinerPositions();
for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) {
Container c = entry1.getValue();
@@ -830,102 +644,88 @@ public class Layout {
for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) {
Container inner = entryInner.getValue();
inner.computeElementPositions();
- }
+ }
}
}
- // }
- // System.out.println("Sorted key: "+entry.getKey()+" Sorted value: "+entry.getValue().getName());
- }
-
- computeDomainPositions();
- return this;
+ }
+
+ 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();
- Map<String, Domain> collapsedDomainListSorted = new TreeMap<String, Domain>(collapsedDomainList);
-
- List<Domain> domainstoUpd = new ArrayList<Domain>();
-
- //nline
- List<Domain> collapsedDomainNewLL = getCollapsedDomainsNewList();
-
- int colToUnCollapse = 99;
-
- Domain domainToInsert = null;
-
- //nline
- // if (collapsedDomains.size() == 0) {
- if (collapsedDomainNewLL.size() == 0) {
- 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);
-
- // for (Map.Entry<String, Domain> e : originalDomainRowCol.entrySet())
- // System.out.println("Original key value"+e.getKey()+":"+e.getValue().getName());
-
- 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;
- }
- }
+ 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);
+ 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;
- // lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]);
- break;
- }
- }
+ if (currDomainsEnt.getValue().getName().equals(entry.getValue().getName())) {
+ updateDomains.put(newKey, currDomainsEnt.getValue());
+ domainstoUpd.add(currDomainsEnt.getValue());
+ ++lastKeyCol;
+ break;
+ }
+ }
}
-
+
}
- }
-
- setNumberofColsofDomains(getNumberofColsofDomains()+1);
+ }
+
+ setNumberofColsofDomains(getNumberofColsofDomains() + 1);
setDomainRowCol(updateDomains);
-
- //for (Map.Entry<String, Domain> e : updateDomains.entrySet())
- // System.out.println("me Updatedomains key value"+e.getKey()+":"+e.getValue().getName());
-
-
-
+
double currDistFromLftMargin = 11.0;
- for (Map.Entry<String,Domain> cd : updateDomains.entrySet()) {
+ for (Map.Entry<String, Domain> cd : updateDomains.entrySet()) {
Domain d = cd.getValue();
double accountPlus = accountForPlusSpaceBefore(d);
- d.setDomainToLayoutWd(currDistFromLftMargin+accountPlus);
+ d.setDomainToLayoutWd(currDistFromLftMargin + accountPlus);
d.computeConatinerPositions();
for (Map.Entry<String, Container> entry1 : d.getContainerRowCol().entrySet()) {
Container c = entry1.getValue();
@@ -935,119 +735,105 @@ public class Layout {
for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) {
Container inner = entryInner.getValue();
inner.computeElementPositions();
- }
+ }
}
}
- currDistFromLftMargin += d.computeSize().getWidth()+2;
-
+ currDistFromLftMargin += d.computeSize().getWidth() + 2;
+
}
-
- //nline
+
+ // nline
updatePlusPosition(collapsedDomainNewLL, updateDomains);
-
- //order changed
+
+ // order changed
setCollapsedDomains(collapsedDomainList);
-
- //nline
+
+ // 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();
- Map<String, Domain> collapsedDomainListSorted = new TreeMap<String, Domain>(collapsedDomainList);
-
- List<Domain> domainstoUpd = new ArrayList<Domain>();
-
- //nline
- List<Domain> collapsedDomainNewLL = getCollapsedDomainsNewList();
-
- int colToUnCollapse = 99;
-
- Domain domainToInsert = null;
-
- //nline
- // if (collapsedDomains.size() == 0) {
- if (collapsedDomainNewLL.size() == 0) {
- 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);
-
- //for (Map.Entry<String, Domain> e : originalDomainRowCol.entrySet())
- // System.out.println("Original key value"+e.getKey()+":"+e.getValue().getName());
-
- 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;
- }
- }
+
+ 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);
+ 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;
- // lastKeyCol = Character.getNumericValue(currDomainsEntry.getKey().toCharArray()[1]);
- break;
- }
- }
+ if (currDomainsEnt.getValue().getName().equals(entry.getValue().getName())) {
+ updateDomains.put(newKey, currDomainsEnt.getValue());
+ domainstoUpd.add(currDomainsEnt.getValue());
+ ++lastKeyCol;
+ break;
+ }
+ }
}
-
+
}
- }
-
- setNumberofColsofDomains(getNumberofColsofDomains()+1);
+ }
+
+ setNumberofColsofDomains(getNumberofColsofDomains() + 1);
setDomainRowCol(updateDomains);
-
- //for (Map.Entry<String, Domain> e : updateDomains.entrySet())
- // System.out.println("me Updatedomains key value"+e.getKey()+":"+e.getValue().getName());
-
-
-
-
+
double currDistFromLftM = 11.0;
-
+
boolean isDisplayed;
- for (Map.Entry<String,Domain> orgEntry : originalDomainRowCol.entrySet()) {
+ for (Map.Entry<String, Domain> orgEntry : originalDomainRowCol.entrySet()) {
isDisplayed = false;
- for (Map.Entry<String,Domain> cd : updateDomains.entrySet()) {
+ for (Map.Entry<String, Domain> cd : updateDomains.entrySet()) {
if (cd.getValue().getName().equals(orgEntry.getValue().getName())) {
Domain d = cd.getValue();
d.setDomainToLayoutWd(currDistFromLftM);
@@ -1060,168 +846,112 @@ public class Layout {
for (Map.Entry<String, Container> entryInner : c.getContainerRowCol().entrySet()) {
Container inner = entryInner.getValue();
inner.computeElementPositions();
- }
+ }
}
}
- currDistFromLftM += d.computeSize().getWidth()+1;
+ currDistFromLftM += d.computeSize().getWidth() + 1;
isDisplayed = true;
break;
}
}
-
+
if (!isDisplayed) {
- Domain myCollapsed = orgEntry.getValue();
+ Domain myCollapsed = orgEntry.getValue();
myCollapsed.setNewXafterColl(currDistFromLftM);
currDistFromLftM += 4;
}
}
-
- // plus.setNewXafterColl(distOfCollFrmLft+1.5);
-
- //order changed
+
+ // order changed
setCollapsedDomains(collapsedDomainList);
-
- //nline
+
+ // nline
setCollapsedDomainsNewList(collapsedDomainNewLL);
-
-
+
computeDomainPositionsModified();
return this;
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ }
+
private void updatePlusPosition(List<Domain> collapsedDNewL, Map<String, Domain> displayedDomainMap) {
- List<Domain> copyCollapseList = new ArrayList<Domain>();
-
+ List<Domain> copyCollapseList = new ArrayList<>();
+
for (Domain copyCollapse : collapsedDNewL) {
copyCollapseList.add(copyCollapse);
}
-
- //double distOfCollFrmLft = 0.0;
+
int orgColofCollapsed = -1;
int orgColofDisplayed = -1;
int orgColofDisplayedOtherPlus = -1;
- int orgColofInterDomainPlus = -1;
- List<Domain> dsplyList = new ArrayList<Domain>();
-
+
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;
+ 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;
+ break;
}
}
if (orgColofDisplayed < orgColofCollapsed) {
- distOfCollFrmLft+= displayedEntry.getValue().computeSize().getWidth();
-
-
- /* if (dsplyList.size() > 0) {
- Domain lastAdded = dsplyList.get(dsplyList.size()-1);
- int orgColofLastAdded = -1;
- for (Map.Entry<String, Domain> colCh : originalDomainRowCol.entrySet()) {
- if (colCh.getValue().getName().equals(lastAdded.getName())) {
- orgColofLastAdded = Character.getNumericValue(colCh.getKey().toCharArray()[1]);
- break;
- }
- }
- if (Math.abs(orgColofDisplayed - orgColofLastAdded) == 1) {
- boolean adjDomainsWithPlus = false;
- for (Domain colp : copyCollapseList) {
- if (!colp.getName().equals(plus.getName())) {
- for (Map.Entry<String, Domain> colCk2 : originalDomainRowCol.entrySet()) {
- if (colCk2.getValue().getName().equals(colp.getName())) {
- orgColofInterDomainPlus = Character.getNumericValue(colCk2.getKey().toCharArray()[1]);
- break;
- }
- }
- if (orgColofInterDomainPlus > orgColofLastAdded && orgColofInterDomainPlus < orgColofDisplayed) {
- adjDomainsWithPlus = true;
- break;
- }
- }
- }
- if (!adjDomainsWithPlus)
- distOfCollFrmLft+=interDomainWd;
- }
- }
- dsplyList.add(displayedEntry.getValue()); */
-
-
-
+ 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;
+ break;
}
}
if (orgColofDisplayedOtherPlus < orgColofCollapsed) {
- distOfCollFrmLft+=3.0;
+ distOfCollFrmLft += 3.0;
}
}
}
-
- plus.setNewXafterColl(distOfCollFrmLft+1.5);
-
-
+
+ plus.setNewXafterColl(distOfCollFrmLft + 1.5);
+
}
}
-
private double accountForPlusSpaceBefore(Domain d) {
-
+
int orgColofCollapsed = 0;
- int orgColofDisplayed = 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;
+ break;
}
}
-
- for (Domain collapsed : getCollapsedDomainsNewList()) {
+
+ 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;
+ break;
}
}
-
+
if (orgColofCollapsed < orgColofDisplayed) {
- distFromLftM+= 2;
+ 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
index cc05ea3f..eef7c27a 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -39,74 +39,67 @@ 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() {
- }
-
- public NameValueId(String value, String label) {
- setVal(value);
- setLab(label);
- }
-
-
- public String getLab() {
- return lab;
- }
-
-
- public String getVal() {
- return val;
- }
+ private String lab;
+ private String val;
+ public NameValueId() {
+ // No-arg constructor
+ }
- public void setLab(String label) {
- this.lab = label;
- }
+ public NameValueId(String value, String label) {
+ setVal(value);
+ setLab(label);
+ }
+ public String getLab() {
+ return lab;
+ }
- public void setVal(String value) {
- this.val = value;
- }
+ public String getVal() {
+ return val;
+ }
+ public void setLab(String label) {
+ this.lab = label;
+ }
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
+ public void setVal(String value) {
+ this.val = value;
+ }
- if (o == null) {
- return false;
- }
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
- if (!(o instanceof NameValueId)) {
- return false;
- }
+ if (o == null) {
+ return false;
+ }
- final NameValueId nameValueId = (NameValueId)o;
+ if (!(o instanceof NameValueId)) {
+ return false;
+ }
- if (!getVal().equals(nameValueId.getVal())) {
- return false;
- }
+ final NameValueId nameValueId = (NameValueId) o;
- if (!getLab().equals(nameValueId.getLab())) {
- return false;
- }
+ if (!getVal().equals(nameValueId.getVal())) {
+ return false;
+ }
- return true;
- }
+ if (!getLab().equals(nameValueId.getLab())) {
+ return false;
+ }
+ return true;
+ }
- public int hashCode() {
- return getVal().hashCode();
- }
+ @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
index 29771e97..e0946d0b 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -40,19 +40,21 @@ 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
index bbaaeac3..6fcd178e 100644
--- 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
@@ -6,7 +6,7 @@
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -40,19 +40,21 @@ 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;
}
-
-
+
}