incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r811377 - in /sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers: HtmlRendererServlet.java PlainTextRendererServlet.java
Date Fri, 04 Sep 2009 13:02:30 GMT
Author: fmeschbe
Date: Fri Sep  4 13:02:30 2009
New Revision: 811377

URL: http://svn.apache.org/viewvc?rev=811377&view=rev
Log:
SLING-1098 for debugging purposes also print the resource type and resource super type
of resources in text/plain and text/html representations (and we should use existing API
for this, thanks Bertrand for pointing this out)

Modified:
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/HtmlRendererServlet.java
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/HtmlRendererServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/HtmlRendererServlet.java?rev=811377&r1=811376&r2=811377&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/HtmlRendererServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/HtmlRendererServlet.java
Fri Sep  4 13:02:30 2009
@@ -102,15 +102,9 @@
 
         pw.println("<p>Resource type: <b>" + r.getResourceType() + "</b></p>");
 
-        String resourceSuperType = r.getResourceSuperType();
+        String resourceSuperType = ResourceUtil.findResourceSuperType(r);
         if (resourceSuperType == null) {
-            resourceSuperType = ResourceUtil.getResourceSuperType(
-                r.getResourceResolver(), r.getResourceType());
-            if (resourceSuperType == null) {
-                resourceSuperType = "sling/servlet/default (default resource super type)";
-            } else {
-                resourceSuperType += " (from resource type hierarchy)";
-            }
+            resourceSuperType = "-";
         }
         pw.println("<p>Resource super type: <b>" + resourceSuperType
             + "</b></p>");

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java?rev=811377&r1=811376&r2=811377&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
Fri Sep  4 13:02:30 2009
@@ -85,15 +85,9 @@
         pw.println("Resource metadata: " + r.getResourceMetadata());
         pw.println("Resource type: " + r.getResourceType());
 
-        String resourceSuperType = r.getResourceSuperType();
+        String resourceSuperType = ResourceUtil.findResourceSuperType(r);
         if (resourceSuperType == null) {
-            resourceSuperType = ResourceUtil.getResourceSuperType(
-                r.getResourceResolver(), r.getResourceType());
-            if (resourceSuperType == null) {
-                resourceSuperType = "sling/servlet/default (default resource super type)";
-            } else {
-                resourceSuperType += " (from resource type hierarchy)";
-            }
+            resourceSuperType = "-";
         }
         pw.println("Resource super type: " + resourceSuperType);
 



Mime
View raw message