Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Person


        Set<Photograph> photos = rootDomainObject.getPhotographsSet();
        SortedMap<Person, UserHistory> history = new TreeMap<Person, UserHistory>();

        for (Photograph photograph : photos) {
            if (filter.accepts(photograph)) {
                Person person = photograph.getPerson();
                if (history.containsKey(person)) {
                    history.get(person).addPhotograph(photograph);
                } else {
                    UserHistory user = new UserHistory(person);
                    user.addPhotograph(photograph);
View Full Code Here


public abstract class AbstractModifyProfessorshipWithPerson {
    @Atomic
    public static Boolean run(Person person) throws NotAuthorizedException {
        /* start chain */
        Person requester = AccessControl.getPerson();
        if ((requester == null) || !requester.hasRole(RoleType.DEPARTMENT_CREDITS_MANAGER)) {
            throw new NotAuthorizedException();
        }
        if (person.getTeacher() != null) {
            final Person requesterPerson = requester;
            Department teacherDepartment = person.getTeacher().getDepartment();
            Collection departmentsWithAccessGranted = requesterPerson.getManageableDepartmentCreditsSet();
            if (!departmentsWithAccessGranted.contains(teacherDepartment)) {
                throw new NotAuthorizedException();
            }
        }
        /* end chain */
 
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

    StandaloneIndividualCandidacy(final StandaloneIndividualCandidacyProcess process,
            final StandaloneIndividualCandidacyProcessBean bean) {

        this();

        Person person = init(bean, process);
        addSelectedCurricularCourses(bean.getCurricularCourses(), bean.getCandidacyExecutionInterval());

        /*
         * 06/04/2009 - The candidacy may not be associated with a person. In
         * this case we will not create an Event
View Full Code Here

    @Atomic
    public static Boolean run(Person person, ExecutionCourse executionCourse) throws NotAuthorizedException {
        try {

            final Person loggedPerson = AccessControl.getPerson();

            Professorship selectedProfessorship = null;
            selectedProfessorship = person.getProfessorshipByExecutionCourse(executionCourse);

            if ((loggedPerson == null) || (selectedProfessorship == null) || !loggedPerson.hasRole(RoleType.TEACHER)
                    || isSamePersonAsBeingRemoved(loggedPerson, selectedProfessorship.getPerson())
                    || selectedProfessorship.getResponsibleFor()) {
                throw new NotAuthorizedException();
            }
        } catch (RuntimeException e) {
View Full Code Here

        return mapping.findForward("prepareSearchPerson");
    }

    public ActionForward prepareManageLoginTimeIntervals(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        Person person = getPersonFromParameter(request);
        request.setAttribute("person", person);
        return mapping.findForward("prepareManageLoginTimeIntervals");
    }
View Full Code Here

    }

    protected void fillFirstParagraph() {

        Person coordinator = getAdministrativeOffice().getCoordinator().getPerson();

        String coordinatorTitle = getCoordinatorGender(coordinator);

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

        String stringTemplate =
                BundleUtil.getString(Bundle.ACADEMIC, getDocumentRequest().getLanguage(),
                        "label.academicDocument.declaration.firstParagraph");

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

        addParameter("certificate", BundleUtil.getString(Bundle.ACADEMIC, getDocumentRequest().getLanguage(),
                "label.academicDocument.standaloneEnrolmentCertificate.secondParagraph"));
View Full Code Here

        String[] executionCourseResponsabilities =
                (String[]) teacherExecutionYearResponsabilitiesForm.get("executionCourseResponsability");

        String teacherId = (String) teacherExecutionYearResponsabilitiesForm.get("teacherName");
        String executionYearId = (String) teacherExecutionYearResponsabilitiesForm.get("executionYearId");
        Person person = Person.readPersonByUsername(teacherId);
        ExecutionYear executionYear = FenixFramework.getDomainObject(executionYearId);
        try {
            UpdateProfessorshipWithPerson.run(person, executionYear, Arrays.asList(executionCourseResponsabilities));
        } catch (NotAuthorizedException e) {
            ActionMessages messages = new ActionMessages();
View Full Code Here

        request.setAttribute("executionPeriod", selectedExecutionPeriod);

        final List<ExecutionCourse> executionCourses = new ArrayList<ExecutionCourse>();
        request.setAttribute("executionCourses", executionCourses);

        final Person person = AccessControl.getPerson();
        final SortedSet<ExecutionSemester> executionSemesters =
                new TreeSet<ExecutionSemester>(Ordering.from(ExecutionSemester.COMPARATOR_BY_SEMESTER_AND_YEAR).reverse());
        if (person != null) {
            for (final Professorship professorship : person.getProfessorshipsSet()) {
                final ExecutionCourse executionCourse = professorship.getExecutionCourse();
                final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();

                executionSemesters.add(executionSemester);
                if (selectedExecutionPeriod == null || selectedExecutionPeriod == executionSemester) {
View Full Code Here

    @Atomic
    public ActionForward insertStudentInShift(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException {
        PersonBean bean = getRenderedObject("personBean");
        String id = bean.getUsername();
        Person person = null;
        final User user = User.findByUsername(id);
        if (user != null) {
            person = user.getPerson();
        } else {
            try {
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.