Package org.fenixedu.academic.domain.serviceRequests

Examples of org.fenixedu.academic.domain.serviceRequests.AcademicServiceRequest


            HttpServletResponse response) {
        return mapping.findForward("entryPoint");
    }

    private RegistrationAcademicServiceRequest getAndSetAcademicServiceRequest(final HttpServletRequest request) {
        final AcademicServiceRequest academicServiceRequest = getDomainObject(request, "academicServiceRequestId");
        request.setAttribute("academicServiceRequest", academicServiceRequest);
        return (RegistrationAcademicServiceRequest) academicServiceRequest;
    }
View Full Code Here


    }

    public ActionForward viewAcademicServiceRequest(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final AcademicServiceRequest serviceRequest = getAndSetAcademicServiceRequest(request);
        getAndSetUrl(form, request);

        request.setAttribute("canRevertToProcessingState", canRevertToProcessingState(serviceRequest));
        request.setAttribute("serviceRequestSituations", getAcademicServiceRequestSituations(serviceRequest));
View Full Code Here

    }

    @Atomic
    public ActionForward revertRequestToProcessingState(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final AcademicServiceRequest academicServiceRequest = getAndSetAcademicServiceRequest(request);
        getAndSetUrl(form, request);
        request.setAttribute("canRevertToProcessingState", canRevertToProcessingState(academicServiceRequest));

        try {
            academicServiceRequest.revertToProcessingState();
        } catch (DomainException ex) {
            addActionMessage(request, ex.getMessage(), ex.getArgs());
        }

        return mapping.findForward("viewAcademicServiceRequest");
View Full Code Here

    private Collection<AcademicServiceRequest> getAndRemoveSpecificRequests(final AcademicServiceRequestBean bean,
            final Collection<AcademicServiceRequest> remainingRequests) {
        final Collection<AcademicServiceRequest> result = new HashSet<AcademicServiceRequest>();

        for (Iterator<AcademicServiceRequest> iter = remainingRequests.iterator(); iter.hasNext();) {
            final AcademicServiceRequest academicServiceRequest = iter.next();
            if (bean.getAcademicServiceRequestSituationType() == AcademicServiceRequestSituationType.NEW) {
                if (academicServiceRequest.getActiveSituation().getCreator() == null
                        || academicServiceRequest.getActiveSituation().getCreator().equals(academicServiceRequest.getPerson())) {
                    iter.remove();
                    result.add(academicServiceRequest);
                }
            } else {
                if (AccessControl.getPerson().equals(academicServiceRequest.getActiveSituation().getCreator())) {
                    iter.remove();
                    result.add(academicServiceRequest);
                }
            }
        }
View Full Code Here

    protected IDocumentRequest getDocumentRequest(HttpServletRequest request) {
        return (IDocumentRequest) getDomainObject(request, "documentRequestId");
    }

    private AcademicServiceRequest getAndSetAcademicServiceRequest(final HttpServletRequest request) {
        final AcademicServiceRequest academicServiceRequest = getDomainObject(request, "academicServiceRequestId");
        request.setAttribute("academicServiceRequest", academicServiceRequest);
        return academicServiceRequest;
    }
View Full Code Here

    }

    public ActionForward cancelAcademicServiceRequest(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        final AcademicServiceRequest academicServiceRequest = getAndSetAcademicServiceRequest(request);
        final String justification = ((DynaActionForm) actionForm).getString("justification");
        try {
            academicServiceRequest.cancel(justification);
        } catch (DomainExceptionWithLabelFormatter ex) {
            addActionMessage(request, ex.getKey(), solveLabelFormatterArgs(request, ex.getLabelFormatterArgs()));
            return mapping.findForward("prepareCancelAcademicServiceRequest");
        } catch (DomainException ex) {
            addActionMessage(request, ex.getKey());
View Full Code Here

        return mapping.findForward("cancelSuccess");
    }

    private AcademicServiceRequest getAndSetAcademicServiceRequest(final HttpServletRequest request) {
        final AcademicServiceRequest academicServiceRequest =
                FenixFramework.getDomainObject(request.getParameter("academicServiceRequestId"));
        request.setAttribute("academicServiceRequest", academicServiceRequest);
        return academicServiceRequest;
    }
View Full Code Here

    }

    @Atomic
    public ActionForward delayRequest(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        AcademicServiceRequest document = getDomainObject(request, "academicServiceRequestOid");
        request.setAttribute("batchOid", document.getRectorateSubmissionBatch().getExternalId());
        if (document.isPiggyBackedOnRegistry()) {
            addActionMessage(request, "error.rectorateSubmissionBatch.cannotDelayPiggyBackedDocument");
        } else {
            RectorateSubmissionBatch target = document.getRectorateSubmissionBatch();
            while (!target.isUnsent()) {
                target = target.getNextRectorateSubmissionBatch();
            }
            if (document.isRegistryDiploma()) {
                IRegistryDiplomaRequest registry = (IRegistryDiplomaRequest) document;
                ((AcademicServiceRequest) registry.getDiplomaSupplement()).setRectorateSubmissionBatch(target);
            }
            document.setRectorateSubmissionBatch(target);
        }
        return viewBatch(mapping, actionForm, request, response);
    }
View Full Code Here

    }

    @Override
    protected Money doCalculationForAmountToPay(Event event, DateTime when, boolean applyDiscount) {
        AcademicServiceRequestEvent academicServiceRequestEvent = (AcademicServiceRequestEvent) event;
        AcademicServiceRequest academicServiceRequest = academicServiceRequestEvent.getAcademicServiceRequest();

        return super.doCalculationForAmountToPay(academicServiceRequestEvent, when, applyDiscount).multiply(
                academicServiceRequest.isUrgentRequest() ? 2 : 1);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.serviceRequests.AcademicServiceRequest

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.