@Override public String serializeToString() { StringBuilder str = new StringBuilder(); return str.append(this.getClass().getSimpleName()).append(":[").append( "id=<").append(getId()).append(">").append( ", login=<").append(getLogin() == null ? "\\0" : BeansUtils.createEscaping(getLogin())).append(">").append( ", source=<").append(extSource == null ? "\\0" : getExtSource().serializeToString()).append(">").append( ", userId=<").append(getUserId()).append(">").append( ", loa=<").append(getLoa()).append(">").append( ']').toString(); }
@Override public int compareTo(PerunBean perunBean) { if(perunBean == null) throw new NullPointerException("PerunBean to compare with is null."); if(perunBean instanceof UserExtSource) { UserExtSource userExtSource = (UserExtSource) perunBean; int compare; //Compare on extSource if (this.getExtSource() == null && userExtSource.getExtSource() != null) compare = -1; else if (userExtSource.getExtSource() == null && this.getExtSource() != null) compare = 1; else if (this.getExtSource() == null && userExtSource.getExtSource() == null) compare = 0; else compare = this.getExtSource().compareTo(userExtSource.getExtSource()); if(compare != 0) return compare; //Compare on login if (this.getLogin()== null && userExtSource.getLogin() != null) compare = -1; else if (userExtSource.getLogin() == null && this.getLogin() != null) compare = 1; else if (this.getLogin()== null && userExtSource.getLogin() == null) compare = 0; else compare = this.getLogin().compareToIgnoreCase(userExtSource.getLogin()); if(compare != 0) return compare; //Compare to id if not return (this.getId() - perunBean.getId()); } else { return (this.getId() - perunBean.getId()); } } }
String type = ues.getLogin().split("@")[1].split("\\.")[0]; ues.getExtSource().setName("https://extidp.cesnet.cz/idp/shibboleth&authnContextClassRef=urn:cesnet:extidp:authn:"+type);
if(type.equals(ExtSourcesManager.EXTSOURCE_IDP)) { String extLogin; extLogin = ues.getLogin(); if(extLogin == null) extLogin = ""; writer.write("eduPersonPrincipalNames: " + extLogin + '\n');
String extLogin; if(this.userExtSource.getExtSource().getType().equals(ExtSourcesManager.EXTSOURCE_IDP)) { extLogin = this.userExtSource.getLogin(); if(extLogin == null) extLogin = ""; updateUserAttribute(ldapAttrEduPersonPrincipalNames, extLogin, LdapOperation.ADD_ATTRIBUTE, user); String extLogin; if(this.userExtSource.getExtSource().getType().equals(ExtSourcesManager.EXTSOURCE_IDP)) { extLogin = this.userExtSource.getLogin(); if(extLogin == null) extLogin = ""; updateUserAttribute(ldapAttrEduPersonPrincipalNames, extLogin, LdapOperation.REMOVE_ATTRIBUTE, this.user);
" and a.created_by=? and a.extsourcename=? and a.extsourcetype=?", APP_MAPPER, vo.getId(), AppState.VERIFIED.toString(), ue.getLogin(), ue.getExtSource().getName(), ue.getExtSource().getType());