@Override public String toString() { if (this.getUser() != null) { return this.getUser().getFullname() + " (" + this.getUser().getEmail() + ")"; } if (this.getAddress() != null) { return this.getAddress().getFullName() + " (" + this.getAddress().getEmail() + ")"; } if (this.getUrl() != null) { return this.getUrl(); } return super.toString(); }
break; if ((attendee.getUser() != null && Stream.of(splitTerm) .allMatch(streamTerm -> attendee.getUser().getFullname().toLowerCase().contains(streamTerm))) || (attendee.getAddress() != null && Stream.of(splitTerm) .allMatch(streamTerm -> attendee.getAddress().getFullName().toLowerCase().contains(streamTerm)))
@Override public String getDisplayValue(final TeamEventAttendeeDO choice) { String name = ""; if (choice.getAddress() != null) { if (choice.getUser() != null) { name = "[" + I18nHelper.getLocalizedMessage("user") + "] " + choice.getUser().getFullname(); } else { name = "[" + I18nHelper.getLocalizedMessage("address.addressText") + "] " + choice.getAddress().getFullName(); } } else if (choice.getUser() != null) { name = "[" + I18nHelper.getLocalizedMessage("user") + "] " + choice.getUser().getFullname(); } String mail = choice.getEMailAddress() != null ? choice.getEMailAddress() : choice.getUrl(); if (mail == null) { mail = ""; } String status = choice.getStatus() != null ? " [" + choice.getStatus().getI18nValue() + "]" : ""; return name + " (" + mail + ")" + status; }
final TimeZone timezone; if (attendee.getUser() != null) { locale = attendee.getUser().getLocale() != null ? attendee.getUser().getLocale() : ThreadLocalUserContext.getLocale(null); timezone = attendee.getUser().getTimeZoneObject(); } else { locale = sender.getLocale() != null ? sender.getLocale() : ThreadLocalUserContext.getLocale(null);
@Override public void validate(IValidatable<Collection<TeamEventAttendeeDO>> validatable) { Collection<TeamEventAttendeeDO> attendeeList = validatable.getValue(); for (TeamEventAttendeeDO attendee : attendeeList) { if (attendee.getUser() == null && attendee.getAddress() == null && attendee.getUrl() != null) { EmailValidator validator = EmailValidator.getInstance(); boolean isValid = validator.isValid(attendee.getUrl()); if (isValid == false) { error(validatable, I18nHelper.getLocalizedMessage("plugins.teamcal.attendee.email.invalid")); } } } }
attendee.setNumber(attendeeOld.getNumber()); attendee.setAddress(attendeeOld.getAddress()); attendee.setUser(attendeeOld.getUser());
cloneAttendee.setStatus(attendee.getStatus()); cloneAttendee.setUrl(attendee.getUrl()); cloneAttendee.setUser(attendee.getUser()); clone.addAttendee(cloneAttendee);
/** * @see java.lang.Object#clone() */ @Override public TeamEventAttendeeDO clone() { TeamEventAttendeeDO cloneAttendee = new TeamEventAttendeeDO(); cloneAttendee.setAddress(this.getAddress()); cloneAttendee.setComment(this.getComment()); cloneAttendee.setCommentOfAttendee(this.getCommentOfAttendee()); cloneAttendee.setLoginToken(this.getLoginToken()); cloneAttendee.setNumber(this.getNumber()); cloneAttendee.setStatus(this.getStatus()); cloneAttendee.setUrl(this.getUrl()); cloneAttendee.setUser(this.getUser()); cloneAttendee.setCommonName(this.getCommonName()); cloneAttendee.setCuType(this.getCuType()); cloneAttendee.setRsvp(this.getRsvp()); cloneAttendee.setAdditionalParams(this.getAdditionalParams()); cloneAttendee.setRole(this.getRole()); return cloneAttendee; } }