Package org.fenixedu.academic.domain.candidacyProcess.erasmus

Examples of org.fenixedu.academic.domain.candidacyProcess.erasmus.ApprovedLearningAgreementDocumentFile


        return mapping.findForward("");
    }

    public ActionForward retrieveApprovedLearningAgreement(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final ApprovedLearningAgreementDocumentFile file = getDomainObject(request, "agreementId");
        final String hash = request.getParameter("hash");

        final MobilityIndividualApplicationProcess process = file.getProcess();
        final DegreeOfficePublicCandidacyHashCode candidacyHashCode = process.getCandidacyHashCode();
        if (candidacyHashCode.getValue().equals(hash)) {
            final byte[] content = file.getContent();
            response.setContentLength(content.length);
            response.setContentType("application/pdf");
            response.addHeader("Content-Disposition", "attachment; filename=" + file.getFilename());

            final ServletOutputStream writer = response.getOutputStream();
            writer.write(content);
            writer.flush();
            writer.close();
View Full Code Here


        List<ApprovedLearningAgreementDocumentFile> activeDocuments = new ArrayList<ApprovedLearningAgreementDocumentFile>();
        CollectionUtils.select(getApprovedLearningAgreementsSet(), new Predicate() {

            @Override
            public boolean evaluate(Object arg0) {
                ApprovedLearningAgreementDocumentFile document = (ApprovedLearningAgreementDocumentFile) arg0;
                return document.getCandidacyFileActive();
            }

        }, activeDocuments);

        return activeDocuments;
View Full Code Here

        return mapping.findForward("view-approved-learning-agreements");
    }

    public ActionForward markApprovedLearningAgreementAsViewed(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        ApprovedLearningAgreementDocumentFile file =
                FenixFramework.getDomainObject(request.getParameter("approvedLearningAgreementId"));
        file.markLearningAgreementViewed();

        return prepareExecuteViewApprovedLearningAgreements(mapping, actionForm, request, response);
    }
View Full Code Here

        return prepareExecuteViewApprovedLearningAgreements(mapping, actionForm, request, response);
    }

    public ActionForward markApprovedLearningAgreementAsSent(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        ApprovedLearningAgreementDocumentFile file =
                FenixFramework.getDomainObject(request.getParameter("approvedLearningAgreementId"));
        file.markLearningAgreementSent();

        return prepareExecuteViewApprovedLearningAgreements(mapping, actionForm, request, response);
    }
View Full Code Here

        return prepareExecuteVisualizeAlerts(mapping, actionForm, request, response);
    }

    public ActionForward sendEmailToAcceptedStudent(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {
        ApprovedLearningAgreementDocumentFile file =
                FenixFramework.getDomainObject(request.getParameter("approvedLearningAgreementId"));
        executeActivity(getProcess(request), "SendEmailToAcceptedStudent", null);

        return prepareExecuteViewApprovedLearningAgreements(mapping, actionForm, request, response);
    }
View Full Code Here

        return mapping.findForward("");
    }

    public ActionForward revokeApprovedLearningAgreement(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {
        ApprovedLearningAgreementDocumentFile file =
                FenixFramework.getDomainObject(request.getParameter("approvedLearningAgreementId"));
        CandidacyProcessDocumentUploadBean documentBean = new CandidacyProcessDocumentUploadBean();
        documentBean.setDocumentFile(file);

        executeActivity(getProcess(request), "RevokeDocumentFile", documentBean);
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.candidacyProcess.erasmus.ApprovedLearningAgreementDocumentFile

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.