Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Professorship


    }

    private void readAndSaveTeacher(SummariesManagementBean bean, DynaActionForm dynaActionForm, HttpServletRequest request,
            ActionMapping mapping) {

        Professorship professorship = getProfessorshipFromParameter(request);
        if (professorship != null) {
            bean.setProfessorship(professorship);
            bean.setTeacher(null);
            bean.setTeacherName("");
View Full Code Here


            super();
        }

        @Override
        public Object transform(Object input) {
            Professorship professorship = (Professorship) input;
            InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

            final DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

            ExecutionCourse executionCourse = professorship.getExecutionCourse();
            List executionCourseCurricularCoursesList = getInfoCurricularCourses(detailedProfessorship, executionCourse);

            detailedProfessorship.setResponsibleFor(professorship.getResponsibleFor());

            detailedProfessorship.setInfoProfessorship(infoProfessorShip);
            detailedProfessorship.setExecutionCourseCurricularCoursesList(executionCourseCurricularCoursesList);

            return detailedProfessorship;
View Full Code Here

    protected static List getDetailedProfessorships(List professorships, final List responsibleFors, final Integer teacherType) {
        List detailedProfessorshipList = (List) CollectionUtils.collect(professorships, new Transformer() {

            @Override
            public Object transform(Object input) {
                Professorship professorship = (Professorship) input;

                InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

                List executionCourseCurricularCoursesList = getInfoCurricularCourses(professorship.getExecutionCourse());

                DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

                Boolean isResponsible = Boolean.valueOf(professorship.getResponsibleFor());

                if ((teacherType.intValue() == 1) && (!isResponsible.booleanValue())) {
                    return null;
                }
View Full Code Here

        List detailedProfessorshipList = (List) CollectionUtils.collect(professorships, new Transformer() {

            @Override
            public Object transform(Object input) {

                Professorship professorship = (Professorship) input;

                InfoProfessorship infoProfessorShip = InfoProfessorship.newInfoFromDomain(professorship);

                List executionCourseCurricularCoursesList = getInfoCurricularCourses(professorship.getExecutionCourse());

                DetailedProfessorship detailedProfessorship = new DetailedProfessorship();

                Boolean isResponsible = Boolean.valueOf(professorship.getResponsibleFor());

                if ((teacherType.intValue() == 1) && (!isResponsible.booleanValue())) {
                    return null;
                }
View Full Code Here

public class ListExecutionCourseTeachersToShowSummariesInDepartmentAdmOfficeProvider implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        ExecutionCourse executionCourse = ((ShowSummariesBean) source).getExecutionCourse();
        Professorship professorshipLogged = ((ShowSummariesBean) source).getProfessorshipLogged();
        List<SummaryTeacherBean> teachers = new ArrayList<SummaryTeacherBean>();
        if (executionCourse != null && professorshipLogged != null) {
            teachers.add(teachers.size(), new SummaryTeacherBean(professorshipLogged));
            teachers.add(teachers.size(), new SummaryTeacherBean(Boolean.TRUE));
        }
View Full Code Here

    }

    private static void copyProfessorships(final ExecutionCourse executionCourseFrom, final ExecutionCourse executionCourseTo)
            throws MaxResponsibleForExceed, InvalidCategory {
        for (; !executionCourseFrom.getProfessorshipsSet().isEmpty();) {
            final Professorship professorship = executionCourseFrom.getProfessorshipsSet().iterator().next();
            Professorship otherProfessorship = findProfessorShip(executionCourseTo, professorship.getPerson());
            if (otherProfessorship == null) {
                otherProfessorship =
                        Professorship.create(professorship.getResponsibleFor(), executionCourseTo, professorship.getPerson(),
                                professorship.getHours());
            }
            for (; !professorship.getAssociatedSummariesSet().isEmpty(); otherProfessorship.addAssociatedSummaries(professorship
                    .getAssociatedSummariesSet().iterator().next())) {
                ;
            }
            for (; !professorship.getAssociatedShiftProfessorshipSet().isEmpty(); otherProfessorship
                    .addAssociatedShiftProfessorship(professorship.getAssociatedShiftProfessorshipSet().iterator().next())) {
                ;
            }
        }
    }
View Full Code Here

            final ExecutionCourse executionCourse = bibliographicReference.getExecutionCourse();
            final Iterator associatedProfessorships = teacher.getProfessorshipsIterator();
            // Check if Teacher has a professorship to ExecutionCourse
            // BibliographicReference
            while (associatedProfessorships.hasNext()) {
                Professorship professorship = (Professorship) associatedProfessorships.next();
                if (professorship.getExecutionCourse().equals(executionCourse)) {
                    result = true;
                    break;
                }
            }
        }
View Full Code Here

        if (executionCourseID == null) {
            return false;
        }
        try {
            Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());
            Professorship professorship = null;
            if (teacher != null) {
                ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
                professorship = teacher.getProfessorshipByExecutionCourse(executionCourse);
            }
            return professorship != null;
View Full Code Here

            return false;
        }
        try {

            Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());
            Professorship professorship = null;
            if (teacher != null) {
                ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
                teacher.getProfessorshipByExecutionCourse(executionCourse);
            }
            return professorship != null;
View Full Code Here

            new CourseLoad(destinationExecutionCourse, courseLoad.getType(), courseLoad.getUnitQuantity(),
                    courseLoad.getTotalQuantity());
        }

        for (final Professorship professorship : originExecutionCourse.getProfessorshipsSet()) {
            final Professorship newProfessorship = new Professorship();
            newProfessorship.setExecutionCourse(destinationExecutionCourse);
            newProfessorship.setPerson(professorship.getPerson());
            newProfessorship.setResponsibleFor(professorship.getResponsibleFor());
            professorship.getPermissions().copyPremissions(newProfessorship);
            destinationExecutionCourse.getProfessorshipsSet().add(newProfessorship);
        }

        return destinationExecutionCourse;
View Full Code Here

TOP

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

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.