FELIX-2658 : Deprecate ConfigurationPrinter.PROPERTY_MODES constant

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1022445 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
index dd428ff..72ffd12 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
@@ -29,8 +29,9 @@
  * A configuration printer is currently used in three modes: displayed in
  * a tab of the configuration web console plugin, included in a downloadable
  * zip of the configuration or a downloadable txt file.
- * With the {@link #PROPERTY_MODES} property this service can specify when
- * it should be included. The default mode is {@link #MODE_ALWAYS}.
+ * With the {@link WebConsoleConstants#CONFIG_PRINTER_MODES} property this
+ * service can specify when it should be included.
+ * The default mode is {@link #MODE_ALWAYS}.
  */
 public interface ConfigurationPrinter
 {
@@ -64,6 +65,7 @@
      * The value of this property is either a single string or an
      * array of strings.
      * @since 3.0
+     * @deprecated Use {@link WebConsoleConstants#CONFIG_PRINTER_MODES}
      */
     String PROPERTY_MODES = "modes";
 
@@ -78,7 +80,7 @@
     /**
      * Prints the configuration report to the given <code>printWriter</code>.
      * Implementations are free to print whatever information they deem useful.
-     * 
+     *
      * @param printWriter where to write the configuration data. It might be flushed,
      * but must not be closed.
      */
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 e0087e2..1c9643f 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
@@ -330,10 +330,15 @@
                     {
                         if ( service instanceof ConfigurationPrinter )
                         {
+                            Object modes = ref.getProperty(WebConsoleConstants.CONFIG_PRINTER_MODES);
+                            if ( modes == null )
+                            {
+                                modes = ref.getProperty( ConfigurationPrinter.PROPERTY_MODES );
+                            }
                             final ConfigurationPrinter cfgPrinter = (ConfigurationPrinter) service;
                             addConfigurationPrinter( cp, cfgPrinter, refs[i].getBundle(),
                                     ref.getProperty( WebConsoleConstants.PLUGIN_LABEL ),
-                                    ref.getProperty( ConfigurationPrinter.PROPERTY_MODES ) );
+                                    modes );
                         }
                         else
                         {