incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1240807 - in /incubator/isis/trunk/framework: core/commons/src/main/java/org/apache/isis/core/commons/debug/ viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ viewer/scimpi/scimpi-dispatcher/src/main/j...
Date Sun, 05 Feb 2012 20:48:56 GMT
Author: rmatthews
Date: Sun Feb  5 20:48:55 2012
New Revision: 1240807

URL: http://svn.apache.org/viewvc?rev=1240807&view=rev
Log:
Isis-162 - Improving diagnostic information for developers

Modified:
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java

Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java?rev=1240807&r1=1240806&r2=1240807&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java
(original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/debug/DebugHtmlStringAbstract.java
Sun Feb  5 20:48:55 2012
@@ -144,8 +144,8 @@ public abstract class DebugHtmlStringAbs
             appendHtml("<head>");
             appendHtml("<title>Debug Details</title>");
             appendHtml("<style type=\"text/css\">");
-            appendHtml("body { margin: 15px; }\n" + "links { font-size: 80%; padding-bottom:5px;
}\n" + "td {vertical-align: top; margin-left: 15px;}\n" + "td.error {color: red; font-style:
italic; }\n" + "td.code {white-space: pre; font-family: monospace;}\n"
-                    + "th.title {text-align: left; padding: 0.3em 1em; font-style: italic;
background: #AED1FF; }\n" + "td.label {width: 14em; text-align: right; padding-right: 1.5em;
padding-top: 0.2em; font-size: 80%; font-weight: bold; }\n"
+            appendHtml("body { margin: 15px; }\n" + ".links { background: #ddd; font-size:
80%; padding-bottom:5px; }\n" + ".links > p { display: inline-block; }\n" + "td {vertical-align:
top; margin-left: 15px;}\n" + "td.error {color: red; font-style: italic; }\n" + "td.code {white-space:
pre; font-family: monospace;}\n"
+                    + "th.title {text-align: left; padding: 0.3em 1em; font-style: italic;
background: #AED1FF; }\n" + "td.label {width: 16em; text-align: right; padding-right: 1.5em;
padding-top: 0.2em; font-size: 80%; font-weight: bold; }\n"
                     + "span.facet-type { font-weight: bold; padding-right: 10px; }\n");
             appendHtml("</style>");
             appendHtml("</head>");

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java?rev=1240807&r1=1240806&r2=1240807&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
Sun Feb  5 20:48:55 2012
@@ -147,7 +147,9 @@ public class Dispatcher {
 
             final Throwable ex = e instanceof TagProcessingException ? e.getCause() : e;
             if (ex instanceof ForbiddenException) {
-                context.addVariable("_security-context", ((TagProcessingException) e).getContext(),
Scope.ERROR);
+                if (e instanceof TagProcessingException) {
+                    context.addVariable("_security-context", ((TagProcessingException) e).getContext(),
Scope.ERROR);
+                }
                 context.addVariable("_security-error", ex.getMessage(), Scope.ERROR);
                 context.addVariable("_security-identifier", ((ForbiddenException) ex).getIdentifier(),
Scope.ERROR);
                 context.addVariable("_security-roles", ((ForbiddenException) ex).getRoles(),
Scope.ERROR);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java?rev=1240807&r1=1240806&r2=1240807&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
Sun Feb  5 20:48:55 2012
@@ -259,7 +259,7 @@ public abstract class RequestContext {
         debug.startSection("Request");
         debug.appendTitle("User");
         final AuthenticationSession session = getSession();
-        debug.appendln("Session", session);
+        debug.appendln("Authentication Session", session);
         if (session != null) {
             debug.appendln("Name", session.getUserName());
             debug.appendln("Roles", session.getRoles());
@@ -374,7 +374,7 @@ public abstract class RequestContext {
 
     public void addVariable(String name, final Object value, final Scope scope) {
         name = name != null ? name : RESULT;
-        if (scope == Scope.SESSION && !(value instanceof Serializable)) {
+        if (scope == Scope.SESSION && value != null && !(value instanceof
Serializable)) {
             throw new ScimpiException("SESSION scoped variable (" + name + ") must be serializable:
" + value);
         }
         removeExistingVariable(name);

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java?rev=1240807&r1=1240806&r2=1240807&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java
Sun Feb  5 20:48:55 2012
@@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
+import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.scimpi.dispatcher.DispatchException;
@@ -40,7 +41,6 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.ScimpiNotFoundException;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers;
-import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugWriter;
 
 public class ServletRequestContext extends RequestContext {
     private HttpServletRequest request;
@@ -52,7 +52,7 @@ public class ServletRequestContext exten
         super(debugUsers);
     }
 
-    public void append(final DebugWriter view) {
+    public void append(final DebugBuilder view) {
         /*
          * view.divider("System"); Runtime.getRuntime().
          */



Mime
View raw message