Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Person


                }
                row.setCell(degrees.toString());
                final StringBuilder responsibleTeachers = new StringBuilder();
                final StringBuilder otherTeachers = new StringBuilder();
                for (final Professorship professorship : executionCourse.getProfessorshipsSet()) {
                    final Person person = professorship.getPerson();
                    if (professorship.isResponsibleFor()) {
                        if (responsibleTeachers.length() > 0) {
                            responsibleTeachers.append(", ");
                        }
                        responsibleTeachers.append(person.getName());
                        responsibleTeachers.append(" (");
                        responsibleTeachers.append(person.getEmail());
                        responsibleTeachers.append(" )");
                    } else {
                        if (otherTeachers.length() > 0) {
                            otherTeachers.append(", ");
                        }
                        otherTeachers.append(person.getName());
                        otherTeachers.append(" (");
                        otherTeachers.append(person.getEmail());
                        otherTeachers.append(" )");
                    }
                }
                row.setCell(responsibleTeachers.toString());
                row.setCell(otherTeachers.toString());
View Full Code Here


    public ActionForward prepareForSupervisor(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException {

        final String personId = request.getParameter("personId");
        Person person = FenixFramework.getDomainObject(personId);
        final Student student = person.getStudent();

        request.setAttribute("student", student);

        List<Registration> registrations = person.getStudent().getActiveRegistrations();
        if (registrations.size() == 0) {
            return forwardToShowTimeTableForSupervisor(person.getStudent().getLastRegistration(), mapping, request);
        } else if (registrations.size() == 1) {
            return forwardToShowTimeTableForSupervisor(registrations.iterator().next(), mapping, request);
        } else {
            request.setAttribute("registrations", registrations);
            return mapping.findForward("chooseRegistration");
View Full Code Here

     * @param process
     * @param writer
     */
    private static void writePersonInfo(PhdIndividualProgramProcess process, PrintWriter writer) {
        writer.println(addTabs(1) + "<personne action=\"AUTO\">");
        Person person = process.getPerson();
        writer.println(addTabs(2) + String.format("<nom>%s</nom>", person.getGivenNames()));
        writer.println(addTabs(2) + String.format("<prenom>%s</prenom>", person.getFamilyNames()));
        writer.println(addTabs(2) + String.format("<sexe>%s</sexe>", Gender.MALE.equals(person.getGender()) ? "SEXH" : "SEXF"));
        writer.println(addTabs(2)
                + String.format("<naissance>%s</naissance>", person.getDateOfBirthYearMonthDay().toString("dd.MM.yyyy")));

        writer.println(addTabs(2) + "<detailPersonne action=\"AUTO\">");

        writer.println(addTabs(3) + "<domaine>DOMAINEACADEMIQUE</domaine>");
        writer.println(addTabs(3)
                + String.format("<datePersonne action=\"AUTO\" type=\"TYPE_DATE_ENTREE\">%s</datePersonne>", process
                        .getCandidacyProcess().getCandidacyDate().toString("dd.MM.yyyy")));

        writer.println(addTabs(3)
                + String.format(
                        "<lieuPersonne action=\"AUTO\" type=\"LIEUNAI\" identificationLieu=\"iso\" iso=\"%s\" typeLieu=\"PAYS\">%s</lieuPersonne>",
                        person.getCountry().getCode(),
                        person.getCountry().getCountryNationality().getContent(MultiLanguageString.en)));

        writer.println(addTabs(3)
                + String.format("<lieuPersonne action=\"AUTO\" type=\"LIEUNAIETRA\" "
                        + "typeLieu=\"LOCETRNONCON\" forceTo=\"LOCETRNONCON\">%s</lieuPersonne>",
                        person.getDistrictSubdivisionOfBirth()));

        writer.println(addTabs(3)
                + String.format("<lieuPersonne action=\"AUTO\" type=\"LIEUORI\" identificationLieu=\"iso\" iso=\"%s\" "
                        + "typeLieu=\"PAYS\">%s</lieuPersonne>", person.getCountry().getCode(), person.getCountry()
                        .getLocalizedName().getContent(MultiLanguageString.en)));

        writer.println(addTabs(3) + "<adresse type=\"ADR_ECH\" action=\"AUTO\">");

        writer.println(addTabs(4) + String.format("<ligne n=\"1\">%s</ligne>", person.getAddress()));
        writer.println(addTabs(4)
                + String.format(
                        "<localite typeLieu=\"LOCALITE;LOCETRNONCON\" identificationLieu=\"zip\" zip=\"%s\" b_returnfirst=\"1\">%s</localite>",
                        person.getAreaCode(), person.getArea()));

        if (person.getCountryOfResidence() != null) {
            writer.println(addTabs(4)
                    + String.format("<pays identificationLieu=\"iso\" iso=\"%s\" b_returnfirst=\"1\">%s</pays>", person
                            .getCountryOfResidence().getCode(),
                            person.getCountryOfResidence().getLocalizedName().getContent(MultiLanguageString.en)));
        } else {
            writer.println(addTabs(4) + "<pays identificationLieu=\"iso\" iso=\"\" b_returnfirst=\"1\"></pays>");
        }
        writer.println(addTabs(4) + String.format("<moyen action=\"AUTO\" type=\"EMAIL\">%s</moyen>", person.getEmail()));
        writer.println(addTabs(4) + String.format("<moyen action=\"AUTO\" type=\"PORTABLE\">%s</moyen>", person.getMobile()));

        writer.println(addTabs(3) + "</adresse>");

        writer.println(addTabs(2) + "</detailPersonne>");
        writer.println(addTabs(2) + "<inscription action=\"AUTO\">");

        writer.println(addTabs(3) + "<gps domaine=\"DOMAINEACADEMIQUE\">");

        writer.println(addTabs(4) + "<modelegps>CDOC</modelegps>");
        writer.println(addTabs(4) + "<unite type=\"ACAD\" format=\"LIBELLE\">IST-EPFL</unite>");
        writer.println(addTabs(4) + "<periode type=\"PEDAGO\" format=\"LIBCOU\">Eval sep</periode>");
        writer.println(addTabs(4) + "<periode type=\"ACAD\">2010</periode>");

        writer.println(addTabs(3) + "</gps>");

        writer.println(addTabs(3) + String.format(" <detail type=\"URL_IST-EPFL\">%s</detail>", getUrlForProcess(process)));
        writer.println(addTabs(3)
                + String.format(" <detail type=\"URL_IST-EPFL_DOCUMENTS\">%s</detail>", getUrlForProcessDocs(process)));
        final Photograph photo = person.getPersonalPhotoEvenIfPending();
        if (photo != null) {
            writer.println(addTabs(3) + String.format(" <detail type=\"URL_IST-EPFL_PHOTO\">%s</detail>", getUrlForPhoto(photo)));
        }

        if (process.getExternalPhdProgram() != null) {
View Full Code Here

        request.setAttribute("pageNumber", pageNumber);
        request.setAttribute("pageNumbers", computeNumberOfPages(DEFAULT_PAGE_SIZE, thread.getMessageSet().size()));
        request.setAttribute("messages", getContentToDisplay(thread.getMessageSet(), pageNumber, DEFAULT_PAGE_SIZE));

        Person loggedPerson = getLoggedPerson(request);
        request.setAttribute("person", loggedPerson);

        Forum forum = getRequestedForum(request);
        request.setAttribute("forum", this.getRequestedForum(request));
View Full Code Here

        request.setAttribute("conversationThreads",
                getContentToDisplay(forum.getConversationThreadSet(), pageNumber, DEFAULT_PAGE_SIZE));

        request.setAttribute("pageNumbers", computeNumberOfPages(DEFAULT_PAGE_SIZE, forum.getConversationThreadSet().size()));
        Person loggedPerson = getLoggedPerson(request);
        request.setAttribute("receivingMessagesByEmail", forum.isPersonReceivingMessagesByEmail(loggedPerson));

        request.setAttribute("loggedPersonCanWrite", forum.getWritersGroup().isMember(Authenticate.getUser()));
    }
View Full Code Here

    }

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

        final Person person = getPerson(request);
        final IRSDeclarationDTO declarationDTO = getRenderedObject("declarationDTO");

        try {

            if (declarationDTO.getCivilYear().intValue() >= new LocalDate().getYear()) {
View Full Code Here

    @EntryPoint
    public ActionForward beginTaskFlow(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final User userView = Authenticate.getUser();
        final Person supervisor = userView.getPerson();

        RegistrationProtocol protocol = supervisor.getOnlyRegistrationProtocol();
        ExternalSupervisorViewsBean bean;

        if (protocol == null) {
            bean = new ExternalSupervisorViewsBean(ExecutionYear.readCurrentExecutionYear());
            bean.setMegavisor(true);
View Full Code Here

    }

    private static void drawPersonalInformation(final Page page, final PhdProgramPublicCandidacyHashCode hashCode,
            final String folderName) throws IOException {

        final Person person = hashCode.getPerson();

        page.h(3, "Personal Information", "mtop2");
        page.tableStart("tstyle2 thwhite thnowrap thlight thleft thtop ulnomargin ");

        page.rowStart("tdbold").headerStartWithStyle("width: 125px;").write("Name:").headerEnd().column(person.getName())
                .rowEnd();
        page.rowStart().header("Gender:").column(person.getGender().toLocalizedString(Locale.ENGLISH)).rowEnd();
        page.rowStart().header("Identity card type:").column(person.getIdDocumentType().getLocalizedName()).rowEnd();
        page.rowStart().header("Identity card #:").column(person.getDocumentIdNumber()).rowEnd();
        page.rowStart().header("Issued by:").column(person.getEmissionLocationOfDocumentId()).rowEnd();
        page.rowStart().header("Fiscal number:").column(string(person.getSocialSecurityNumber())).rowEnd();
        page.rowStart().header("Date of birth:").column(person.getDateOfBirthYearMonthDay().toString("dd/MM/yyyy")).rowEnd();
        page.rowStart().header("Birthplace:").column(person.getDistrictSubdivisionOfBirth()).rowEnd();
        page.rowStart().header("Nationality:").column(person.getCountry().getCountryNationality().getContent()).rowEnd();
        page.rowStart().header("Address:").column(person.getAddress()).rowEnd();
        page.rowStart().header("City:").column(person.getArea()).rowEnd();
        page.rowStart().header("Zip code:").column(person.getAreaCode()).rowEnd();
        page.rowStart().header("Country:")
                .column((person.getCountryOfResidence() != null ? person.getCountryOfResidence().getName() : "-")).rowEnd();
        page.rowStart().header("Phone:").column(person.getDefaultPhoneNumber()).rowEnd();
        page.rowStart().header("Mobile:").column(person.getDefaultMobilePhoneNumber()).rowEnd();
        page.rowStart().header("Email:").column(person.getDefaultEmailAddressValue()).rowEnd();

        page.tableEnd();

        page.h(3, "Photo");
        String photoUrl = APPLICATION_PREFIX_LINK + "/phd/epfl/applications/photo";
        final Photograph photo = person.getPersonalPhotoEvenIfPending();
        if (photo != null) {
            photoUrl += "?photoOid=" + photo.getExternalId();
        }
        page.photo(photoUrl);
    }
View Full Code Here

    @EntryPoint
    public ActionForward beginTaskFlow(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final User userView = Authenticate.getUser();
        final Person supervisor = userView.getPerson();

        RegistrationProtocol protocol = supervisor.getOnlyRegistrationProtocol();
        ExternalSupervisorViewsBean bean;

        if (protocol == null) {
            bean = new ExternalSupervisorViewsBean();
            bean.setMegavisor(true);
View Full Code Here

            }
        }
        request.setAttribute("sendersGroups", sendersGroups);
        request.setAttribute("sendersGroupsCourses", sendersGroupsCourses);

        final Person person = AccessControl.getPerson();
        if (person != null && person.hasRole(RoleType.MANAGER)) {
            SearchSendersBean searchSendersBean = getRenderedObject("searchSendersBean");
            if (searchSendersBean == null) {
                searchSendersBean = new SearchSendersBean();
            }
            request.setAttribute("searchSendersBean", searchSendersBean);
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.