Class HTMLFailureRenderer

java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
com.peterphi.std.guice.web.rest.jaxrs.exception.HTMLFailureRenderer
All Implemented Interfaces:
RestFailureRenderer

public class HTMLFailureRenderer extends XMLFailureRenderer implements RestFailureRenderer
A HTML renderer that will only emit HTML when the caller lists text/html as their primary Accept header value
  • Field Details

    • highlightTerms

      @Inject(optional=true) protected String highlightTerms
      A comma-delimited list of terms that identify highlightable stack trace lines)
    • highlightEnabled

      @Inject(optional=true) protected boolean highlightEnabled
    • enabled

      @Inject(optional=true) protected boolean enabled
    • requireLoggedIn

      @Inject(optional=true) protected boolean requireLoggedIn
    • requireRole

      @Inject(optional=true) protected String requireRole
    • jvmInfoEnabled

      @Inject(optional=true) protected boolean jvmInfoEnabled
    • jvmInfoEnvironmentVariablesEnabled

      @Inject(optional=true) protected boolean jvmInfoEnvironmentVariablesEnabled
    • requestInfoEnabled

      @Inject(optional=true) protected boolean requestInfoEnabled
    • stackTraceEnabled

      @Inject(optional=true) protected boolean stackTraceEnabled
    • jiraEnabled

      @Inject(optional=true) protected boolean jiraEnabled
      If true, a "Create Issue" link will be available
    • jiraProjectId

      @Inject(optional=true) protected int jiraProjectId
      If non-zero we will try to create and populate an Issue automatically
    • jiraIssueType

      @Inject(optional=true) protected int jiraIssueType
    • jiraEndpoint

      @Inject(optional=true) protected String jiraEndpoint
  • Constructor Details

    • HTMLFailureRenderer

      public HTMLFailureRenderer()
  • Method Details

    • render

      public javax.ws.rs.core.Response render(RestFailure failure)
      Description copied from interface: RestFailureRenderer
      Allows user-defined code to present the exception in a more user-friendly manner
      Specified by:
      render in interface RestFailureRenderer
      Overrides:
      render in class XMLFailureRenderer
      Returns:
      a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used