Package org.fenixedu.academic.domain.phd.email

Examples of org.fenixedu.academic.domain.phd.email.PhdProgramEmailBean


        if (!PhdProgramEmailBean.class.isAssignableFrom(beanObject.getClass())) {
            throw new JspException("Specified bean does not correspond to a " + PhdProgramEmailBean.class.getSimpleName());
        }
        PredicateContainer<PhdIndividualProgramProcess> predicateContainer =
                (PredicateContainer<PhdIndividualProgramProcess>) predicateContainerObject;
        PhdProgramEmailBean bean = (PhdProgramEmailBean) beanObject;
        AndPredicate<PhdIndividualProgramProcess> searchPredicate = new AndPredicate<PhdIndividualProgramProcess>();
        searchPredicate.add(bean.getManagedPhdProgramsPredicate());
        searchPredicate.add(predicateContainer.getPredicate());

        List<PhdIndividualProgramProcess> processList = PhdIndividualProgramProcess.search(searchPredicate);

        int scope = (getScope() == null) ? PageContext.REQUEST_SCOPE : ScopeIntsMap.get(getScope());
View Full Code Here


    // manage emails

    public ActionForward managePhdEmails(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramEmailBean bean = new PhdProgramEmailBean();
        List<PhdProgram> coordinatedPrograms = getCoordinatedPhdPrograms();
        if (coordinatedPrograms.size() == 1) {
            bean.setPhdProgram(coordinatedPrograms.iterator().next());
            bean.setShowProgramsChoice(false);
        }

        request.setAttribute("phdEmailBean", bean);
        return mapping.findForward("managePhdEmails");
    }
View Full Code Here

        return mapping.findForward("managePhdEmails");
    }

    public ActionForward choosePhdEmailRecipients(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        PhdProgramEmailBean bean = getRenderedObject("phdEmailBean");

        if (bean == null) {
            bean = new PhdProgramEmailBean((PhdProgram) getDomainObject(request, "phdProgramId"));
        } else {
            setSelectedIndividualProcesses((PhdEmailProgramForm) form, bean);
        }

        request.setAttribute("phdEmailBean", bean);
View Full Code Here

        return mapping.findForward("choosePhdEmailRecipients");
    }

    public ActionForward prepareSendPhdEmail(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramEmailBean bean = getRenderedObject("phdEmailBean");

        List<PhdIndividualProgramProcess> selectedIndividual = retrieveSelectedProcesses((PhdEmailProgramForm) form);
        bean.setSelectedElements(selectedIndividual);

        request.setAttribute("phdEmailBean", bean);

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

    }

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

        final PhdProgramEmailBean bean = getRenderedObject("phdEmailBean");

        try {

            PhdProgramEmail.validateEmailBean(bean);

        } catch (final DomainException e) {
            addErrorMessage(request, e.getMessage(), e.getArgs());
            request.setAttribute("phdEmailBean", bean);
            return mapping.findForward("prepareSendPhdEmail");
        }

        bean.updateBean();
        request.setAttribute("phdEmailBean", getRenderedObject("phdEmailBean"));

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

    }

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

        PhdProgramEmailBean bean = getRenderedObject("phdEmailBean");
        PhdProgramEmail.createEmail(bean);

        RenderUtils.invalidateViewState("phdEmailBean");

        request.setAttribute("phdEmailBean", new PhdProgramEmailBean());
        return mapping.findForward("managePhdEmails");
    }
View Full Code Here

    }

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

        PhdProgramEmailBean bean = new PhdProgramEmailBean(getPhdEmail(request));
        request.setAttribute("phdEmailBean", bean);

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

TOP

Related Classes of org.fenixedu.academic.domain.phd.email.PhdProgramEmailBean

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.