Ticket

Response from the ErrorReportingService , containing information to show to the end-user.

Implementation notes:

  • a class has been used here so that additional fields might be added in the future.

  • the class is Serializable

so that it can be stored by the Wicket viewer as a Wicket model.

API

Ticket.java
interface Ticket {
  String getReference()     (1)
  String getUserMessage()     (2)
  String getDetails()     (3)
  StackTracePolicy getStackTracePolicy()     (4)
  String getMarkup()     (5)
}
1 getReference()

A unique identifier that the end-user can use to track any follow-up from this error.

2 getUserMessage()

A short, jargon-free message to display to the user.

3 getDetails()

Optional additional details to show to the end-user.

4 getStackTracePolicy()

Whether the stack trace for the exception should be displayed or be hidden.

5 getMarkup()

Returns a Html representation of this ticket.

Members

getReference()

A unique identifier that the end-user can use to track any follow-up from this error.

For example, an implementation might automatically log an issue in a bug tracking system such as JIRA, in which case the #getReference() reference would be the JIRA issue number XXX-1234 .

getUserMessage()

A short, jargon-free message to display to the user.

Typically this message should be short, one line long.

getDetails()

Optional additional details to show to the end-user.

For example, these might include text on how to recover from the error, or workarounds, or just further details on contacting the help desk if the issue is severe and requires immediate attention.

getStackTracePolicy()

Whether the stack trace for the exception should be displayed or be hidden.

The default is to hide it on the basis that the reporting service will have reported the stack trace to the support team, meaning there’s no need to expose this info to the end-user.

getMarkup()

Returns a Html representation of this ticket.