You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2010/07/12 19:34:47 UTC

svn commit: r963380 - /felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java

Author: clement
Date: Mon Jul 12 17:34:46 2010
New Revision: 963380

URL: http://svn.apache.org/viewvc?rev=963380&view=rev
Log:
Start working on the new plugin for the web console

Added:
    felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java

Added: felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java?rev=963380&view=auto
==============================================================================
--- felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java (added)
+++ felix/trunk/ipojo/webconsole-plugin/src/main/java/org/apache/felix/ipojo/webconsole/IPOJOPlugin.java Mon Jul 12 17:34:46 2010
@@ -0,0 +1,72 @@
+package org.apache.felix.ipojo.webconsole;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.ipojo.Factory;
+import org.apache.felix.ipojo.HandlerFactory;
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.annotations.Instantiate;
+import org.apache.felix.ipojo.annotations.Provides;
+import org.apache.felix.ipojo.annotations.Requires;
+import org.apache.felix.ipojo.annotations.ServiceProperty;
+import org.apache.felix.ipojo.architecture.Architecture;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+
+@Component
+@Provides
+@Instantiate
+public class IPOJOPlugin extends AbstractWebConsolePlugin {
+
+    /**
+     * Label used by the web console.
+     */
+    @ServiceProperty(name = "felix.webconsole.label")
+    private String m_label = "iPOJO_2"; // TODO CHANGE
+
+    /**
+     * Title used by the web console.
+     */
+    @ServiceProperty(name = "felix.webconsole.title")
+    private String m_title = "iPOJO_2";  // TODO CHANGE
+
+    /**
+     * List of available Architecture service.
+     */
+    @Requires(optional = true, specification = "org.apache.felix.ipojo.architecture.Architecture")
+    private List<Architecture> m_archs;
+
+    /**
+     * List of available Factories.
+     */
+    @Requires(optional = true, specification = "org.apache.felix.ipojo.Factory")
+    private List<Factory> m_factories;
+
+    /**
+     * List of available Handler Factories.
+     */
+    @Requires(optional = true, specification = "org.apache.felix.ipojo.HandlerFactory")
+    private List<HandlerFactory> m_handlers;
+    
+    @Override
+    public String getLabel() {
+        return m_label;
+    }
+
+    @Override
+    public String getTitle() {
+        return m_title;
+    }
+
+    @Override
+    protected void renderContent(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        // TODO Auto-generated method stub
+        
+    }
+
+}