Package org.fenixedu.academic.ui.struts.action.student.thesis

Examples of org.fenixedu.academic.ui.struts.action.student.thesis.ThesisFileBean


    public ActionForward showSubstituteDocumentsPage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final Thesis thesis = getThesis(request);
        final ThesisFile thesisFile = thesis.getDissertation();
        final ThesisFileBean thesisFileBean = new ThesisFileBean();
        thesisFileBean.setTitle(thesisFile.getTitle());
        thesisFileBean.setSubTitle(thesisFile.getSubTitle());
        thesisFileBean.setLanguage(thesisFile.getLanguage());
        request.setAttribute("fileBean", thesisFileBean);
        request.setAttribute("showSubstituteDocumentsPage", Boolean.TRUE);
        return viewThesis(mapping, actionForm, request, response);
    }
View Full Code Here


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

    public ActionForward showSubstituteExtendedAbstractPage(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        final ThesisFileBean thesisFileBean = new ThesisFileBean();
        request.setAttribute("fileBean", thesisFileBean);
        request.setAttribute("showSubstituteExtendedAbstractPage", Boolean.TRUE);
        return viewThesis(mapping, actionForm, request, response);
    }
View Full Code Here

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

    public ActionForward substituteDocuments(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ThesisFileBean bean = getRenderedObject();
        RenderUtils.invalidateViewState();

        if (bean != null && bean.getFile() != null) {
            byte[] bytes = ByteStreams.toByteArray(bean.getFile());
            CreateThesisDissertationFile.runCreateThesisDissertationFile(getThesis(request), bytes, bean.getSimpleFileName(),
                    bean.getTitle(), bean.getSubTitle(), bean.getLanguage());
        }

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

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

    public ActionForward substituteExtendedAbstract(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ThesisFileBean bean = getRenderedObject();
        RenderUtils.invalidateViewState();

        if (bean != null && bean.getFile() != null) {
            byte[] bytes = ByteStreams.toByteArray(bean.getFile());
            CreateThesisAbstractFile.runCreateThesisAbstractFile(getThesis(request), bytes, bean.getSimpleFileName(),
                    bean.getTitle(), bean.getSubTitle(), bean.getLanguage());
        }

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

    private ActionForward showThesisDetails(final ActionMapping mapping, final HttpServletRequest request, final Thesis thesis)
            throws Exception {
        if (!thesis.areThesisFilesReadable()) {
            final ThesisFile thesisFile = thesis.getDissertation();
            if (thesisFile != null) {
                final ThesisFileBean thesisDissertationFileBean = new ThesisFileBean();
                thesisDissertationFileBean.setTitle(thesisFile.getTitle());
                thesisDissertationFileBean.setSubTitle(thesisFile.getSubTitle());
                thesisDissertationFileBean.setLanguage(thesisFile.getLanguage());
                request.setAttribute("thesisDissertationFileBean", thesisDissertationFileBean);

                final ThesisFileBean thesisExtendendAbstractFileBean = new ThesisFileBean();
                request.setAttribute("thesisExtendendAbstractFileBean", thesisExtendendAbstractFileBean);
            }
        }
        request.setAttribute("thesis", thesis);
        return mapping.findForward("showThesisDetails");
View Full Code Here

    }

    public ActionForward substituteDocument(final ActionMapping mapping, final HttpServletRequest request,
            final boolean dissertationFile) throws Exception {
        final Thesis thesis = getDomainObject(request, "thesisOid");
        ThesisFileBean bean = getRenderedObject();
        RenderUtils.invalidateViewState();

        if (bean != null && bean.getFile() != null) {
            byte[] bytes = ByteStreams.toByteArray(bean.getFile());
            if (dissertationFile) {
                CreateThesisDissertationFile.runCreateThesisDissertationFile(thesis, bytes, bean.getSimpleFileName(),
                        bean.getTitle(), bean.getSubTitle(), bean.getLanguage());
            } else {
                CreateThesisAbstractFile.runCreateThesisAbstractFile(thesis, bytes, bean.getSimpleFileName(), bean.getTitle(),
                        bean.getSubTitle(), bean.getLanguage());
            }
        }

        return showThesisDetails(mapping, request, thesis);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.ui.struts.action.student.thesis.ThesisFileBean

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.