Package org.fenixedu.academic.dto.person

Examples of org.fenixedu.academic.dto.person.PersonBean


@Forwards({ @Forward(name = "visualizePersonalInformation", path = "/person/visualizePersonalInfo.jsp") })
public class UpdateNicknameDA extends FenixDispatchAction {

    public ActionForward updateNickname(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        PersonBean personBean = getRenderedObject("nickname");
        Person person = getLoggedPerson(request);
        EmergencyContactBean emergencyContactBean = new EmergencyContactBean(person);

        try {
            person.setNickname(personBean.getNickname());
        } catch (DomainException e) {
            addActionMessage(request, e.getKey());
            request.setAttribute("personBean", new PersonBean(person));
            request.setAttribute("emergencyContactBean", new EmergencyContactBean(person));
        } catch (BennuCoreDomainException be) {
            addActionMessage(request, be.getLocalizedMessage(), false);
            request.setAttribute("personBean", new PersonBean(person));
            request.setAttribute("emergencyContactBean", new EmergencyContactBean(person));

        }

        request.setAttribute("personBean", personBean);
View Full Code Here


        /*
         * 21/07/2009 - Now we create a person to process the payments
         * imediately
         */
        bean.setChoosePersonBean(new ChoosePersonBean());
        bean.setPersonBean(new PersonBean());
        bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());

        /*
         * 06/05/2009 - Also we mark the bean as an external candidacy.
         */
 
View Full Code Here

    public ActionForward prepareExecuteEditCandidacyPersonalInformation(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        final DegreeCandidacyForGraduatedPersonIndividualProcessBean bean =
                new DegreeCandidacyForGraduatedPersonIndividualProcessBean();
        bean.setPersonBean(new PersonBean(getProcess(request).getPersonalDetails()));
        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        return mapping.findForward("edit-candidacy-personal-information");
    }
View Full Code Here

                new DegreeCandidacyForGraduatedPersonIndividualProcessBean(
                        (DegreeCandidacyForGraduatedPersonIndividualProcess) process);
        bean.setCandidacyProcess(getParentProcess(request));

        bean.setChoosePersonBean(new ChoosePersonBean(process.getCandidacy().getPersonalDetails()));
        bean.setPersonBean(new PersonBean(process.getCandidacy().getPersonalDetails()));

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
    }
View Full Code Here

        /*
         * 21/07/2009 - Now we create a person to process the payments
         * imediately
         */
        bean.setChoosePersonBean(new ChoosePersonBean());
        bean.setPersonBean(new PersonBean());
        bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());

        /*
         * 06/05/2009 - Also we mark the bean as an external candidacy.
         */
 
View Full Code Here

    public ActionForward prepareExecuteEditCandidacyPersonalInformation(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {

        final SecondCycleIndividualCandidacyProcessBean bean = new SecondCycleIndividualCandidacyProcessBean();
        bean.setPersonBean(new PersonBean(getProcess(request).getPersonalDetails()));
        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        return mapping.findForward("edit-candidacy-personal-information");
    }
View Full Code Here

        final SecondCycleIndividualCandidacyProcessBean bean =
                new SecondCycleIndividualCandidacyProcessBean((SecondCycleIndividualCandidacyProcess) process);
        bean.setCandidacyProcess(getParentProcess(request));

        bean.setChoosePersonBean(new ChoosePersonBean(process.getCandidacy().getPersonalDetails()));
        bean.setPersonBean(new PersonBean(process.getCandidacy().getPersonalDetails()));

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
    }
View Full Code Here

    }

    public ActionForward backToShowInformation(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final Person person = Authenticate.getUser().getPerson();
        request.setAttribute("personBean", new PersonBean(person));
        EmergencyContactBean emergencyContactBean = new EmergencyContactBean(person);
        request.setAttribute("emergencyContactBean", emergencyContactBean);
        return mapping.findForward("visualizePersonalInformation");
    }
View Full Code Here

    }

    public ActionForward prepareExecuteEditCandidacyPersonalInformation(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        final DegreeChangeIndividualCandidacyProcessBean bean = new DegreeChangeIndividualCandidacyProcessBean();
        bean.setPersonBean(new PersonBean(getProcess(request).getPersonalDetails()));
        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        return mapping.findForward("edit-candidacy-personal-information");
    }
View Full Code Here

            throw new GivenNameMismatchException();
        }
    }

    public PersonBean getPersonBean() {
        PersonBean bean = new PersonBean();

        if (getPersonalBean().hasChosenPersonManually()) {
            bean.setPerson(getPersonalBean().getChosenPersonManually());
            return bean;
        }

        if (isPersonRegisteredOnFenix()) {
            bean.setPerson(getPerson());
            return bean;
        }

        final PhdMigrationIndividualPersonalDataBean personalBean = getPersonalBean();

        bean.setAddress(personalBean.getAddress());
        bean.setArea(personalBean.getArea());
        bean.setAreaCode(personalBean.getAreaCode());
        bean.setParishOfResidence(personalBean.getParishOfResidence());
        bean.setDistrictOfResidence(personalBean.getDistrictOfResidence());
        bean.setDistrictSubdivisionOfResidence(personalBean.getDistrictSubdivisionOfResidence());

        bean.setPhone(personalBean.getContactNumber());
        bean.setWorkPhone(personalBean.getOtherContactNumber());
        bean.setProfession(personalBean.getProfession());
        bean.setEmail(personalBean.getEmail());

        bean.setFatherName(personalBean.getFatherName());
        bean.setMotherName(personalBean.getMotherName());
        bean.setIdDocumentType(IDDocumentType.OTHER);
        bean.setDocumentIdNumber(personalBean.getIdentificationNumber());
        bean.setSocialSecurityNumber(personalBean.getSocialSecurityNumber());

        bean.setGivenNames(readGivenName(personalBean.getFullName(), personalBean.getFamilyName()));
        bean.setName(personalBean.getFullName());
        bean.setFamilyNames(personalBean.getFamilyName());

        bean.setDateOfBirth(new YearMonthDay(personalBean.getDateOfBirth().getYear(), personalBean.getDateOfBirth()
                .getMonthOfYear(), personalBean.getDateOfBirth().getDayOfMonth()));
        bean.setGender(personalBean.getGender());
        bean.setNationality(personalBean.getNationality());

        return bean;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.person.PersonBean

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.