You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2013/05/21 14:30:45 UTC

svn commit: r1484777 - /felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext

Author: fmeschbe
Date: Tue May 21 12:30:45 2013
New Revision: 1484777

URL: http://svn.apache.org/r1484777
Log:
CMS commit to felix by fmeschbe

Modified:
    felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext?rev=1484777&r1=1484776&r2=1484777&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext Tue May 21 12:30:45 2013
@@ -40,7 +40,7 @@ Inventory Printer Services are registere
 |-|-|-|
 | `felix.inventory.printer.name` | -- | The unique name of the printer. If there are two or more services with the same name, the service with the highest ranking is used. |
 | `felix.inventory.printer.title` | -- | The title displayed by tools when this printer is used. It should be descriptive but short. |
-| `felix.inventory.printer.modes` | -- | The property defining the supported rendering modes. The value of this property is either a string or a string array containing valid names of [`PrinterMode`](/apidocs/inventory/current/org/apache/felix/inventory/PrinterMode.java). If this property is missing or contains invalid values, the printer is ignored. |
+| `felix.inventory.printer.format` | -- | The property defining the supported rendering formats. The value of this property is either a string or a string array containing valid names of [`Format`](/apidocs/inventory/current/org/apache/felix/inventory/Format.java). If this property is missing or contains invalid values, the printer is ignored. |
 | `felix.inventory.printer.webconsole` | `true` | Optional property controlling whether the printer will be displayed in the web console. By default, a printer is displayed in the web console, unless this property is added with the value 'false'. The property value can either be a boolean or a string. |
 
 The first three properties are required for the Inventory Printer service to be accepted. Otherwise the service is ignored by the framework printing a message to the log.
@@ -56,18 +56,18 @@ To prevent bundle resolution failure if 
     @Properties({
         @Property(name = "felix.inventory.printer.name", value = "sample"),
         @Property(name = "felix.inventory.printer.title", value = "This is a Sample"),
-        @Property(name = "felix.inventory.printer.modes",
-                  value = { "TEXT", "HTML_FRAGMENT", "JSON" })
+        @Property(name = "felix.inventory.printer.format",
+                  value = { "TEXT", "HTML", "JSON" })
     })
     public class SampleInvetoryPrinter implements InventoryPrinter
     {
-        public void print(PrinterMode mode, PrintWriter printWriter, boolean isZip)
+        public void print(PrintWriter printWriter, Format format, boolean isZip)
         {
-            if (mode == PrinterMode.JSON)
+            if (format == Format.JSON)
             {
                 printWriter.print("{ \"key\": \"Sample Output\" }");
             }
-            else if (mode == PrinterMode.HTML_FRAGMENT)
+            else if (format == Format.HTML)
             {
                 printWriter.print("<b>Sample Output</b>");
             }