You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/01/04 13:13:31 UTC

[isis] 09/11: ISIS-1955: updates docs for Ticket, now an interface

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit bc216ba5f41abfcb1128009298ada678e26bc23d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 4 11:49:06 2019 +0000

    ISIS-1955: updates docs for Ticket, now an interface
---
 ...esentation-layer-spi_ErrorReportingService.adoc | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ErrorReportingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ErrorReportingService.adoc
index a7daccf..b713bc5 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ErrorReportingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ErrorReportingService.adoc
@@ -44,17 +44,19 @@ In such cases the UI restricts the information shown to the end-user, to avoid l
 These technical details are hidden from the user and only shown for non-recoverable exceptions.
 
 
-and `Ticket` (returned by the service) has the constructor:
+and `Ticket` (returned by the service) is an interface:
 
 [source,java]
 ----
-public class Ticket implements Serializable {
-    public Ticket(
-        final String reference,             // <1>
-        final String userMessage,           // <2>
-        final String details,               // <3>
-        final StackTracePolicy policy,      // <4>
-        final String kittenUrl) { ... }     // <5>
+public interface Ticket extends Serializable {
+
+    enum StackTracePolicy { SHOW, HIDE }
+
+    String getReference();                      // <1>
+    String getUserMessage();                    // <2>
+    String getDetails();                        // <3>
+    StackTracePolicy getStackTracePolicy();     // <4>
+    String getMarkup();                         // <5>
 }
 ----
 <1> is a unique identifier that the end-user can use to track any follow-up from this error.
@@ -65,14 +67,14 @@ probably be the JIRA issue number <tt>XXX-1234</tt>.
 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.
 <4> is optional, specifying whether to show a button to view details of the stack trace.
 By default a stack trace button is not shown if a ticket is returned (but _is_ shown if there is no `ErrorReportingService` configured, or if it returns no ticket).
-<5> is optioal, specifying an external URL of an image to display for the end user.
+<5> returns a Html representation of this ticket.
 
 
 
 
 == Implementation
 
-There is no default implementation of this service.
+There is no default implementation of this service, but there are a couple of concrete examples of `Ticket` in `core-runtime`.
 
 The (non-ASF) http://github.com/isisaddons/isis-app-kitchensink[Isis addons' kitchensink] app provides an example implementation: