felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1486066 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Date Fri, 24 May 2013 14:18:26 GMT
Author: cziegeler
Date: Fri May 24 14:18:26 2013
New Revision: 1486066

URL: http://svn.apache.org/r1486066
Log:
FELIX-4074 :  Plugin class name changed for config manager plugin, might be disabled on update


Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java?rev=1486066&r1=1486065&r2=1486066&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Fri May 24 14:18:26 2013
@@ -171,6 +171,9 @@ public class OsgiManager extends Generic
      */
     static final String DEFAULT_MANAGER_ROOT = "/system/console"; //$NON-NLS-1$
 
+    private static final String OLD_CONFIG_MANAGER_CLASS = "org.apache.felix.webconsole.internal.compendium.ConfigManager";
//$NON-NLS-1$
+    private static final String NEW_CONFIG_MANAGER_CLASS = "org.apache.felix.webconsole.internal.configuration.ConfigManager";
//$NON-NLS-1$
+
     static final String[] PLUGIN_CLASSES = {
             "org.apache.felix.webconsole.internal.configuration.ConfigurationAdminConfigurationPrinter",
//$NON-NLS-1$
             "org.apache.felix.webconsole.internal.compendium.PreferencesConfigurationPrinter",
//$NON-NLS-1$
@@ -182,7 +185,7 @@ public class OsgiManager extends Generic
             "org.apache.felix.webconsole.internal.misc.ThreadPrinter", }; //$NON-NLS-1$
 
     static final String[] PLUGIN_MAP = {
-            "org.apache.felix.webconsole.internal.configuration.ConfigManager", "configMgr",
//$NON-NLS-1$ //$NON-NLS-2$
+            NEW_CONFIG_MANAGER_CLASS, "configMgr", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.compendium.LogServlet", "logs", //$NON-NLS-1$
//$NON-NLS-2$
             "org.apache.felix.webconsole.internal.core.BundlesServlet", "bundles", //$NON-NLS-1$
//$NON-NLS-2$
             "org.apache.felix.webconsole.internal.core.ServicesServlet", "services", //$NON-NLS-1$
//$NON-NLS-2$
@@ -963,6 +966,14 @@ public class OsgiManager extends Generic
         // get enabled plugins
         String[] plugins = ConfigurationUtil.getStringArrayProperty(config, PROP_ENABLED_PLUGINS);
         enabledPlugins = null == plugins ? null : new HashSet(Arrays.asList(plugins));
+        // check for moved config manager class (see FELIX-4074)
+        if ( enabledPlugins != null )
+        {
+            if ( enabledPlugins.remove(OLD_CONFIG_MANAGER_CLASS) )
+            {
+                enabledPlugins.add(NEW_CONFIG_MANAGER_CLASS);
+            }
+        }
         initInternalPlugins();
 
         // might update HTTP service registration



Mime
View raw message