Package org.fenixedu.bennu.core.groups

Examples of org.fenixedu.bennu.core.groups.Group


    private static boolean isMemberOfDegreeCurricularPlansGroup(Person person) {
        Collection<DegreeCurricularPlan> degreeCurricularPlans = DegreeCurricularPlan.readNotEmptyDegreeCurricularPlans();

        for (DegreeCurricularPlan plan : degreeCurricularPlans) {
            Group curricularPlanMembersGroup = plan.getCurricularPlanMembersGroup();
            if (curricularPlanMembersGroup != null) {
                return curricularPlanMembersGroup.isMember(person.getUser());
            }
        }

        return false;
    }
View Full Code Here


        return false;
    }

    private static boolean isMemberOfCompetenceCourseGroup(CompetenceCourse competenceCourse, Person person) {
        Group competenceCourseMembersGroup =
                competenceCourse.getDepartmentUnit().getDepartment().getCompetenceCourseMembersGroup();
        if (competenceCourseMembersGroup != null) {
            return competenceCourseMembersGroup.isMember(person.getUser());
        }
        return false;
    }
View Full Code Here

        final OutboundMobilityCandidacyContestGroup mobilityGroup = getDomainObject(request, "mobilityGroupOid");

        final String toGroupName =
                BundleUtil.getString(Bundle.ACADEMIC, "label.send.email.to.candidates.group.to.name",
                        mobilityGroup.getDescription(), period.getExecutionInterval().getName());
        final Group group = UnionGroup.of(getCandidateGroups(mobilityGroup, period));

        final Recipient recipient = Recipient.newInstance(toGroupName, group);
        final EmailBean bean = new EmailBean();
        bean.setRecipients(Collections.singletonList(recipient));
View Full Code Here

    }

    public ActionForward sendEmail(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        ExecutionCourse executionCourse;
        Group studentsGroup = null;
        String label;
        Sender sender;
        SearchExecutionCourseAttendsBean bean = getRenderedObject("mailViewState");
        if (bean != null) {
            executionCourse = bean.getExecutionCourse();
View Full Code Here

    }

    public ActionForward prepareMarkSheetsToConfirmSendMail(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        MarkSheetSendMailBean bean = (MarkSheetSendMailBean) RenderUtils.getViewState("sendMailBean").getMetaObject().getObject();
        Group teachersGroup = TeachersWithMarkSheetsToConfirmGroup.get(bean.getExecutionPeriod(), bean.getDegreeCurricularPlan());
        String message = getResources(request, "ACADEMIC_OFFICE_RESOURCES").getMessage("label.markSheets.to.confirm.send.mail");
        Recipient recipient = Recipient.newInstance(message, teachersGroup);
        UnitBasedSender sender = bean.getDegree().getAdministrativeOffice().getUnit().getUnitBasedSenderSet().iterator().next();
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

    }

    public ActionForward prepareGradesToSubmitSendMail(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        MarkSheetSendMailBean bean = (MarkSheetSendMailBean) RenderUtils.getViewState("sendMailBean").getMetaObject().getObject();
        Group teachersGroup = TeachersWithGradesToSubmitGroup.get(bean.getExecutionPeriod(), bean.getDegreeCurricularPlan());
        String message = getResources(request, "ACADEMIC_OFFICE_RESOURCES").getMessage("label.grades.to.submit.send.mail");
        Recipient recipient = Recipient.newInstance(message, teachersGroup);
        UnitBasedSender sender =
                AdministrativeOffice.readDegreeAdministrativeOffice().getUnit().getUnitBasedSenderSet().iterator().next();
        return EmailsDA.sendEmail(request, sender, recipient);
View Full Code Here

    }

    @EntryPoint
    public ActionForward residencePersonsManagement(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        Group role = getResidenceRoleManagement();
        request.setAttribute("role", role);
        request.setAttribute("residenceRoleManagement", getResidenceRoleManagementBean());
        return mapping.findForward("residenceRoleManagement");
    }
View Full Code Here

            HttpServletResponse response) throws Exception {
        String executionCourseCode = request.getParameter("executionCourseID");
        String studentGroupCode = request.getParameter("studentGroupCode");
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseCode);
        StudentGroup studentGroup = FenixFramework.getDomainObject(studentGroupCode);
        Group groupToSend = StudentGroupGroup.get(studentGroup);
        Sender sender = ExecutionCourseSender.newInstance(executionCourse);
        final String label =
                getResources(request, "APPLICATION_RESOURCES").getMessage("label.students.group.send.email",
                        studentGroup.getGroupNumber(), studentGroup.getGrouping().getName());
        Recipient recipient = Recipient.newInstance(label, groupToSend);
View Full Code Here

            HttpServletResponse response) throws Exception {
        String executionCourseCode = request.getParameter("executionCourseID");
        String groupingCode = request.getParameter("groupingCode");
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseCode);
        Grouping grouping = FenixFramework.getDomainObject(groupingCode);
        Group groupToSend = GroupingGroup.get(grouping);
        Sender sender = ExecutionCourseSender.newInstance(executionCourse);
        final String label =
                getResources(request, "APPLICATION_RESOURCES").getMessage("label.students.grouping.send.email",
                        grouping.getName());
        Recipient recipient = Recipient.newInstance(label, groupToSend);
View Full Code Here

                HtmlInlineContainer container = new HtmlInlineContainer();

                if (object instanceof UnionGroup) {
                    container.addChild(processUnionGroup((UnionGroup) object));
                } else {
                    Group group = (Group) object;
                    container.addChild(new HtmlText(group.getPresentationName()));
                }

                return container;
            }
View Full Code Here

TOP

Related Classes of org.fenixedu.bennu.core.groups.Group

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.