Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Alumni


        if (!validateCaptcha(mapping, request)) {
            return mapping.findForward("alumniPublicAccess");
        }

        try {
            final Alumni alumni =
                    RegisterAlumniData.run(alumniBean.getStudentNumber(), alumniBean.getDocumentIdNumber().trim(),
                            alumniBean.getEmail());
            String url = AlumniNotificationService.getRegisterConclusionURL(alumni);
            request.setAttribute("alumniEmailSuccessMessage", "http" + url.split("http")[1]);
            request.setAttribute("alumni", alumni);
View Full Code Here


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

        String alumniId = BundleUtil.getString(Bundle.ALUMNI, "alumni.public.registration.first.argument");
        String urlToken = BundleUtil.getString(Bundle.ALUMNI, "alumni.public.registration.second.argument");
        final Alumni alumni = getDomainObject(request, alumniId);

        if (StringUtils.isEmpty(alumniId) || StringUtils.isEmpty(urlToken) || alumni == null) {
            request.setAttribute("alumniPublicAccessTitle", "registration.error.old.request.link.title");
            request.setAttribute("alumniPublicAccessMessage", "error.alumni.wrong.arguments");
            return mapping.findForward("alumniPublicAccessMessage");
        }

        if (alumni.isRegistered() && !alumni.isRecoveringPassword()) {
            request.setAttribute("alumniPublicAccessTitle", "registration.error.old.request.link.title");
            request.setAttribute("alumniPublicAccessMessage", "error.alumni.already.registered");
            return mapping.findForward("alumniPublicAccessMessage");
        }

        if (!alumni.getUrlRequestToken().equals(UUID.fromString(request.getParameter(urlToken)))) {
            request.setAttribute("alumniPublicAccessTitle", "registration.error.old.request.link.title");
            request.setAttribute("alumniPublicAccessMessage", "registration.error.old.request.link.message");
            return mapping.findForward("alumniPublicAccessMessage");
        }
View Full Code Here

    }

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

        final Alumni alumni = ((AlumniLinkRequestBean) getObjectFromViewState("alumniBean")).getAlumni();
        RenderUtils.invalidateViewState();

        alumni.validateEmailFromRegistrationProcess();

        if (alumni.hasPastLogin()) {
            try {
                RegisterAlumniData.run(alumni, Boolean.TRUE);
                request.setAttribute("loginAlias", alumni.getLoginUsername());
                request.setAttribute("registrationResult", "true");
            } catch (FenixServiceException e) {
                request.setAttribute("registrationResult", "false");
            }

            request.setAttribute("passwordAccessBean", new AlumniPasswordBean(alumni));
            request.setAttribute("alumni", alumni);
            return mapping.findForward("alumniRegistrationResult");

        } else {
            request.setAttribute("passwordAccessBean", new AlumniPasswordBean(alumni, AlumniRequestType.PASSWORD_REQUEST));
            if (alumni.hasAnyPendingIdentityRequests()) {
                request.setAttribute("pendingRequests", "true");
            }
            return mapping.findForward("alumniCreatePasswordRequest");
        }
    }
View Full Code Here

        sheets.add(formationData);
        return sheets;
    }

    private void addCurriculumDataRow(Spreadsheet sheet, String alumniName, Integer studentNumber, Student student) {
        Alumni alumni = student.getAlumni();

        // "NOME", "NUMERO_ALUNO", "CURSO", "INICIO", "CONCLUSAO", "DESCRICAO",
        // "EMPREGADO ACTUALMENTE"
        for (Registration registration : student.getRegistrationsSet()) {
            if (registration.isBolonha()) {
                if (registration.hasConcluded()) {
                    final SortedSet<CycleCurriculumGroup> concludeCycles =
                            new TreeSet<CycleCurriculumGroup>(CycleCurriculumGroup.COMPARATOR_BY_CYCLE_TYPE_AND_ID);
                    concludeCycles.addAll(registration.getLastStudentCurricularPlan().getInternalCycleCurriculumGrops());
                    Row row = sheet.addRow();
                    row.setCell(alumniName);
                    row.setCell(studentNumber);
                    row.setCell(registration.getDegreeName());
                    row.setCell(registration.getStartDate().toString(DATE_FORMAT));
                    final CycleCurriculumGroup lastConcludedCycle = concludeCycles.last();
                    try {
                        row.setCell(lastConcludedCycle.isConclusionProcessed() ? lastConcludedCycle.getConclusionDate().toString(
                                DATE_FORMAT) : lastConcludedCycle.calculateConclusionDate().toString(DATE_FORMAT));
                    } catch (Exception ex) {
                        row.setCell(NOT_AVAILABLE);
                    }
                    row.setCell("Bolonha");
                    row.setCell(alumni != null && alumni.getIsEmployed() != null ? getApp("label." + alumni.getIsEmployed()) : NOT_AVAILABLE);
                }
            } else {
                if (registration.isRegistrationConclusionProcessed()) {
                    Row row = sheet.addRow();
                    row.setCell(alumniName);
                    row.setCell(studentNumber);
                    row.setCell(registration.getDegreeName());
                    row.setCell(registration.getStartDate().toString(DATE_FORMAT));
                    row.setCell(registration.getConclusionDate() != null ? registration.getConclusionDate().toString(DATE_FORMAT) : NOT_AVAILABLE);
                    row.setCell("Pre-Bolonha");
                    row.setCell(alumni != null && alumni.getIsEmployed() != null ? getApp("label." + alumni.getIsEmployed()) : NOT_AVAILABLE);
                }
            }
        }
    }
View Full Code Here

    }

    @Atomic
    public static Alumni run(final Integer studentNumber, final String documentIdNumber, final String email) {

        final Alumni alumni = new AlumniManager().registerAlumni(studentNumber, documentIdNumber, email);
        sendPublicAccessMail(alumni, email);
        return alumni;
    }
View Full Code Here

    }

    @Atomic
    public static void run(final AlumniIdentityCheckRequestBean bean) {

        final Alumni alumni = new AlumniManager().checkAlumniIdentity(bean.getDocumentIdNumber(), bean.getContactEmail());
        if (!alumni.hasAnyPendingIdentityRequests()) {

            AlumniIdentityCheckRequest identityRequest =
                    new AlumniIdentityCheckRequest(bean.getContactEmail(), bean.getDocumentIdNumber(), bean.getFullName(),
                            bean.getDateOfBirthYearMonthDay(), bean.getDistrictOfBirth(), bean.getDistrictSubdivisionOfBirth(),
                            bean.getParishOfBirth(), bean.getSocialSecurityNumber(), bean.getNameOfFather(),
View Full Code Here

TOP

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

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.