Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Person


    SecondCycleIndividualCandidacy(final SecondCycleIndividualCandidacyProcess process,
            final SecondCycleIndividualCandidacyProcessBean bean) {
        this();

        Person person = init(bean, process);

        getSelectedDegreesSet().addAll(bean.getSelectedDegreeList());
        for (Degree degree : bean.getSelectedDegreeList()) {
            SecondCycleIndividualCandidacySeriesGrade newSCICSeriesGrade = new SecondCycleIndividualCandidacySeriesGrade();
            newSCICSeriesGrade.setDegree(degree);
View Full Code Here


            User user = User.findByUsername(getUsername());
            if (user == null) {
                throw new FenixActionException("label.invalid.username");
            }
            final Person person = user.getPerson();

            if (person.getTeacher() == null) {
                new Teacher(person);
            }
            return TeacherAuthorization.createOrUpdate(person.getTeacher(), getDepartment(), getExecutionSemester(),
                    getTeacherCategory(), false, getLessonHours());
        }
View Full Code Here

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

        Person person = getLoggedPerson(request);
        request.setAttribute("person", person);
        request.setAttribute("payedEntries", person.getPayments(ResidenceEvent.class));
        request.setAttribute("notPayedEvents", person.getNotPayedEventsPayableOn(null, ResidenceEvent.class, false));

        return mapping.findForward("showEvents");
    }
View Full Code Here

        if (projectExtId != null) {
            final Project project = FenixFramework.getDomainObject(projectExtId);
            request.setAttribute("projectID", project.getExternalId().toString());
            return project;
        }
        final Person person = getUserView(request).getPerson();
        final String projectId = request.getParameter("projectID");
        for (final Professorship professorship : person.getProfessorshipsSet()) {
            for (final Project project : professorship.getExecutionCourse().getAssociatedProjects()) {
                if (project.getExternalId().equals(projectId)) {
                    request.setAttribute("projectOID", project.getExternalId());
                    return project;
                }
View Full Code Here

            // There's more than one person, throw an error
            addErrorMessage(request, "error.phd.public.candidacy.fill.personal.information.and.institution.id.more.than.one");
            return fillPersonalDataInvalid(mapping, form, request, response);
        }

        final Person person = !personsFoundByDocumentId.isEmpty() ? personsFoundByDocumentId.iterator().next() : null;

        if (!StringUtils.isEmpty(personBean.getFiscalCode())) {
            final Party partyFoundBySocialSecurityNumber =
                    PartySocialSecurityNumber.readPartyBySocialSecurityNumber(personBean.getFiscalCode());

            // Second case : person found by documentId and person found by
            // social
            // security number must be equal
            if (person != null || partyFoundBySocialSecurityNumber != null) {
                if (person != partyFoundBySocialSecurityNumber) {
                    addErrorMessage(request,
                            "error.phd.public.candidacy.fill.personal.information.and.institution.id.different.ssn");
                    return fillPersonalDataInvalid(mapping, form, request, response);
                }
            }
        }

        if (bean.hasInstitutionId()) {
            Person personByIstId = Person.readPersonByUsername(bean.getInstitutionId());

            if (personByIstId == null) {
                addErrorMessage(request, "error.phd.public.candidacy.fill.personal.information.and.institution.id.noIstIdPerson");
                return fillPersonalDataInvalid(mapping, form, request, response);
            }
View Full Code Here

    private void checkIsScientificCommissionMember() {
        final Enrolment enrolment = getEnrolment();
        final ExecutionYear executionYear = enrolment.getExecutionYear();
        final DegreeCurricularPlan degreeCurricularPlan = enrolment.getDegreeCurricularPlanOfStudent();
        final Person person = AccessControl.getPerson();

        if (person != null) {
            for (final ScientificCommission scientificCommission : person.getScientificCommissionsSet()) {
                final ExecutionDegree executionDegree = scientificCommission.getExecutionDegree();
                if (executionDegree.getExecutionYear() == executionYear
                        && executionDegree.getDegreeCurricularPlan() == degreeCurricularPlan) {
                    return;
                }
View Full Code Here

        if (!isValid()) {
            throw new DomainException("thesis.submit.hasConditions");
        }

        Person person = AccessControl.getPerson();

        if (person.getTeacher() == null) {
            throw new DomainException("thesis.submit.needsTeacher");
        }

        setSubmission(new DateTime());
        setSubmitter(person);
View Full Code Here

    public boolean isSubmittedAndIsCoordinatorAndNotOrientator() {
        return isSubmitted() && isCoordinatorAndNotOrientator();
    }

    public boolean isCoordinatorAndNotOrientator() {
        final Person loggedPerson = AccessControl.getPerson();
        return loggedPerson != null && isCoordinator(loggedPerson) && !isOrientatorOrCoorientator(loggedPerson);
    }
View Full Code Here

        final Person loggedPerson = AccessControl.getPerson();
        return loggedPerson != null && isCoordinator(loggedPerson) && !isOrientatorOrCoorientator(loggedPerson);
    }

    public boolean isCoordinator() {
        final Person loggedPerson = AccessControl.getPerson();
        return loggedPerson != null && isCoordinator(loggedPerson);
    }
View Full Code Here

    }

    public List<ThesisCondition> getOrientationConditions() {
        List<ThesisCondition> conditions = new ArrayList<ThesisCondition>();

        Person orientator = getParticipationPerson(getOrientator());
        Person coorientator = getParticipationPerson(getCoorientator());

        Integer orientatorCreditsDistribution = getOrientatorCreditsDistribution();

        if (orientator == null) {
            conditions.add(new ThesisCondition("thesis.condition.orientator.required"));
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.