X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fdomain%2FEPUser.java;h=a3c9c4819640cf53b8de23db151c8f0594093fef;hb=3f56b9fdb4d2ec891344d6c9048363e1cac587d2;hp=e7435203e91a9de9495d7daec24aaf7f5cafadf7;hpb=21a8761f684745bb300e075c7e98ad897ace9eed;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUser.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUser.java index e7435203..a3c9c481 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUser.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUser.java @@ -33,7 +33,7 @@ * * ============LICENSE_END============================================ * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * */ package org.onap.portalapp.portal.domain; @@ -42,6 +42,8 @@ import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; +import javax.validation.Valid; +import org.hibernate.validator.constraints.SafeHtml; import org.onap.portalapp.portal.utils.PortalConstants; import org.onap.portalsdk.core.domain.User; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @@ -52,44 +54,78 @@ public class EPUser extends User { private Long orgId; private Long managerId; + @SafeHtml private String firstName; + @SafeHtml private String middleInitial; + @SafeHtml private String lastName; + @SafeHtml private String phone; + @SafeHtml private String fax; + @SafeHtml private String cellular; + @SafeHtml private String email; private Long addressId; + @SafeHtml private String alertMethodCd; + @SafeHtml private String hrid; + @SafeHtml private String orgUserId; + @SafeHtml private String orgCode; + @SafeHtml private String address1; + @SafeHtml private String address2; + @SafeHtml private String city; + @SafeHtml private String state; + @SafeHtml private String zipCode; + @SafeHtml private String country; + @SafeHtml private String orgManagerUserId; + @SafeHtml private String locationClli; + @SafeHtml private String businessCountryCode; + @SafeHtml private String businessCountryName; + @SafeHtml private String businessUnit; + @SafeHtml private String businessUnitName; + @SafeHtml private String department; + @SafeHtml private String departmentName; + @SafeHtml private String companyCode; + @SafeHtml private String company; + @SafeHtml private String zipCodeSuffix; + @SafeHtml private String jobTitle; + @SafeHtml private String commandChain; + @SafeHtml private String siloStatus; + @SafeHtml private String costCenter; + @SafeHtml private String financialLocCode; - + @SafeHtml private String loginId; + @SafeHtml private String loginPwd; private Date lastLoginDate; private boolean active; @@ -97,15 +133,19 @@ public class EPUser extends User { private Long selectedProfileId; private Long timeZoneId; private boolean online; + @SafeHtml private String chatId; - + private boolean systemUser; + private Integer languageId; private static final long serialVersionUID = 1L; + private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUser.class); private static final String ECOMP_PORTAL_NAME = "ECOMP"; private boolean isGuest = false; - + @Valid private SortedSet userApps = new TreeSet(); + @Valid private SortedSet pseudoRoles = new TreeSet(); public EPUser() {} @@ -491,8 +531,16 @@ public class EPUser extends User { public void setChatId(String chatId) { this.chatId = chatId; } - + + public Integer getLanguageId() { + return languageId; + } + + public void setLanguageId(Integer languageId) { + this.languageId = languageId; + } + public void setPseudoEPRoles(SortedSet pseudoRoles) { this.pseudoRoles = pseudoRoles; } @@ -538,9 +586,10 @@ public class EPUser extends User { SortedSet roles = new TreeSet(); SortedSet userAppRoles = getEPUserApps(); - logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - userApps = ", userAppRoles.size()); + logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - userApps = {} ", userAppRoles.size()); Iterator userAppRolesIterator = userAppRoles.iterator(); + EPUserApp userAppRole = null; // getting default app while (userAppRolesIterator.hasNext()) { @@ -561,14 +610,14 @@ public class EPUser extends User { } } } - logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - roles = ", roles.size()); + logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - roles = {}" , roles.size()); return roles; } /** - * Attention! Not for use in ECOMP + * Attention! Not for use in ONAP */ public SortedSet getAppRoles(EPApp app) { SortedSet roles = new TreeSet(); @@ -589,7 +638,7 @@ public class EPUser extends User { /** - * Attention! Not for use in ECOMP + * Attention! Not for use in ONAP */ public SortedSet getEPRoles() { EPApp app = new EPApp(); @@ -599,7 +648,7 @@ public class EPUser extends User { } /** - * Attention! Not for use in ECOMP + * Attention! Not for use in ONAP */ public void setEPRoles(SortedSet roles) { EPApp app = new EPApp(); @@ -609,7 +658,7 @@ public class EPUser extends User { } /** - * Attention! Not for use in ECOMP + * Attention! Not for use in ONAP */ public void removeEPRole(Long roleId) { SortedSet apps = getEPUserApps(); @@ -624,7 +673,7 @@ public class EPUser extends User { } /** - * Attention! Not for use in ECOMP + * Attention! Not for use in ONAP */ public void addEPRole(EPRole role) { if (role != null) { @@ -644,6 +693,14 @@ public class EPUser extends User { public void setGuest(boolean isGuest) { this.isGuest = isGuest; } + + public boolean isSystemUser() { + return systemUser; + } + + public void setSystemUser(boolean systemUser) { + this.systemUser = systemUser; + } @Override public String toString() {