Package org.fenixedu.academic.domain.phd

Examples of org.fenixedu.academic.domain.phd.PhdProgramProcessDocument


    }

    public ActionForward removeDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramCandidacyProcess process = getProcess(request);
        final PhdProgramProcessDocument document = getDomainObject(request, "documentId");

        try {
            ExecuteProcessActivity.run(process,
                    org.fenixedu.academic.domain.phd.candidacy.activities.RemoveCandidacyDocument.class, document);
            addSuccessMessage(request, "message.documents.uploaded.with.success");
View Full Code Here


        return prepareUploadDocuments(mapping, form, request, response);
    }

    public ActionForward removeDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final PhdProgramProcessDocument document = getDomainObject(request, "documentId");
        final PhdProgramCandidacyProcess process = (PhdProgramCandidacyProcess) document.getPhdProgramProcess();
        final PhdProgramCandidacyProcessBean bean = new PhdProgramCandidacyProcessBean(process);
        try {
            ExecuteProcessActivity.run(process,
                    org.fenixedu.academic.domain.phd.candidacy.activities.RemoveCandidacyDocument.class, document);
            addSuccessMessage(request, "message.documents.uploaded.with.success");
View Full Code Here

    public Set<PhdProgramProcessDocument> getSharedDocumentsContent() {
        final Set<PhdProgramProcessDocument> result = new HashSet<PhdProgramProcessDocument>();

        for (final PhdIndividualProgramDocumentType type : getSortedSharedDocumentTypes()) {
            if (type.isVersioned()) {
                final PhdProgramProcessDocument document = getCandidacyProcess().getLatestDocumentVersionFor(type);
                if (document != null) {
                    result.add(document);
                }
            }
        }
View Full Code Here

            documents.add(document);
        }
    }

    private PhdProgramProcessDocument getCV() {
        final PhdProgramProcessDocument cv = getLatestDocumentVersionFor(PhdIndividualProgramDocumentType.CV);
        return (cv != null) ? cv : getCandidacyProcess().getLatestDocumentVersionFor(PhdIndividualProgramDocumentType.CV);
    }
View Full Code Here

    }

    @Override
    protected PhdProgramCandidacyProcess executeActivity(PhdProgramCandidacyProcess process, User userView, Object object) {
        PhdProgramProcessDocument document = (PhdProgramProcessDocument) object;

        document.delete();

        return process;
    }
View Full Code Here

        throw new PreConditionNotValidException();
    }

    @Override
    protected PhdProgramCandidacyProcess executeActivity(PhdProgramCandidacyProcess process, User userView, Object object) {
        PhdProgramProcessDocument phdDocument = (PhdProgramProcessDocument) object;

        phdDocument.removeFromProcess();

        return process;
    }
View Full Code Here

    protected boolean isToDiscard() {
        if (getFireDate() != null) {
            return true;
        }

        PhdProgramProcessDocument feedbackDocument =
                getProcess().getLatestDocumentVersionFor(PhdIndividualProgramDocumentType.JURY_REPORT_FEEDBACK);
        if (feedbackDocument != null && feedbackDocument.getUploadTime().isAfter(getWhenCreated())) {
            return true;
        }

        return false;
    }
View Full Code Here

    }

    @Override
    protected PhdThesisProcess executeActivity(PhdThesisProcess process, User userView, Object object) {
        PhdProgramDocumentUploadBean documentBean = (PhdProgramDocumentUploadBean) object;
        PhdProgramProcessDocument document = process.getLatestDocumentVersionFor(documentBean.getType());

        document.replaceDocument(documentBean.getType(), documentBean.getRemarks(), documentBean.getFileContent(),
                documentBean.getFilename(), AccessControl.getPerson());

        return process;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.phd.PhdProgramProcessDocument

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.