FELIX-3861 Use getter methods for label, title, and category for the
service registration. This allows extensions to register with categories
without break compatibility with old web console deployments.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1436625 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
index 6195ed2..fff1718 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
@@ -182,8 +182,12 @@
activate( bc ); // don't know why this is needed!
Hashtable props = new Hashtable();
- props.put( WebConsoleConstants.PLUGIN_LABEL, label );
- props.put( WebConsoleConstants.PLUGIN_TITLE, title );
+ props.put( WebConsoleConstants.PLUGIN_LABEL, getLabel() );
+ props.put( WebConsoleConstants.PLUGIN_TITLE, getTitle() );
+ if ( getCategory() != null )
+ {
+ props.put( WebConsoleConstants.PLUGIN_CATEGORY, getCategory() );
+ }
reg = bc.registerService( "javax.servlet.Servlet", this, props ); //$NON-NLS-1$
}
return this;