}
@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);
}