Package org.fenixedu.academic.domain.contacts

Examples of org.fenixedu.academic.domain.contacts.EmailAddress


        if (validateAddress) {
            physicalAddress.setValid();
        }
        Phone.createPhone(this, personBean.getPhone(), PartyContactType.PERSONAL, true);
        MobilePhone.createMobilePhone(this, personBean.getMobile(), PartyContactType.PERSONAL, true);
        final EmailAddress emailAddress =
                EmailAddress.createEmailAddress(this, personBean.getEmail(), PartyContactType.PERSONAL, true);
        if (validateEmail) {
            emailAddress.setValid();
        }
        WebAddress.createWebAddress(this, personBean.getWebAddress(), PartyContactType.PERSONAL, true);
    }
View Full Code Here


        }
        return people;
    }

    public static Person readPersonByEmailAddress(final String email) {
        final EmailAddress emailAddress = EmailAddress.find(email);
        return emailAddress != null && emailAddress.getParty().isPerson() ? (Person) emailAddress.getParty() : null;
    }
View Full Code Here

    }

    public boolean hasEmailAddress(final String email) {
        for (final PartyContact partyContact : getPartyContactsSet()) {
            if (partyContact.isEmailAddress()) {
                final EmailAddress emailAddress = (EmailAddress) partyContact;
                if (emailAddress.hasValue(email)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

    public EmailAddress getEmailAddressForSendingEmails() {
        final Boolean disableSendEmails = getDisableSendEmails();
        if (disableSendEmails != null && disableSendEmails.booleanValue()) {
            return null;
        }
        final EmailAddress defaultEmailAddress = getDefaultEmailAddress();
        if (defaultEmailAddress != null) {
            return defaultEmailAddress;
        }
        final EmailAddress institutionalEmailAddress = getInstitutionalEmailAddress();
        if (institutionalEmailAddress != null) {
            return institutionalEmailAddress;
        }
        for (final PartyContact partyContact : getPartyContactsSet()) {
            if (partyContact.isEmailAddress() && partyContact.isActiveAndValid() && partyContact.isValid()) {
                final EmailAddress otherEmailAddress = (EmailAddress) partyContact;
                return otherEmailAddress;
            }
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    public String getEmailForSendingEmails() {
        final EmailAddress emailAddress = getEmailAddressForSendingEmails();
        return emailAddress == null ? null : emailAddress.getValue();
    }
View Full Code Here

        }
        return null;
    }

    public EmailAddress getDefaultEmailAddress() {
        EmailAddress defaultEmailAddress = getPerson().getDefaultEmailAddress();
        if (defaultEmailAddress != null) {
            return defaultEmailAddress;
        }
        final List<EmailAddress> pendingEmailAddresses = getPerson().getPendingEmailAddresses();
        for (EmailAddress emailAddress : pendingEmailAddresses) {
View Full Code Here

    }

    public EmailAddress getUpdatableMobilePhone() {
        List<? extends PartyContact> partyContacts = getStudent().getPerson().getPartyContacts(EmailAddress.class);
        for (int i = 0; i < partyContacts.size(); i++) {
            EmailAddress email = (EmailAddress) partyContacts.get(i);
            if (!email.isDefault()) {
                return email;
            }
        }

        return null;
View Full Code Here

        if (contact instanceof Phone) {
            span.addChild(new HtmlText(((Phone) contact).getNumber()));
        } else if (contact instanceof MobilePhone) {
            span.addChild(new HtmlText(((MobilePhone) contact).getNumber()));
        } else if (contact instanceof EmailAddress) {
            EmailAddress email = (EmailAddress) contact;
            if (isPublicSpace()) {
                HtmlImage img = new HtmlImage();
                img.setSource(RenderUtils.getContextRelativePath("") + "/publico/viewHomepage.do?method=emailPng&amp;email="
                        + email.getExternalId());
                span.addChild(img);
            } else {
                HtmlLink link = new HtmlLink();
                link.setModuleRelative(false);
                link.setContextRelative(false);
                link.setUrl("mailto:" + email.getValue());
                link.setBody(new HtmlText(email.getValue()));
                span.addChild(link);
            }
        } else if (contact instanceof WebAddress) {
            HtmlLink link = new HtmlLink();
            link.setModuleRelative(false);
View Full Code Here

        final WebAddress defaultWebAddress = person.getDefaultWebAddress();

        setWebAddress(getContactValue(defaultWebAddress, checkIfPublic));

        final EmailAddress defaultEmailAddress = person.getDefaultEmailAddress();

        setEmail(getContactValue(defaultEmailAddress, checkIfPublic));

        fillPersonalAndWorkContacts(person.getWebAddresses(), getPersonalWebAdresses(), getWorkWebAdresses(), checkIfPublic);
        fillPersonalAndWorkContacts(person.getEmailAddresses(), getPersonalEmails(), getWorkEmails(), checkIfPublic);
View Full Code Here

    public static void run(final AlumniPasswordBean bean) {

        bean.getAlumni().setRegistered(Boolean.TRUE);
        if (!bean.getAlumni().hasAnyPendingIdentityRequests()) {

            final EmailAddress personalEmail = bean.getAlumni().getPersonalEmail();

            String email;

            if (personalEmail == null) {
                email = bean.getAlumni().getStudent().getPerson().getEmailForSendingEmails();
            } else {
                email = personalEmail.getValue();
            }

            AlumniIdentityCheckRequest identityRequest =
                    new AlumniIdentityCheckRequest(email, bean.getAlumni().getStudent().getPerson().getDocumentIdNumber(),
                            bean.getFullName(), bean.getDateOfBirthYearMonthDay(), bean.getDistrictOfBirth(),
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.contacts.EmailAddress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.