Examples of ErrorTemplate


Examples of org.glassfish.jersey.server.mvc.ErrorTemplate

        final ResourceMethod matchedResourceMethod = uriInfo.getMatchedResourceMethod();

        if (matchedResourceMethod != null) {
            final Invocable invocable = matchedResourceMethod.getInvocable();

            ErrorTemplate errorTemplate = invocable.getHandlingMethod().getAnnotation(ErrorTemplate.class);
            if (errorTemplate == null) {
                Class<?> handlerClass = invocable.getHandler().getHandlerClass();

                if (invocable.isInflector() && TemplateInflector.class.isAssignableFrom(invocable.getHandler().getHandlerClass
                        ())) {
View Full Code Here

Examples of org.glassfish.jersey.server.mvc.ErrorTemplate

        return null;
    }

    @Override
    public final Response toResponse(final T throwable) {
        final ErrorTemplate error = getErrorTemplate();
        final String templateName = "".equals(error.name()) ? "index" : error.name();

        return Response
                .status(getErrorStatus(throwable))
                .entity(new Viewable(templateName, getErrorModel(throwable)))
                .build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.