Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Coordinator


    public ActionForward switchResponsability(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final String coordinatorId = request.getParameter("coordinatorId");
        Coordinator coordinator = FenixFramework.getDomainObject(coordinatorId);

        final String executionDegreeId = request.getParameter("executionDegreeId");
        ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);

        final String personId = request.getParameter("personId");
        final Person personSwitching = FenixFramework.getDomainObject(personId);

        String backPath = request.getParameter("backPath");

        if (coordinator.isResponsible()) {
            coordinator.makeAction(OperationType.CHANGERESPONSIBLE_FALSE, personSwitching);
            // coordinator.setAsNotResponsible();
        } else {
            coordinator.makeAction(OperationType.CHANGERESPONSIBLE_TRUE, personSwitching);
            // coordinator.setAsResponsible();
        }

        ExecutionDegreeCoordinatorsBean coordsBean = new ExecutionDegreeCoordinatorsBean(executionDegree);
        coordsBean.setEscapedBackPath(backPath);
View Full Code Here


    public ActionForward deleteCoordinator(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final String coordinatorId = request.getParameter("coordinatorId");
        Coordinator coordinator = FenixFramework.getDomainObject(coordinatorId);

        final String executionDegreeId = request.getParameter("executionDegreeId");
        ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);

        final String personId = request.getParameter("personId");
        final Person personDeleting = FenixFramework.getDomainObject(personId);

        String backPath = request.getParameter("backPath");

        coordinator.makeAction(OperationType.REMOVE, personDeleting);
        // coordinator.setCoordinator(null);

        ExecutionDegreeCoordinatorsBean coordsBean = new ExecutionDegreeCoordinatorsBean(executionDegree);
        coordsBean.setEscapedBackPath(backPath);
        request.setAttribute("coordsBean", coordsBean);
View Full Code Here

        return true;
    }

    private boolean isResponsible(HttpServletRequest request, ExecutionDegree executionDegree) {
        Coordinator coordinator = executionDegree.getCoordinatorByTeacher(getLoggedPerson(request));

        return coordinator != null && coordinator.isResponsible();
    }
View Full Code Here

            final Person person = id.getPerson();
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
            if (executionDegree == null) {
                return false;
            }
            Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);

            result = coordinator != null;

        } catch (Exception e) {
            return false;
View Full Code Here

            deny();
        }

        ExecutionYear executionYear = getSpecificExecutionYear(executionCourseID);

        Coordinator coordinator = coordinators.first();
        ExecutionYear coordinatorExecutionYear = coordinator.getExecutionDegree().getExecutionYear();

        if (executionYear == null || coordinatorExecutionYear.compareTo(executionYear) < 0) {
            deny();
        }
    }
View Full Code Here

            final Person person = id.getPerson();

            ExecutionDegree executionDegree = FenixFramework.getDomainObject(infoExecutionDegreeId);
            ExecutionYear executionYear = executionDegree.getExecutionYear();

            Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);

            result = (coordinator != null) && executionYear.isCurrent();

        } catch (Exception e) {
            return false;
View Full Code Here

        final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
        if (executionDegree == null) {
            throw new FenixServiceException("error.noExecutionDegree");
        }

        final Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);
        if (coordinator == null) {
            Coordinator.createCoordinator(executionDegree, person, Boolean.FALSE);
        }

        return Boolean.TRUE;
View Full Code Here

    @Atomic
    public static void run(String executionDegreeID, List<String> coordinatorsToRemoveIDs) {

        for (final String coordinatorToRemoveID : coordinatorsToRemoveIDs) {
            final Coordinator coordinator = FenixFramework.getDomainObject(coordinatorToRemoveID);
            if (coordinator != null) {
                final Person person = coordinator.getPerson();

                CoordinationTeamLog.createLog(coordinator.getExecutionDegree().getDegree(), coordinator.getExecutionDegree()
                        .getExecutionYear(), Bundle.MESSAGING, "log.degree.coordinationteam.removemember", coordinator
                        .getPerson().getPresentationName(), coordinator.getExecutionDegree().getPresentationName());

                coordinator.delete();
            }
        }
    }
View Full Code Here

        }

        // if user is coordinator and is the current coordinator and
        // curricular course is not basic
        // coordinator can edit
        Coordinator coordinator = executionDegree.getCoordinatorByTeacher(person);
        result =
                Boolean.valueOf((coordinator != null) && executionYear.isCurrent()
                        && curricularCourse.getBasic().equals(Boolean.FALSE));

        return result;
View Full Code Here

        }
        Collection<Coordinator> coordinators = executionDegree.getCoordinatorsListSet();
        Iterator iterator = coordinators.iterator();
        List infoCoordinators = new ArrayList();
        while (iterator.hasNext()) {
            Coordinator coordinator = (Coordinator) iterator.next();
            InfoCoordinator infoCoordinator = InfoCoordinator.newInfoFromDomain(coordinator);
            infoCoordinators.add(infoCoordinator);
        }
        return infoCoordinators;
    }
View Full Code Here

TOP

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

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.