public ActionForward submitProject(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws FenixActionException, FenixServiceException, IOException {
final IViewState viewState = RenderUtils.getViewState("createProjectSubmission");
final CreateProjectSubmissionBean createProjectSubmissionBean =
(CreateProjectSubmissionBean) viewState.getMetaObject().getObject();
try (InputStream is = createProjectSubmissionBean.getInputStream()) {
byte[] bytes = ByteStreams.toByteArray(is);
try {
CreateProjectSubmission.run(bytes, createProjectSubmissionBean.getFilename(),
createProjectSubmissionBean.getAttends(), createProjectSubmissionBean.getProject(),
createProjectSubmissionBean.getStudentGroup(), createProjectSubmissionBean.getPerson());
} catch (DomainException ex) {
saveActionMessageOnRequest(request, ex.getKey(), ex.getArgs());
return prepareProjectSubmission(mapping, form, request, response);