Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Person


    public ActionForward updateSocialSecurityNumber(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AlumniIdentityCheckRequest checkRequest = getDomainObject(request, "requestId");
        Person alumniPerson = getDomainObject(request, "personId");
        ValidateAlumniIdentity.runValidateAlumniIdentity(checkRequest, alumniPerson);
        return innerPrepareValidation(mapping, request, checkRequest, alumniPerson);
    }
View Full Code Here


    }

    public ActionForward resetValidationRequests(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final String personID = (String) getFromRequest(request, "personID");
        Person person = FenixFramework.getDomainObject(personID);
        if (person != null) {
            person.setNumberOfValidationRequests(0);
        }
        return backToShowInformation(mapping, actionForm, request, response);
    }
View Full Code Here

    private void addParametersInformation() {
        addParameter("studentNumber", getStudentNumber());
        addParameter("degreeDescription", getDegreeDescription());

        AdministrativeOffice administrativeOffice = getAdministrativeOffice();
        Person activeUnitCoordinator = administrativeOffice.getCoordinator().getPerson();

        addParameter("administrativeOfficeCoordinatorName", activeUnitCoordinator.getName());
        addParameter("administrativeOfficeName", getI18NText(administrativeOffice.getName()));
        addParameter("institutionName", Bennu.getInstance().getInstitutionUnit().getName());
        addParameter("universityName", UniversityUnit.getInstitutionsUniversityUnit().getName());

        addParameter("day", new LocalDate().toString(DD_MMMM_YYYY, getLocale()));
View Full Code Here

            addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                    + ".error.public.candidacies.fill.personal.information.and.institution.person.already.exist");
            return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
        }

        final Person person = persons.size() == 1 ? persons.iterator().next() : null;

        // check if person already exists
        if (person != null) {
            if (isPersonStudentAndNumberIsCorrect(person, bean.getPersonNumber())) {
                if (!person.getDateOfBirthYearMonthDay().equals(personBean.getDateOfBirth())) {
                    // found person with diff date
                    addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                            + ".error.public.candidacies.fill.personal.information.and.institution.id.birth");
                    return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
                } else if (!StringUtils.isEmpty(personBean.getSocialSecurityNumber())
                        && !StringUtils.isEmpty(person.getSocialSecurityNumber())
                        && !person.getSocialSecurityNumber().equals(personBean.getSocialSecurityNumber())) {
                    // found person with diff social security number
                    addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                            + ".error.public.candidacies.fill.personal.information.and.institution.id.contributorNumber");
                    return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
                } else {
View Full Code Here

                addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                        + ".error.public.candidacies.fill.personal.information.and.institution.id.person.already.exist");
                return prepareEditCandidacyProcess(mapping, form, request, response);
            }

            final Person person = persons.size() == 1 ? persons.iterator().next() : null;

            // check if person already exists
            if (person != null) {
                if (isPersonStudentAndNumberIsCorrect(person, bean.getPersonNumber())) {
                    if (!person.getDateOfBirthYearMonthDay().equals(personBean.getDateOfBirth())) {
                        // found person with diff date
                        addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                                + ".error.public.candidacies.fill.personal.information.and.institution.id.birth");
                        return prepareEditCandidacyProcess(mapping, form, request, response);
                    } else if (!StringUtils.isEmpty(personBean.getSocialSecurityNumber())
                            && !StringUtils.isEmpty(person.getSocialSecurityNumber())
                            && !person.getSocialSecurityNumber().equals(personBean.getSocialSecurityNumber())) {
                        // found person with diff social security number
                        addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                                + ".error.public.candidacies.fill.personal.information.and.institution.id.contributorNumber");
                        return prepareEditCandidacyProcess(mapping, form, request, response);
                    } else {
View Full Code Here

        fillPriceTags();
    }

    protected void fillFirstParagraph() {

        Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();
        String adminOfficeName = getI18NText(getAdministrativeOffice().getName());
        String institutionName = getInstitutionName();
        String universityName = getUniversityName(new DateTime());

        String stringTemplate =
                BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.academicDocument.declaration.firstParagraph");
        String coordinatorTitle = getCoordinatorGender(coordinator);

        addParameter(
                "firstParagraph",
                "     "
                        + MessageFormat.format(stringTemplate, coordinator.getName(), coordinatorTitle,
                                adminOfficeName.toUpperCase(getLocale()), institutionName.toUpperCase(getLocale()),
                                universityName.toUpperCase(getLocale())));
    }
