Package org.fenixedu.academic.domain.thesis

Examples of org.fenixedu.academic.domain.thesis.ThesisFile


    @Override
    protected void fillThesisInfo() {
        Thesis thesis = getThesis();

        ThesisFile file = thesis.getDissertation();
        if (file != null) {
            addParameter("thesisTitle", file.getTitle());
            addParameter("thesisSubtitle", neverNull(file.getSubTitle()));
            addParameter("thesisLanguage", getLanguage(file));
        } else {
            addParameter("thesisTitle", thesis.getTitle().getContent());
            addParameter("thesisSubtitle", EMPTY_STR);
            addParameter("thesisLanguage", EMPTY_STR);
View Full Code Here


    }

    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

    }

    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);
            }
View Full Code Here

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        Group commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group thesisGroup = ThesisReadersGroup.get(thesis);
        final Group permittedGroup = scientificCouncil.or(commissionMembers).or(thesisGroup);

        ThesisFile file = new ThesisFile(fileName, fileName, bytes, permittedGroup);

        updateThesis(thesis, file, title, subTitle, language, fileName, bytes);

        return file;
    }
View Full Code Here

public class CreateThesisDissertationFile extends CreateThesisFile {

    @Override
    protected void removePreviousFile(Thesis thesis) {
        ThesisFile dissertation = thesis.getDissertation();
        if (dissertation != null) {
            if (Authenticate.getUser().getPerson().hasRole(RoleType.SCIENTIFIC_COUNCIL)) {
                dissertation.deleteWithoutStateCheck();
            } else {
                dissertation.delete();
            }
        }
    }
View Full Code Here

public class MakeThesisDocumentsUnavailable {

    @Atomic
    public static void run(Thesis thesis) {
        final ThesisFile thesisFile = thesis.getDissertation();

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        ScientificCommissionGroup commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group student = thesis.getStudent().getPerson().getPersonGroup();

        thesisFile.setPermittedGroup(scientificCouncil.or(commissionMembers).or(student));
    }
View Full Code Here

public class MakeThesisDocumentsAvailable {

    @Atomic
    public static void run(Thesis thesis) {
        final ThesisFile thesisFile = thesis.getDissertation();

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        Group commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group student = thesis.getStudent().getPerson().getPersonGroup();
        Group thesisGroup = ThesisReadersGroup.get(thesis);

        thesisFile.setPermittedGroup(scientificCouncil.or(commissionMembers).or(student).or(thesisGroup));
    }
View Full Code Here

public class CreateThesisAbstractFile extends CreateThesisFile {

    @Override
    protected void removePreviousFile(Thesis thesis) {
        ThesisFile extendedAbstract = thesis.getExtendedAbstract();
        if (extendedAbstract != null) {
            if (Authenticate.getUser().getPerson().hasRole(RoleType.SCIENTIFIC_COUNCIL)) {
                extendedAbstract.deleteWithoutStateCheck();
            } else {
                extendedAbstract.delete();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.thesis.ThesisFile

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.