FELIX-1630 Create AbstractConfigurationPrinter from which new PreferencesConfigurationPrinter
and ConfigurationAdminConfigurationPrinter extend. The latter two take the Preferences Service
and Configuration Admin printing functionality formerly included in the ConfigurationRender
itself. Also include the OSGi ServiceTracker in the bundle directly.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@817967 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/pom.xml b/webconsole/pom.xml
index 2d763d9..118a4aa 100644
--- a/webconsole/pom.xml
+++ b/webconsole/pom.xml
@@ -87,6 +87,10 @@
                                     org/apache/felix/bundlerepository/Util.class|
                                     org/apache/felix/bundlerepository/VersionRange.class,
                             
+                            <!-- ServiceTracker -->
+                            org.osgi.compendium;
+                                inline=org/osgi/util/tracker/*,
+                                
                             <!-- Required for JSON data transfer -->
                             json,
                             
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java
new file mode 100644
index 0000000..5eeaeb7
--- /dev/null
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.internal;
+
+
+import org.apache.felix.webconsole.ConfigurationPrinter;
+import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+
+public abstract class AbstractConfigurationPrinter implements ConfigurationPrinter, OsgiManagerPlugin
+{
+
+    private BundleContext bundleContext;
+
+    private ServiceRegistration registration;
+
+
+    public void activate( BundleContext bundleContext )
+    {
+        this.bundleContext = bundleContext;
+        this.registration = bundleContext.registerService( SERVICE, this, null );
+    }
+
+
+    public void deactivate()
+    {
+        this.registration.unregister();
+        this.bundleContext = null;
+    }
+
+
+    protected BundleContext getBundleContext()
+    {
+        return bundleContext;
+    }
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
index d4b4a28..4d0091d 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
@@ -30,28 +30,15 @@
 import org.apache.felix.scr.Component;
 import org.apache.felix.scr.Reference;
 import org.apache.felix.scr.ScrService;
-import org.apache.felix.webconsole.ConfigurationPrinter;
-import org.osgi.framework.BundleContext;
+import org.apache.felix.webconsole.internal.AbstractConfigurationPrinter;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentConstants;
 
 
-public class ComponentConfigurationPrinter extends AbstractScrPlugin implements ConfigurationPrinter
+public class ComponentConfigurationPrinter extends AbstractConfigurationPrinter
 {
 
-    private ServiceRegistration registration;
-
-
-    public void activate( BundleContext bundleContext )
-    {
-        super.activate( bundleContext );
-
-        registration = bundleContext.registerService( ConfigurationPrinter.SERVICE, this, null );
-    }
-
-
     public String getTitle()
     {
         return "Declarative Services Components";
@@ -60,39 +47,48 @@
 
     public void printConfiguration( PrintWriter pw )
     {
-        ScrService scrService = getScrService();
-        if ( scrService != null )
+        ServiceReference sr = getBundleContext().getServiceReference( "org.apache.felix.scr.ScrService" );
+        if ( sr == null )
         {
-            Component[] components = scrService.getComponents();
-
-            if ( components == null || components.length == 0 )
-            {
-
-                pw.println( "  No Components Registered" );
-
-            }
-            else
-            {
-
-                // order components by id
-                TreeMap componentMap = new TreeMap();
-                for ( int i = 0; i < components.length; i++ )
-                {
-                    Component component = components[i];
-                    componentMap.put( new Long( component.getId() ), component );
-                }
-
-                // render components
-                for ( Iterator ci = componentMap.values().iterator(); ci.hasNext(); )
-                {
-                    Component component = ( Component ) ci.next();
-                    component( pw, component );
-                }
-            }
+            pw.println( "  Apache Felix Declarative Service not installed" );
         }
         else
         {
-            pw.println( "  Apache Felix Declarative Service not installed" );
+            ScrService scrService = ( ScrService ) getBundleContext().getService( sr );
+            try
+            {
+                printComponents( pw, scrService.getComponents() );
+            }
+            finally
+            {
+                getBundleContext().ungetService( sr );
+            }
+        }
+    }
+
+
+    public void printComponents( final PrintWriter pw, final Component[] components )
+    {
+        if ( components == null || components.length == 0 )
+        {
+            pw.println( "  No Components Registered" );
+        }
+        else
+        {
+            // order components by id
+            TreeMap componentMap = new TreeMap();
+            for ( int i = 0; i < components.length; i++ )
+            {
+                Component component = components[i];
+                componentMap.put( new Long( component.getId() ), component );
+            }
+
+            // render components
+            for ( Iterator ci = componentMap.values().iterator(); ci.hasNext(); )
+            {
+                Component component = ( Component ) ci.next();
+                component( pw, component );
+            }
         }
     }
 
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
new file mode 100644
index 0000000..98fc1e1
--- /dev/null
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.internal.compendium;
+
+
+import java.io.PrintWriter;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.felix.webconsole.internal.AbstractConfigurationPrinter;
+import org.apache.felix.webconsole.internal.misc.ConfigurationRender;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+
+public class ConfigurationAdminConfigurationPrinter extends AbstractConfigurationPrinter
+{
+
+    public static final String TITLE = "Configurations";
+
+
+    public String getTitle()
+    {
+        return TITLE;
+    }
+
+
+    public void printConfiguration( PrintWriter pw )
+    {
+        ServiceReference sr = getBundleContext().getServiceReference( ConfigurationAdmin.class.getName() );
+        if ( sr == null )
+        {
+            pw.println( "  Configuration Admin Service not registered" );
+        }
+        else
+        {
+
+            ConfigurationAdmin ca = ( ConfigurationAdmin ) getBundleContext().getService( sr );
+            try
+            {
+                Configuration[] configs = ca.listConfigurations( null );
+                if ( configs != null && configs.length > 0 )
+                {
+                    SortedMap sm = new TreeMap();
+                    for ( int i = 0; i < configs.length; i++ )
+                    {
+                        sm.put( configs[i].getPid(), configs[i] );
+                    }
+
+                    for ( Iterator mi = sm.values().iterator(); mi.hasNext(); )
+                    {
+                        this.printConfiguration( pw, ( Configuration ) mi.next() );
+                    }
+                }
+                else
+                {
+                    pw.println( "  No Configurations available" );
+                }
+            }
+            catch ( Exception e )
+            {
+                // todo or not :-)
+            }
+            finally
+            {
+                getBundleContext().ungetService( sr );
+            }
+        }
+    }
+
+
+    private void printConfiguration( PrintWriter pw, Configuration config )
+    {
+        ConfigurationRender.infoLine( pw, "", "PID", config.getPid() );
+
+        if ( config.getFactoryPid() != null )
+        {
+            ConfigurationRender.infoLine( pw, "  ", "Factory PID", config.getFactoryPid() );
+        }
+
+        String loc = ( config.getBundleLocation() != null ) ? config.getBundleLocation() : "Unbound";
+        ConfigurationRender.infoLine( pw, "  ", "BundleLocation", loc );
+
+        Dictionary props = config.getProperties();
+        if ( props != null )
+        {
+            SortedSet keys = new TreeSet();
+            for ( Enumeration ke = props.keys(); ke.hasMoreElements(); )
+            {
+                keys.add( ke.nextElement() );
+            }
+
+            for ( Iterator ki = keys.iterator(); ki.hasNext(); )
+            {
+                String key = ( String ) ki.next();
+                ConfigurationRender.infoLine( pw, "  ", key, props.get( key ) );
+            }
+        }
+
+        pw.println();
+    }
+
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java
new file mode 100644
index 0000000..e6a7d88
--- /dev/null
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.internal.compendium;
+
+
+import java.io.PrintWriter;
+
+import org.apache.felix.webconsole.internal.AbstractConfigurationPrinter;
+import org.apache.felix.webconsole.internal.misc.ConfigurationRender;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+import org.osgi.service.prefs.PreferencesService;
+
+
+public class PreferencesConfigurationPrinter extends AbstractConfigurationPrinter
+{
+
+    public static final String TITLE = "Preferences";
+
+
+    public String getTitle()
+    {
+        return TITLE;
+    }
+
+
+    public void printConfiguration( PrintWriter printWriter )
+    {
+        ServiceReference sr = getBundleContext().getServiceReference( PreferencesService.class.getName() );
+        if ( sr == null )
+        {
+            printWriter.println( "  Preferences Service not registered" );
+        }
+        else
+        {
+            PreferencesService ps = ( PreferencesService ) getBundleContext().getService( sr );
+            try
+            {
+                this.printPreferences( printWriter, ps.getSystemPreferences() );
+
+                String[] users = ps.getUsers();
+                for ( int i = 0; users != null && i < users.length; i++ )
+                {
+                    printWriter.println( "*** User Preferences " + users[i] + ":" );
+                    this.printPreferences( printWriter, ps.getUserPreferences( users[i] ) );
+                }
+            }
+            catch ( BackingStoreException bse )
+            {
+                // todo or not :-)
+            }
+            finally
+            {
+                getBundleContext().ungetService( sr );
+            }
+        }
+    }
+
+
+    private void printPreferences( PrintWriter pw, Preferences prefs ) throws BackingStoreException
+    {
+
+        final String[] children = prefs.childrenNames();
+        final String[] keys = prefs.keys();
+
+        if ( children.length == 0 && keys.length == 0 )
+        {
+            pw.println( "No Preferences available" );
+        }
+        else
+        {
+            for ( int i = 0; i < children.length; i++ )
+            {
+                this.printPreferences( pw, prefs.node( children[i] ) );
+            }
+
+            for ( int i = 0; i < keys.length; i++ )
+            {
+                ConfigurationRender
+                    .infoLine( pw, null, prefs.absolutePath() + "/" + keys[i], prefs.get( keys[i], null ) );
+            }
+        }
+
+        pw.println();
+    }
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
index a0e043c..8d7714e 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
@@ -28,7 +28,6 @@
 import java.util.Collection;
 import java.util.Date;
 import java.util.Dictionary;
-import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.Properties;
@@ -51,11 +50,6 @@
 import org.osgi.framework.Constants;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-import org.osgi.service.prefs.PreferencesService;
 import org.osgi.util.tracker.ServiceTracker;
 
 
@@ -188,8 +182,6 @@
     {
         this.printSystemProperties( pw );
         this.printServices( pw );
-        this.printPreferences( pw );
-        this.printConfigurations( pw );
         this.printThreads( pw );
 
         for ( Iterator cpi = getConfigurationPrinters().iterator(); cpi.hasNext(); )
@@ -238,7 +230,7 @@
         for ( Iterator ki = keys.iterator(); ki.hasNext(); )
         {
             Object key = ki.next();
-            this.infoLine( pw, null, ( String ) key, props.get( key ) );
+            infoLine( pw, null, ( String ) key, props.get( key ) );
         }
 
         pw.end();
@@ -266,7 +258,7 @@
     //            SortedSet keys = new TreeSet(props.keySet());
     //            for (Iterator ki = keys.iterator(); ki.hasNext();) {
     //                Object key = ki.next();
-    //                this.infoLine(pw, null, (String) key, props.get(key));
+    //                infoLine(pw, null, (String) key, props.get(key));
     //            }
     //
     //        } else {
@@ -301,16 +293,16 @@
         {
             ServiceReference sr = ( ServiceReference ) si.next();
 
-            this.infoLine( pw, null, String.valueOf( sr.getProperty( Constants.SERVICE_ID ) ), sr
+            infoLine( pw, null, String.valueOf( sr.getProperty( Constants.SERVICE_ID ) ), sr
                 .getProperty( Constants.OBJECTCLASS ) );
-            this.infoLine( pw, "  ", "Bundle", this.getBundleString( sr.getBundle() ) );
+            infoLine( pw, "  ", "Bundle", this.getBundleString( sr.getBundle() ) );
 
             Bundle[] users = sr.getUsingBundles();
             if ( users != null && users.length > 0 )
             {
                 for ( int i = 0; i < users.length; i++ )
                 {
-                    this.infoLine( pw, "  ", "Using Bundle", this.getBundleString( users[i] ) );
+                    infoLine( pw, "  ", "Using Bundle", this.getBundleString( users[i] ) );
                 }
             }
 
@@ -320,7 +312,7 @@
             {
                 if ( !Constants.SERVICE_ID.equals( keys[i] ) && !Constants.OBJECTCLASS.equals( keys[i] ) )
                 {
-                    this.infoLine( pw, "  ", keys[i], sr.getProperty( keys[i] ) );
+                    infoLine( pw, "  ", keys[i], sr.getProperty( keys[i] ) );
                 }
             }
 
@@ -331,118 +323,6 @@
     }
 
 
-    private void printPreferences( ConfigurationWriter pw )
-    {
-        pw.title( "Preferences" );
-
-        ServiceReference sr = getBundleContext().getServiceReference( PreferencesService.class.getName() );
-        if ( sr == null )
-        {
-            pw.println( "  Preferences Service not registered" );
-        }
-        else
-        {
-            PreferencesService ps = ( PreferencesService ) getBundleContext().getService( sr );
-            try
-            {
-                this.printPreferences( pw, ps.getSystemPreferences() );
-
-                String[] users = ps.getUsers();
-                for ( int i = 0; users != null && i < users.length; i++ )
-                {
-                    pw.println( "*** User Preferences " + users[i] + ":" );
-                    this.printPreferences( pw, ps.getUserPreferences( users[i] ) );
-                }
-            }
-            catch ( BackingStoreException bse )
-            {
-                // todo or not :-)
-            }
-            finally
-            {
-                getBundleContext().ungetService( sr );
-            }
-        }
-
-        pw.end();
-    }
-
-
-    private void printPreferences( PrintWriter pw, Preferences prefs ) throws BackingStoreException
-    {
-
-        final String[] children = prefs.childrenNames();
-        final String[] keys = prefs.keys();
-
-        if ( children.length == 0 && keys.length == 0 )
-        {
-            pw.println( "No Preferences available" );
-        }
-        else
-        {
-            for ( int i = 0; i < children.length; i++ )
-            {
-                this.printPreferences( pw, prefs.node( children[i] ) );
-            }
-
-            for ( int i = 0; i < keys.length; i++ )
-            {
-                this.infoLine( pw, null, prefs.absolutePath() + "/" + keys[i], prefs.get( keys[i], null ) );
-            }
-        }
-
-        pw.println();
-    }
-
-
-    private void printConfigurations( ConfigurationWriter pw )
-    {
-        pw.title(  "Configurations" );
-
-        ServiceReference sr = getBundleContext().getServiceReference( ConfigurationAdmin.class.getName() );
-        if ( sr == null )
-        {
-            pw.println( "  Configuration Admin Service not registered" );
-        }
-        else
-        {
-
-            ConfigurationAdmin ca = ( ConfigurationAdmin ) getBundleContext().getService( sr );
-            try
-            {
-                Configuration[] configs = ca.listConfigurations( null );
-                if ( configs != null && configs.length > 0 )
-                {
-                    SortedMap sm = new TreeMap();
-                    for ( int i = 0; i < configs.length; i++ )
-                    {
-                        sm.put( configs[i].getPid(), configs[i] );
-                    }
-
-                    for ( Iterator mi = sm.values().iterator(); mi.hasNext(); )
-                    {
-                        this.printConfiguration( pw, ( Configuration ) mi.next() );
-                    }
-                }
-                else
-                {
-                    pw.println( "  No Configurations available" );
-                }
-            }
-            catch ( Exception e )
-            {
-                // todo or not :-)
-            }
-            finally
-            {
-                getBundleContext().ungetService( sr );
-            }
-        }
-
-        pw.end();
-    }
-
-
     private void printConfigurationPrinter( ConfigurationWriter pw, ConfigurationPrinter cp )
     {
         pw.title(  cp.getTitle() );
@@ -451,39 +331,7 @@
     }
 
 
-    private void printConfiguration( PrintWriter pw, Configuration config )
-    {
-        this.infoLine( pw, "", "PID", config.getPid() );
-
-        if ( config.getFactoryPid() != null )
-        {
-            this.infoLine( pw, "  ", "Factory PID", config.getFactoryPid() );
-        }
-
-        String loc = ( config.getBundleLocation() != null ) ? config.getBundleLocation() : "Unbound";
-        this.infoLine( pw, "  ", "BundleLocation", loc );
-
-        Dictionary props = config.getProperties();
-        if ( props != null )
-        {
-            SortedSet keys = new TreeSet();
-            for ( Enumeration ke = props.keys(); ke.hasMoreElements(); )
-            {
-                keys.add( ke.nextElement() );
-            }
-
-            for ( Iterator ki = keys.iterator(); ki.hasNext(); )
-            {
-                String key = ( String ) ki.next();
-                this.infoLine( pw, "  ", key, props.get( key ) );
-            }
-        }
-
-        pw.println();
-    }
-
-
-    private void infoLine( PrintWriter pw, String indent, String label, Object value )
+    public static void infoLine( PrintWriter pw, String indent, String label, Object value )
     {
         if ( indent != null )
         {
@@ -496,13 +344,13 @@
             pw.print( '=' );
         }
 
-        this.printObject( pw, value );
+        printObject( pw, value );
 
         pw.println();
     }
 
 
-    private void printObject( PrintWriter pw, Object value )
+    private static void printObject( PrintWriter pw, Object value )
     {
         if ( value == null )
         {
@@ -510,7 +358,7 @@
         }
         else if ( value.getClass().isArray() )
         {
-            this.printArray( pw, ( Object[] ) value );
+            printArray( pw, ( Object[] ) value );
         }
         else
         {
@@ -519,7 +367,7 @@
     }
 
 
-    private void printArray( PrintWriter pw, Object[] values )
+    private static void printArray( PrintWriter pw, Object[] values )
     {
         pw.print( '[' );
         if ( values != null && values.length > 0 )
@@ -530,7 +378,7 @@
                 {
                     pw.print( ", " );
                 }
-                this.printObject( pw, values[i] );
+                printObject( pw, values[i] );
             }
         }
         pw.print( ']' );
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
index eb2f583..1fe79d5 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
@@ -417,7 +417,7 @@
 
     protected RepositoryAdmin getRepositoryAdmin()
     {
-        return ( RepositoryAdmin ) getService( RepositoryAdmin.class.getName() );
+        return ( RepositoryAdmin ) getService( "org.osgi.service.obr.RepositoryAdmin" );
     }
 
 }
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index 624b1e6..616dc09 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -116,10 +116,13 @@
     static final String DEFAULT_MANAGER_ROOT = "/system/console";
 
     static final String[] PLUGIN_CLASSES =
-        { "org.apache.felix.webconsole.internal.compendium.ComponentConfigurationPrinter",
+        {
+            "org.apache.felix.webconsole.internal.compendium.ComponentConfigurationPrinter",
             "org.apache.felix.webconsole.internal.compendium.ComponentsServlet",
             "org.apache.felix.webconsole.internal.compendium.ConfigManager",
+            "org.apache.felix.webconsole.internal.compendium.ConfigurationAdminConfigurationPrinter",
             "org.apache.felix.webconsole.internal.compendium.LogServlet",
+            "org.apache.felix.webconsole.internal.compendium.PreferencesConfigurationPrinter",
             "org.apache.felix.webconsole.internal.core.BundlesServlet",
             "org.apache.felix.webconsole.internal.core.InstallAction",
             "org.apache.felix.webconsole.internal.core.SetStartLevelAction",
@@ -132,7 +135,8 @@
             "org.apache.felix.webconsole.internal.obr.InstallFromRepoAction",
             "org.apache.felix.webconsole.internal.obr.RefreshRepoAction",
             "org.apache.felix.webconsole.internal.system.GCAction",
-            "org.apache.felix.webconsole.internal.system.VMStatPlugin" };
+            "org.apache.felix.webconsole.internal.system.VMStatPlugin"
+        };
 
     private BundleContext bundleContext;