Package eu.lsem.bakalarka.webfrontend.customresolution

Examples of eu.lsem.bakalarka.webfrontend.customresolution.CustomErrorResolution


     * @param request
     * @param response
     * @return
     */
    public Resolution handleActionBeanNotFoundException(ActionBeanNotFoundException e, HttpServletRequest request, HttpServletResponse response) {
        return new CustomErrorResolution(404);
    }
View Full Code Here


    }


    public Resolution handleException(Exception e, HttpServletRequest request, HttpServletResponse response) {
        log.error("Chyba zachycena ve Stripes exception handleru", e);
        return new CustomErrorResolution(500, e.getMessage());
    }
View Full Code Here

    @DefaultHandler
    public Resolution form() {
        thesis = thesesDao.getThesis(id, null);
        if (thesis == null)
            return new CustomErrorResolution(404);
        return new ForwardResolution("/WEB-INF/pages/secure/editThesisMetadata.jsp");
    }
View Full Code Here

    }

    @DefaultHandler
    public Resolution moveThesisToDirectory() {
        final int result = thesesDao.updateParentDirectory(thesisId, directoryId);
        return (result==0 ? new CustomErrorResolution(400) : new TextResolution("OK"));
    }
View Full Code Here

    }

    @Before(on = {"downloadDocument", "getParsedText"}, stages = LifecycleStage.EventHandling)
    public Resolution interceptor1() {
        if (!fileSystemUtils.isPathSafe(documentPath))
            return new CustomErrorResolution(403);
        return null;
    }
View Full Code Here

            StreamingResolution res = new StreamingResolution(null, new FileInputStream(f));
            res.setFilename(f.getName());
            res.setCharacterEncoding("UTF-8");
            return res;
        } catch (FileNotFoundException e) {
            return new CustomErrorResolution(404);
        }
    }
View Full Code Here

     * @return
     */
    @DefaultHandler
    public Resolution saveThesisFulltext() {
        if (id == null || documentPath == null) {
            return new CustomErrorResolution(404);
        }

        final String file = thesesService.getDipstoreResourceAbsolutePath(documentPath);
        final String text = thesesService.parseDocument(file);
        String relativeThesisPath = thesesDao.getThesis(id, null).getRelativeThesisPath();
View Full Code Here

    }


    public Resolution deleteThesisFulltext() {
        if (id == null)
            return new CustomErrorResolution(404);
        thesesDao.updateThesisFulltext(id, null, null);
        chartGenerator.setRegenerate();
        return new RedirectResolution(ThesisDetailActionBean.class).addParameter("id", id);
    }
View Full Code Here

TOP

Related Classes of eu.lsem.bakalarka.webfrontend.customresolution.CustomErrorResolution

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.