You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2010/10/14 11:57:37 UTC
svn commit: r1022445 - in
/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole:
ConfigurationPrinter.java internal/misc/ConfigurationRender.java
Author: cziegeler
Date: Thu Oct 14 09:57:36 2010
New Revision: 1022445
URL: http://svn.apache.org/viewvc?rev=1022445&view=rev
Log:
FELIX-2658 : Deprecate ConfigurationPrinter.PROPERTY_MODES constant
Modified:
felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java?rev=1022445&r1=1022444&r2=1022445&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java Thu Oct 14 09:57:36 2010
@@ -29,8 +29,9 @@ import java.io.PrintWriter;
* 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 @@ public interface ConfigurationPrinter
* 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 @@ public interface ConfigurationPrinter
/**
* 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.
*/
Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java?rev=1022445&r1=1022444&r2=1022445&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java Thu Oct 14 09:57:36 2010
@@ -330,10 +330,15 @@ public class ConfigurationRender extends
{
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
{