Package org.fenixedu.academic.domain.contacts

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


            if (detailed) {
                spreadsheet.addCell(registration.getPerson().hasDefaultEmailAddress() ? registration.getPerson()
                        .getDefaultEmailAddressValue() : "-");
                spreadsheet.addCell(registration.getPerson().hasInstitutionalEmailAddress() ? registration.getPerson()
                        .getInstitutionalEmailAddressValue() : "-");
                PartyContact mobileContact = getMobileContact(registration.getPerson());
                spreadsheet.addCell(mobileContact != null ? mobileContact.getPresentationValue() : "-");

            }

        }
    }
View Full Code Here


    public ActionForward createPartyContact(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {
        if (getRenderedObject("edit-contact") instanceof PartyContactBean) {
            PartyContactBean contact = getRenderedObject("edit-contact");
            PartyContact newPartyContact = null;
            try {
                newPartyContact = createContact(contact);
                if (newPartyContact == null) {
                    addActionMessage("contacts", request, "label.contact.validate.already", contact.getValue());
                    return backToShowInformation(mapping, actionForm, request, response);
View Full Code Here

        addActionMessage("contacts", request, contactBean.getValidationMessageKey(), contactBean.getValue());
    }

    public ActionForward prepareEditPartyContact(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        PartyContact contact = getPartyContact(request);
        PartyContactBean contactBean = PartyContactBean.createFromDomain(contact);
        request.setAttribute("partyContact", contactBean);
        request.setAttribute("partyContactClass", contactBean.getContactName());
        return mapping.findForward("editPartyContact");
    }
View Full Code Here

    }

    public ActionForward prepareValidate(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final String partyContactExtId = request.getParameter("partyContact");
        PartyContact partyContact = FenixFramework.getDomainObject(partyContactExtId);
        partyContact.triggerValidationProcessIfNeeded();
        PartyContactBean contactBean = PartyContactBean.createFromDomain(partyContact);
        addWarningMessage(request, contactBean);
        return forwardToInputValidationCode(mapping, actionForm, request, response, partyContact);
    }
View Full Code Here

    }

    public ActionForward deletePartyContact(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {
        try {
            final PartyContact partyContact = getPartyContact(request);
            deleteContact(partyContact);
        } catch (DomainException e) {
            addActionMessage("contacts", request, e.getMessage(), e.getArgs());
        }
        return backToShowInformation(mapping, actionForm, request, response);
View Full Code Here

    public ActionForward requestValidationToken(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final String partyContactExtId = request.getParameter("partyContactValidation");
        final PartyContactValidation partyContactValidation = FenixFramework.getDomainObject(partyContactExtId);
        final PartyContact partyContact = partyContactValidation.getPartyContact();
        PartyContactBean contactBean = PartyContactBean.createFromDomain(partyContact);
        partyContact.triggerValidationProcess();
        addWarningMessage(request, contactBean);
        return forwardToInputValidationCode(mapping, actionForm, request, response, partyContact);
    }
View Full Code Here

        boolean isValueChanged = isValueChanged();
        boolean createdNewContact = false;
        String newValue = getPresentationValue();
        if (isValueChanged) {
            if (!getContact().waitsValidation()) {
                PartyContact contact;
                if (getContact().getCurrentPartyContact() != null) {
                    contact = getContact().getCurrentPartyContact();
                    contact.getPartyContactValidation().reset();
                } else {
                    contact = createNewContact();
                    contact.setPrevPartyContact(getContact());
                    createdNewContact = true;
                }
                setContact(contact);
            }
        }
View Full Code Here

        // setPassword("");
        // setPasswordConfirmation("");
    }

    private void initPhone(Alumni alumni) {
        PartyContact phone = alumni.getUpdatablePartyContact(Phone.class);
        if (phone != null) {
            setCurrentPhone((Phone) phone);
            setPhone(((Phone) phone).getNumber());
        }
    }
View Full Code Here

            setPhone(((Phone) phone).getNumber());
        }
    }

    private void initEmail(Alumni alumni) {
        PartyContact email = alumni.getUpdatablePartyContact(EmailAddress.class);
        if (email != null) {
            setCurrentEmail((EmailAddress) email);
            setEmail(((EmailAddress) email).getValue());
        }
    }
View Full Code Here

            setEmail(((EmailAddress) email).getValue());
        }
    }

    private void initAddress(Alumni alumni) {
        PartyContact address = alumni.getUpdatablePartyContact(PhysicalAddress.class);
        if (address != null) {
            setCurrentPhysicalAddress((PhysicalAddress) address);
            setAddressBean(new AlumniAddressBean(alumni, (PhysicalAddress) address));
        } else {
            setAddressBean(new AlumniAddressBean(alumni));
View Full Code Here

TOP

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

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.