incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1033322 - /sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java
Date Wed, 10 Nov 2010 01:57:23 GMT
Author: justin
Date: Wed Nov 10 01:57:23 2010
New Revision: 1033322

URL: http://svn.apache.org/viewvc?rev=1033322&view=rev
Log:
SLING-1868 - adding FELIX-2570 service property

Modified:
    sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java

Modified: sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java?rev=1033322&r1=1033321&r2=1033322&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java
(original)
+++ sling/trunk/bundles/jcr/webconsole/src/main/java/org/apache/sling/jcr/webconsole/internal/NodeTypeConfigurationPrinter.java
Wed Nov 10 01:57:23 2010
@@ -44,8 +44,11 @@ import org.apache.sling.jcr.api.SlingRep
  */
 @Component(label = "%nodetype.printer.name", description = "%nodetype.printer.description",
metatype = false)
 @Service(ConfigurationPrinter.class)
-@Properties({ @Property(name = "service.description", value = "JCR Nodetype Configuration
Printer"),
-        @Property(name = "service.vendor", value = "The Apache Software Foundation") })
+@Properties({
+    @Property(name = "service.description", value = "JCR Nodetype Configuration Printer"),
+    @Property(name = "service.vendor", value = "The Apache Software Foundation"),
+    @Property(name = "felix.webconsole.configprinter.web.unescaped", boolValue = true)
+})
 public class NodeTypeConfigurationPrinter implements ModeAwareConfigurationPrinter {
 
     @Reference(policy = ReferencePolicy.DYNAMIC)
@@ -82,7 +85,7 @@ public class NodeTypeConfigurationPrinte
                     if (nt.isMixin()) {
                         pw.print(" mixin");
                     }
-                    pw.println();
+                    linebreak(pw, mode);
 
                     for (PropertyDefinition prop : nt.getPropertyDefinitions()) {
                         if (prop.getDeclaringNodeType() == nt) {
@@ -113,7 +116,7 @@ public class NodeTypeConfigurationPrinte
                             stopBold(pw, mode);
                         }
 
-                        pw.println();
+                        linebreak(pw, mode);
                     }
                     for (NodeDefinition child : nt.getChildNodeDefinitions()) {
                         if (child.getDeclaringNodeType() == nt) {
@@ -146,10 +149,10 @@ public class NodeTypeConfigurationPrinte
                             stopBold(pw, mode);
                         }
 
-                        pw.println();
+                        linebreak(pw, mode);
                     }
 
-                    pw.println();
+                    linebreak(pw, mode);
 
                 }
             } catch (RepositoryException e) {
@@ -171,15 +174,23 @@ public class NodeTypeConfigurationPrinte
 
     }
 
+    private void linebreak(PrintWriter pw, String mode) {
+        if (ConfigurationPrinter.MODE_WEB.equals(mode)) {
+            pw.println("<br/>");
+        } else {
+            pw.println();
+        }
+    }
+
     private void stopBold(PrintWriter pw, String mode) {
         if (ConfigurationPrinter.MODE_WEB.equals(mode)) {
-         //   pw.print("</b>");
+            pw.print("</b>");
         }
     }
 
     private void startBold(PrintWriter pw, String mode) {
         if (ConfigurationPrinter.MODE_WEB.equals(mode)) {
-          //  pw.print("<b>");
+            pw.print("<b>");
         }
     }
 



Mime
View raw message