Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Person


    public ExecutionCourseController() {
        super();
    }

    private static Professorship findProfessorship(final ExecutionCourse executionCourse) {
        final Person person = AccessControl.getPerson();
        if (person != null) {
            Optional<Professorship> professorshipOpt =
                    person.getProfessorshipsSet().stream()
                            .filter(professorship -> professorship.getExecutionCourse().equals(executionCourse)).findFirst();
            if (professorshipOpt.isPresent()) {
                Professorship prof = professorshipOpt.get();
                if (!prof.getPermissions().getGroups()) {
                    throw new RuntimeException("Professor is not authorized to manage the student groups");
View Full Code Here


                BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.academicDocument.title.declaration"));
    }

    @Override
    protected void newFillReport() {
        Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();
        Registration registration = getDocumentRequest().getRegistration();

        String coordinatorTitle = getCoordinatorGender(coordinator);

        String studentRegistered;
View Full Code Here

    @Override
    protected void fillReport() {
        super.fillReport();

        IRegistryDiplomaRequest request = getDocumentRequest();
        Person person = request.getPerson();

        setHeader();

        addParameter("institution", getInstitutionName());
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

    protected void addIntroParameters() {
        super.addIntroParameters();

        final String institutionUnitName = getInstitutionName();

        Person principal =
                getUniversity(getDocumentRequest().getRequestDate()).getInstitutionsUniversityResponsible(FunctionType.PRINCIPAL);
        final Person presidentIst =
                getUniversity(getDocumentRequest().getRequestDate()).getInstitutionsUniversityResponsible(FunctionType.PRESIDENT);

        final UniversityUnit university = getUniversity(getDocumentRequest().getRequestDate());
        String universityName = university.getPartyName().getPreferedContent();

        String rectorGender, rectorGrant, presidentGender;

        if (presidentIst.isMale()) {
            presidentGender = BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.phd.registryDiploma.presidentMale");
        } else {
            presidentGender = BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.phd.registryDiploma.presidentFemale");
        }
View Full Code Here

        }
    }

    @Override
    protected void setPersonFields() {
        final Person person = getDocumentRequest().getPerson();
        addParameter("name", StringFormatter.prettyPrint(person.getName()));
        addParameter("nameOfFather", StringFormatter.prettyPrint(person.getNameOfFather()));
        addParameter("nameOfMother", StringFormatter.prettyPrint(person.getNameOfMother()));

        String country;
        String countryUpperCase;
        if (person.getCountry() != null) {
            countryUpperCase = person.getCountry().getCountryNationality().getContent(getLanguage()).toLowerCase();
            country = WordUtils.capitalize(countryUpperCase);
        } else {
            throw new DomainException("error.personWithoutParishOfBirth");
        }
View Full Code Here

            for (Registration registration : registrations) {
                result.add(registration.getStudent());
            }

        } else if (!StringUtils.isEmpty(getUsername())) {
            Person person = Person.readPersonByUsername(getUsername());

            if (person != null && person.getStudent() != null) {
                result.add(person.getStudent());
            }

        } else if (!StringUtils.isEmpty(getDocumentId())) {
            Collection<Person> personList = Person.readByDocumentIdNumber(getDocumentId());

            for (Person person : personList) {
                if (person.getStudent() != null) {
                    result.add(person.getStudent());
                }
            }
        }

        return result;
View Full Code Here

    @Override
    protected void fillReport() {
        super.fillReport();
        Registration registration = getDocumentRequest().getRegistration();
        final Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();

        final List<Enrolment> enrolments =
                (List<Enrolment>) getDocumentRequest().getRegistration().getEnrolments(getExecutionYear());
        Integer numberEnrolments = Integer.valueOf(enrolments.size());
View Full Code Here

    @Override
    protected void fillReport() {
        super.fillReport();

        final Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();
        final EnrolmentCertificateRequest request = getDocumentRequest();
        final Registration registration = getDocumentRequest().getRegistration();

        String coordinatorTitle = getCoordinatorGender(coordinator);
View Full Code Here

        addParameter("printPriceFields", printPriceParameters(certificateRequest));
    }

    @Override
    protected void setPersonFields() {
        final Person person = getDocumentRequest().getPerson();

        StringBuilder builder1 = new StringBuilder();
        builder1.append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.with"));
        builder1.append(SINGLE_SPACE).append(person.getIdDocumentType().getLocalizedName(getLocale()));
        builder1.append(SINGLE_SPACE).append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.number.short"));
        builder1.append(SINGLE_SPACE).append(person.getDocumentIdNumber());

        addParameter("name", person.getName().toUpperCase());
        addParameter("documentIdNumber", builder1.toString());

        setNationality(person);
    }
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.