View Full Code Here

        return result.toString();
    }

    protected void fillTrailer(Registration registration) {

        Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();
        String adminOfficeName = getI18NText(getAdministrativeOffice().getName());
        String institutionName = getInstitutionName();
        final Locality locality = getAdministrativeOffice().getCampus().getLocality();
        String location = locality != null ? locality.getName() : null;
        String dateDD = new LocalDate().toString("dd", getLocale());
View Full Code Here

            addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                    + ".error.public.candidacies.fill.personal.information.and.institution.id.person.already.exist");
            return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
        }

        final Person person = persons.size() == 1 ? persons.iterator().next() : null;

        // check if person already exists
        if (person != null) {
            if (isPersonStudentAndNumberIsCorrect(person, bean.getPersonNumber())) {
                if (!person.getDateOfBirthYearMonthDay().equals(personBean.getDateOfBirth())) {
                    // found person with diff date
                    addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                            + ".error.public.candidacies.fill.personal.information.and.institution.id.birth");
                    return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
                } else if (!StringUtils.isEmpty(personBean.getSocialSecurityNumber())
                        && !StringUtils.isEmpty(person.getSocialSecurityNumber())
                        && !person.getSocialSecurityNumber().equals(personBean.getSocialSecurityNumber())) {
                    // found person with diff social security number
                    addActionMessage("individualCandidacyMessages", request, getProcessType().getSimpleName()
                            + ".error.public.candidacies.fill.personal.information.and.institution.id.contributorNumber");
                    return executeCreateCandidacyPersonalInformationInvalid(mapping, form, request, response);
                } else {
View Full Code Here

            spreadsheet.addCell(!(StringUtils.isEmpty(degree.getSigla())) ? degree.getSigla() : degree.getNameFor(executionYear)
                    .toString());
            spreadsheet.addCell(degree.getFilteredName(executionYear));
            spreadsheet.addCell(registration.getNumber().toString());

            final Person person = registration.getPerson();
            spreadsheet.addCell(person.getName());
            spreadsheet.addCell(person.getDocumentIdNumber());

            final RegistrationState lastRegistrationState = registration.getLastRegistrationState(executionYear);
            spreadsheet.addCell(lastRegistrationState.getStateType().getDescription());
            spreadsheet.addCell(lastRegistrationState.getStateDate().toString("yyyy-MM-dd"));
            spreadsheet.addCell(registration.getRegistrationProtocol().getCode());

            if (extendedInfo) {
                spreadsheet.addCell(getAlmaMater(person, registration));
                spreadsheet.addCell(getAlmaMaterCountry(person, registration));
                spreadsheet.addCell(person.getDefaultEmailAddress() == null ? EMPTY : person.getDefaultEmailAddress().getValue());
                spreadsheet.addCell(person.getCountry() == null ? EMPTY : person.getCountry().getName());
                spreadsheet.addCell(getFullAddress(person));
                spreadsheet.addCell(person.hasDefaultMobilePhone() ? person.getDefaultMobilePhoneNumber() : EMPTY);
                spreadsheet.addCell(person.getGender().toLocalizedString());
                spreadsheet.addCell(person.getDateOfBirthYearMonthDay() == null ? EMPTY : person.getDateOfBirthYearMonthDay()
                        .toString(YMD_FORMAT));
                spreadsheet.addCell(registration.getEnrolmentsExecutionYears().size());
                spreadsheet.addCell(registration.getCurricularYear(executionYear));
                spreadsheet.addCell(registration.getEnrolments(executionYear).size());
                spreadsheet.addCell(registration.getRegimeType(executionYear).getLocalizedName());
View Full Code Here

     * @deprecated use /user/photo/{username} instead
     */
    @Deprecated
    public ActionForward retrievePhotographOnPublicSpace(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        final Person person = FenixFramework.getDomainObject(request.getParameter("personId"));
        response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
        response.setHeader("Location",
                CoreConfiguration.getConfiguration().applicationUrl() + "/user/photo/" + person.getUsername());
        return null;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.Person

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.