Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.QueueJob


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

    public ActionForward cancelQueueJob(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        QueueJob job = getDomainObject(request, "queueJobId");
        job.cancel();

        return listReports(mapping, form, request, response);
    }
View Full Code Here


        return mapping.findForward("undoneQueueJobs");
    }

    public ActionForward resendQueuedJob(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        QueueJob job = getDomainObject(request, "id");
        job.resend();

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

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

    public ActionForward cancelQueuedJob(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        QueueJob job = getDomainObject(request, "id");
        job.cancel();

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

    }

    @Override
    public void runTask() {
        final Set<QueueJob> undoneJobs = Bennu.getInstance().getQueueJobUndoneSet();
        final QueueJob queueJob = undoneJobs.isEmpty() ? null : Collections.min(undoneJobs, new QueueComparator());
        if (queueJob != null) {
            try {
                taskLog("Started: %s (%s) requested by %s on %s\n", queueJob.getClass().getName(), queueJob.getExternalId(),
                        getQueueJobResponsibleName(queueJob), queueJob.getRequestDate());
                runJob(queueJob);
                taskLog("Finished Successfully\n");
            } catch (Throwable e) {
                fail(queueJob, e);
                taskLog("Failed %s times\n", queueJob.getFailedCounter());
                throw new Error(e);
            }
        }
    }
View Full Code Here

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

    public ActionForward cancel(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        QueueJob job = getDomainObject(request, "jobId");
        job.cancel();

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

@Mapping(path = "/downloadQueuedJob", module = "")
public class DownloadQueuedJob extends FenixDispatchAction {

    public ActionForward downloadFile(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            final HttpServletResponse httpServletResponse) throws IOException {
        QueueJob queueJob = getDomainObject(request, "id");

        if ((queueJob instanceof QueueJobWithFile) && ((QueueJobWithFile) queueJob).getFile() != null) {
            httpServletResponse.setContentType(((QueueJobWithFile) queueJob).getContentType());
            httpServletResponse.setHeader("Content-disposition", "attachment;filename=" + queueJob.getFilename());
            final OutputStream outputStream = httpServletResponse.getOutputStream();
            outputStream.write(((QueueJobWithFile) queueJob).getFile().getContents());
            outputStream.close();
        }
View Full Code Here

            this.concluded = concluded;
        }

        @Override
        public boolean evaluate(Object object) {
            QueueJob queueJob = (QueueJob) object;
            try {
                PublicRelationsStudentListQueueJob reportJob = (PublicRelationsStudentListQueueJob) queueJob;
                if (this.executionYear == reportJob.getExecutionYear() && this.degreeType == reportJob.getDegreeType()
                        && reportJob.getActive() == active && reportJob.getConcluded() == concluded && elements < 5) {
                    elements++;
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.QueueJob

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.