geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1038945 [1/2] - in /geronimo/server/trunk: ./ plugingroups/console-jetty/ plugingroups/console-jetty/src/main/history/ plugingroups/console-tomcat/ plugingroups/console-tomcat/src/main/history/ plugins/console/ plugins/console/osgi-console...
Date Thu, 25 Nov 2010 08:01:00 GMT
Author: rwonly
Date: Thu Nov 25 08:00:59 2010
New Revision: 1038945

URL: http://svn.apache.org/viewvc?rev=1038945&view=rev
Log:
GERONIMO-5502 Add OSGI management portlets

Added:
    geronimo/server/trunk/plugins/console/osgi-console-jetty/
    geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/
    geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/
    geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/
    geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/view/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/view/BundlesView.jsp   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/web.xml   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/images/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/images/loading128.gif   (with props)
    geronimo/server/trunk/plugins/console/osgi-portlets/src/site/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/site/apt/
    geronimo/server/trunk/plugins/console/osgi-portlets/src/site/site.xml   (with props)
Modified:
    geronimo/server/trunk/plugingroups/console-jetty/pom.xml
    geronimo/server/trunk/plugingroups/console-jetty/src/main/history/dependencies.xml
    geronimo/server/trunk/plugingroups/console-tomcat/pom.xml
    geronimo/server/trunk/plugingroups/console-tomcat/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/console/pom.xml
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/plugingroups/console-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/console-jetty/pom.xml?rev=1038945&r1=1038944&r2=1038945&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/console-jetty/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/console-jetty/pom.xml Thu Nov 25 08:00:59 2010
@@ -59,14 +59,12 @@
             <type>car</type>
         </dependency>
         
-        <!--
         <dependency>
             <groupId>org.apache.geronimo.plugins</groupId>
             <artifactId>osgi-console-jetty</artifactId>
             <version>${project.version}</version>
             <type>car</type>
         </dependency>
-        -->
         
         <!--<dependency>-->
             <!--<groupId>org.apache.geronimo.configs</groupId>-->

Modified: geronimo/server/trunk/plugingroups/console-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/console-jetty/src/main/history/dependencies.xml?rev=1038945&r1=1038944&r2=1038945&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/console-jetty/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/console-jetty/src/main/history/dependencies.xml Thu Nov 25 08:00:59 2010
@@ -18,6 +18,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>osgi-console-jetty</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.plugins</groupId>
         <artifactId>plugin-console-jetty</artifactId>
         <type>car</type>
     </dependency>

Modified: geronimo/server/trunk/plugingroups/console-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/console-tomcat/pom.xml?rev=1038945&r1=1038944&r2=1038945&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/console-tomcat/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/console-tomcat/pom.xml Thu Nov 25 08:00:59 2010
@@ -59,14 +59,12 @@
             <type>car</type>
         </dependency>
 
-        <!--
         <dependency>
             <groupId>org.apache.geronimo.plugins</groupId>
             <artifactId>osgi-console-tomcat</artifactId>
             <version>${project.version}</version>
             <type>car</type>
         </dependency>
-        -->
 
         <!--<dependency>-->
             <!--<groupId>org.apache.geronimo.configs</groupId>-->

Modified: geronimo/server/trunk/plugingroups/console-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/console-tomcat/src/main/history/dependencies.xml?rev=1038945&r1=1038944&r2=1038945&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/console-tomcat/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/console-tomcat/src/main/history/dependencies.xml Thu Nov 25 08:00:59 2010
@@ -18,6 +18,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>osgi-console-tomcat</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.plugins</groupId>
         <artifactId>plugin-console-tomcat</artifactId>
         <type>car</type>
     </dependency>

Added: geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Rev: 953018 $ $Date: 2010-06-09 10:08:04 -0400 (Wed, 09 Jun 2010) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>console</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>osgi-console-jetty</artifactId>
+    <name>Geronimo Plugins, Console :: OSGI (jetty)</name>
+    <packaging>car</packaging>
+    <description>
+        Geronimo Administration Console Plugin and Deployment Portlets allow users to install plugins, export existing plugins, build custom server assemblies, and deploy applications on Geronimo.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>osgi-portlets</artifactId>
+            <version>${project.version}</version>
+            <type>war</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.bundles</groupId>
+            <artifactId>json</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>console-jetty</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>plugin</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-deploy-jsr88</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- to force build order -->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>${jetty}-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
+                        <deploymentConfig>${jettyDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.plugins</groupId>
+                        <artifactId>osgi-portlets</artifactId>
+                        <version>${project.version}</version>
+                        <type>war</type>
+                    </module>
+                    <category>Administration</category>
+                    <osiApproved>true</osiApproved>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-jetty/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+    <module-id>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>osgi-console-jetty</artifactId>
+        <version>3.0-SNAPSHOT</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.bundles</groupId>
+        <artifactId>json</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>j2ee-deployer</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>plugin</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>console-jetty</artifactId>
+        <type>car</type>
+    </dependency>
+</plugin-artifact>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/history/dependencies.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 897080 $ $Date: 2010-01-07 22:03:36 -0500 (Thu, 07 Jan 2010) $ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.2">
+
+    <!-- This is where the files are accessed from. (aka - portletContext) -->
+    <context-root>/osgi-bundles</context-root>
+
+    <security-realm-name>geronimo-admin</security-realm-name>
+    <security xmlns="http://geronimo.apache.org/xml/ns/security-1.2">
+        <role-mappings>
+            <role role-name="admin">
+                <principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="admin" />
+            </role>
+        </role-mappings>
+    </security>
+
+    <!-- i18n support -->
+    <gbean name="ConsoleResourceGBean" class="org.apache.geronimo.console.i18n.ConsoleResourceGBean">
+        <reference name="ConsoleResourceRegistry">
+            <name>ConsoleResourceRegistry</name>
+        </reference>
+    </gbean> 
+
+    <gbean name="OSGiBundles" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
+        <attribute name="pageTitle">3-10/Applications/OSGI Bundles</attribute>
+        <attribute name="portletContext">/osgi-bundles</attribute>
+        <attribute name="portletList">[BundlesPortlet]</attribute>
+        <attribute name="icon">/images/ico_plugin_16x16.gif</attribute>
+        <reference name="PortalContainerServices">
+            <name>PlutoPortalServices</name>
+        </reference>
+    </gbean>
+    
+    <!-- Deployment factory for use inside server -->
+    <gbean name="DeploymentFactory" class="org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryWithKernel" />
+</web-app>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-jetty/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Rev: 953018 $ $Date: 2010-06-09 10:08:04 -0400 (Wed, 09 Jun 2010) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>console</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>osgi-console-tomcat</artifactId>
+    <name>Geronimo Plugins, Console :: OSGI (tomcat)</name>
+    <packaging>car</packaging>
+    <description>
+        Geronimo Administration Console Plugin and Deployment Portlets allow users to install plugins, export existing plugins, build custom server assemblies, and deploy applications on Geronimo.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>osgi-portlets</artifactId>
+            <version>${project.version}</version>
+            <type>war</type>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.bundles</groupId>
+            <artifactId>json</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>console-tomcat</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>plugin</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-deploy-jsr88</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- to force build order -->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>tomcat7-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
+                        <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.plugins</groupId>
+                        <artifactId>osgi-portlets</artifactId>
+                        <version>${project.version}</version>
+                        <type>war</type>
+                    </module>
+                    <category>Administration</category>
+                    <osiApproved>true</osiApproved>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-tomcat/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+    <module-id>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>osgi-console-tomcat</artifactId>
+        <version>3.0-SNAPSHOT</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.bundles</groupId>
+        <artifactId>json</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>j2ee-deployer</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>plugin</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>console-tomcat</artifactId>
+        <type>car</type>
+    </dependency>
+</plugin-artifact>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/history/dependencies.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 897080 $ $Date: 2010-01-07 22:03:36 -0500 (Thu, 07 Jan 2010) $ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.2">
+
+    <!-- This is where the files are accessed from. (aka - portletContext) -->
+    <context-root>/osgi-bundles</context-root>
+
+    <security-realm-name>geronimo-admin</security-realm-name>
+    <security xmlns="http://geronimo.apache.org/xml/ns/security-1.2">
+        <role-mappings>
+            <role role-name="admin">
+                <principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="admin" />
+            </role>
+        </role-mappings>
+    </security>
+
+    <!-- i18n support -->
+    <gbean name="ConsoleResourceGBean" class="org.apache.geronimo.console.i18n.ConsoleResourceGBean">
+        <reference name="ConsoleResourceRegistry">
+            <name>ConsoleResourceRegistry</name>
+        </reference>
+    </gbean> 
+
+    <gbean name="OSGiBundles" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
+        <attribute name="pageTitle">3-10/Applications/OSGI Bundles</attribute>
+        <attribute name="portletContext">/osgi-bundles</attribute>
+        <attribute name="portletList">[BundlesPortlet]</attribute>
+        <attribute name="icon">/images/ico_plugin_16x16.gif</attribute>
+        <reference name="PortalContainerServices">
+            <name>PlutoPortalServices</name>
+        </reference>
+    </gbean>
+    <!-- Deployment factory for use inside server -->
+    <gbean name="DeploymentFactory" class="org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryWithKernel" />
+</web-app>

Propchange: geronimo/server/trunk/plugins/console/osgi-console-tomcat/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+       http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 957537 $ $Date: 2010-06-24 09:05:54 -0400 (Thu, 24 Jun 2010) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>console</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>osgi-portlets</artifactId>
+    <name>Geronimo Plugins, Console :: OSGI</name>
+    <packaging>war</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.taglibs</groupId>
+            <artifactId>taglibs-standard-spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+            
+        <dependency>
+            <groupId>org.apache.taglibs</groupId>
+            <artifactId>taglibs-standard-impl</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.taglibs</groupId>
+            <artifactId>taglibs-standard-jstlel</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- for jspc maven plugin -->
+        <dependency>
+            <groupId>org.apache.portals.pluto</groupId>
+            <artifactId>pluto-taglib</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-connector-builder-1_6</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-security-builder</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-deploy-jsr88</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>console-core</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.commons-io</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.portals</groupId>
+            <artifactId>portlet-api_2.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xmlbeans</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-stax-api_1.2_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.bundles</groupId>
+            <artifactId>json</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        
+        <!-- FIXME : this should be replaced by org.apache.aries.util in next release -->
+        <dependency>
+            <groupId>org.apache.aries.application</groupId>
+            <artifactId>org.apache.aries.application.utils</artifactId>
+            <version>0.2-incubating</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <copy overwrite="true" todir="target/classes">
+                                    <fileset dir="src/main/i18n-resources">
+                                        <include name="*_en.properties" />
+                                    </fileset>
+                                    <mapper type="glob" from="*_en.properties" to="*.properties" />
+                                </copy>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo.jspc</groupId>
+                <artifactId>jspc-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webXml>${project.build.directory}/jspweb.xml</webXml>
+                    <warSourceExcludes>**/*.jsp</warSourceExcludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                  <groupId>org.codehaus.mojo</groupId>
+                  <artifactId>native2ascii-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties Thu Nov 25 08:00:59 2010
@@ -0,0 +1,35 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+#=====================================================================
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#=====================================================================
+osgi.bundle.id                          = Id
+osgi.bundle.symbolicName                = Symbolic Name
+osgi.bundle.version                     = Version
+osgi.bundle.state                       = State
+osgi.bundle.actions                     = Actions
+osgi.bundle.action.start                = start
+osgi.bundle.action.stop                 = stop
+osgi.bundle.action.uninstall            = uninstall
+osgi.bundle.backToBundlesList           = BACK TO BUNDLES LIST
+osgi.bundle.lastModified				= Last Modified
+osgi.bundle.exportedPackages            = Exported Packages
+osgi.bundle.importedPackages            = Imported Packages
+osgi.bundle.registeredServices          = Registered Services
+osgi.bundle.headers                     = Headers
+osgi.bundle.startLevel                  = Start Level
+osgi.bundle.install.install             = Install
+osgi.bundle.install.installABundle      = Install Bundle
+osgi.bundle.install.startAfterInstalled = Start
\ No newline at end of file

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_en.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties Thu Nov 25 08:00:59 2010
@@ -0,0 +1,18 @@
+#=====================================================================
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#=====================================================================
+
+

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_ja.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties Thu Nov 25 08:00:59 2010
@@ -0,0 +1,17 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+#=====================================================================
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#=====================================================================

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/i18n-resources/osgiportlets_zh.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,74 @@
+package org.apache.geronimo.console.javabean;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * Java bean converted from TabularData and is mostly used in jsps.
+ *
+ */
+public class OSGiBundle {
+    private long identifier;
+    private String symbolicName;
+    private String state;
+    private String version;
+    public OSGiBundle(long identifier, String symbolicName,String version,int state) {
+    	this.identifier=identifier;
+    	this.symbolicName=symbolicName;
+    	this.version=version;
+    	this.state = OSGiBundle.getStateName(state);
+
+    }
+    
+    public OSGiBundle(Bundle bundle) {
+		this(bundle.getBundleId(),
+		        bundle.getSymbolicName(),
+		        bundle.getVersion().toString(),
+		        bundle.getState()
+		        
+			);
+	}
+
+	public long getIdentifier() {
+		return identifier;
+	}
+
+	public void setIdentifier(long identifier) {
+		this.identifier = identifier;
+	}
+
+	public String getSymbolicName() {
+		return symbolicName;
+	}
+
+	public void setSymbolicName(String symbolicName) {
+		this.symbolicName = symbolicName;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+	
+	public static String getStateName(int state){
+	    switch(state){
+            case Bundle.ACTIVE : return "Active"; 
+            case Bundle.INSTALLED : return "Installed"; 
+            case Bundle.RESOLVED : return "Resolved"; 
+            case Bundle.STARTING : return "Starting"; 
+            case Bundle.STOPPING : return "Stopping"; 
+            case Bundle.UNINSTALLED: return "Uninstalled"; 
+	    }
+	    return "Wrong state value";
+	}
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/javabean/OSGiBundle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,11 @@
+package org.apache.geronimo.console.json;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class BundleHeaderJSONObject extends JSONObject{
+    public BundleHeaderJSONObject(String key, String value) throws JSONException{
+        this.put("hkey", key);
+        this.put("hvalue", value);
+    }
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleHeaderJSONObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,14 @@
+package org.apache.geronimo.console.json;
+
+import org.apache.geronimo.console.javabean.OSGiBundle;
+import org.json.JSONException;
+import org.json.JSONObject;
+public class BundleJSONObject extends JSONObject{
+	public BundleJSONObject(OSGiBundle bundle) throws JSONException{
+		this.put("id", bundle.getIdentifier());
+		this.put("symbolicName", bundle.getSymbolicName());
+		this.put("version",bundle.getVersion());
+		this.put("state", bundle.getState());
+	}
+
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/BundleJSONObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,22 @@
+package org.apache.geronimo.console.json;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.geronimo.console.javabean.OSGiBundle;
+import org.json.JSONException;
+import org.json.JSONObject;
+public class GridJSONObject extends JSONObject{
+    
+	public GridJSONObject(List<OSGiBundle> bundles) throws JSONException{
+		this.put("identifier", "id");
+		this.put("label", "description");
+		
+		List<BundleJSONObject> items=new LinkedList<BundleJSONObject>();
+		for(OSGiBundle bundle:bundles){			
+			items.add(new BundleJSONObject(bundle));
+		}
+		this.put("items", items);
+	}
+	
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/GridJSONObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,101 @@
+package org.apache.geronimo.console.json;
+
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+// FIXME should replaced by import org.apache.aries.util.ManifestHeaderUtils; in next release
+import org.apache.aries.application.utils.manifest.ManifestHeaderProcessor;
+
+
+public class HeadersJSONObject extends JSONObject{
+    
+    public HeadersJSONObject(Dictionary<String,String> headers) throws JSONException{
+        this.put("identifier", "hkey");
+        this.put("label", "description");
+        
+        List<BundleHeaderJSONObject> items=new LinkedList<BundleHeaderJSONObject>();
+        
+        Enumeration<String> keys = headers.keys();
+        while(keys.hasMoreElements()){
+            String key = (String)keys.nextElement();
+            
+            if (key.equals("Import-Package")||key.equals("Export-Package")||key.equals("Ignore-Package")||key.equals("Private-Package")){
+                items.add(new BundleHeaderJSONObject(key, formatPackageHeader((String)headers.get(key))));
+            } else {
+                items.add(new BundleHeaderJSONObject(key, (String)headers.get(key)));
+            }
+        }
+        
+        this.put("items", items);
+    }
+
+    
+    private String formatPackageHeader(String header){
+        List<String> packagesList = ManifestHeaderProcessor.split(header, ",");
+        Collections.sort(packagesList);
+
+        String result = "";
+        for (Iterator<String> it = packagesList.iterator(); it.hasNext(); result+=formatPackageValue(it.next())+"<BR/>");
+        
+        return result;
+    }
+    
+    /*
+     * Format a package value from
+     * org.apache.aries.util.tracker;uses:="org.osgi.util.tracker,org.osgi.framework,org.osgi.framework.launch";version="0.2.0.incubating",
+     * to
+     * org.apache.aries.util.tracker;version="0.2.0.incubating",
+     *     uses:="org.osgi.util.tracker,
+     *         org.osgi.framework,
+     *         org.osgi.framework.launch",
+     */
+    
+    private String formatPackageValue(String pkg) {
+        String result = "";
+        
+        String[] parts = pkg.split(";");
+        
+        if (parts!=null && parts.length>0) { //it should at least have a package name;
+            result = parts[0]; 
+        }
+        
+        String uses = "";
+        for (int i=1; i<parts.length; i++){
+            String aPart = parts[i];
+            if (aPart.indexOf("uses")!=-1){  //deal with the "uses:=.." specially, because it always very long..
+                uses+=";<BR/>&nbsp;&nbsp;&nbsp;&nbsp;"+"uses:="+"\"";
+                
+                String usesValue=aPart.substring(aPart.indexOf("\"")+1, aPart.lastIndexOf("\""));
+                
+                List<String> usesValueList = ManifestHeaderProcessor.split(usesValue,",");
+                Collections.sort(usesValueList);
+                Iterator<String> usesIT = usesValueList.iterator();
+                if (usesIT.hasNext()){ //it should at least have a value;
+                    uses += usesIT.next();
+                }
+                while (usesIT.hasNext()){
+                    uses += ",<BR/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+usesIT.next();
+                }
+                
+                uses+="\"";
+                
+            } else {  //maybe "version=..", maybe "resolution=.."
+                result+=";"+aPart;
+            }
+        }
+        
+        if (uses!="") result+=uses;
+        
+        return result+",";
+    }
+    
+    
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/json/HeadersJSONObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,262 @@
+package org.apache.geronimo.console.portlet;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.security.Principal;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.PortalContext;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+import javax.portlet.PortletSession;
+import javax.portlet.ResourceRequest;
+import javax.portlet.WindowState;
+import javax.servlet.http.Cookie;
+
+/**
+ * Commons-fileupload does not support portlet2.0's
+ * serveResource(ResourceRequest,ResourceResponse) now.
+ * PortletFileUpload.parse(ActionRequest) need a ActionRequest parameter. So
+ * create a Wapper Class implements ActionRequest and delegate all operations to
+ * an instance of type ResourceRequest.
+ */
+public class ActionResourceRequest implements ActionRequest {
+	private ResourceRequest request;
+
+	public ActionResourceRequest(ResourceRequest request) {
+		this.request = request;
+	}
+
+	@Override
+	public String getCharacterEncoding() {
+		return request.getCharacterEncoding();
+	}
+
+	@Override
+	public int getContentLength() {
+		return request.getContentLength();
+	}
+
+	@Override
+	public String getContentType() {
+		return request.getContentType();
+	}
+
+	@Override
+	public String getMethod() {
+		return request.getMethod();
+	}
+
+	@Override
+	public InputStream getPortletInputStream() throws IOException {
+		return request.getPortletInputStream();
+	}
+
+	@Override
+	public BufferedReader getReader() throws UnsupportedEncodingException,
+			IOException {
+		return request.getReader();
+	}
+
+	@Override
+	public void setCharacterEncoding(String arg0)
+			throws UnsupportedEncodingException {
+		request.setCharacterEncoding(arg0);
+	}
+
+	@Override
+	public Object getAttribute(String arg0) {
+		return request.getAttribute(arg0);
+	}
+
+	@Override
+	public Enumeration<String> getAttributeNames() {
+		return request.getAttributeNames();
+	}
+
+	@Override
+	public String getAuthType() {
+		return request.getAuthType();
+	}
+
+	@Override
+	public String getContextPath() {
+		return request.getContextPath();
+	}
+
+	@Override
+	public Cookie[] getCookies() {
+		return request.getCookies();
+	}
+
+	@Override
+	public Locale getLocale() {
+		return request.getLocale();
+	}
+
+	@Override
+	public Enumeration<Locale> getLocales() {
+		return request.getLocales();
+	}
+
+	@Override
+	public String getParameter(String arg0) {
+		return request.getParameter(arg0);
+	}
+
+	@Override
+	public Map<String, String[]> getParameterMap() {
+		return request.getParameterMap();
+	}
+
+	@Override
+	public Enumeration<String> getParameterNames() {
+		return request.getParameterNames();
+	}
+
+	@Override
+	public String[] getParameterValues(String arg0) {
+		return request.getParameterValues(arg0);
+	}
+
+	@Override
+	public PortalContext getPortalContext() {
+		return request.getPortalContext();
+	}
+
+	@Override
+	public PortletMode getPortletMode() {
+		return request.getPortletMode();
+	}
+
+	@Override
+	public PortletSession getPortletSession() {
+		return request.getPortletSession();
+	}
+
+	@Override
+	public PortletSession getPortletSession(boolean arg0) {
+		return request.getPortletSession(arg0);
+	}
+
+	@Override
+	public PortletPreferences getPreferences() {
+		return request.getPreferences();
+	}
+
+	@Override
+	public Map<String, String[]> getPrivateParameterMap() {
+		return request.getPrivateParameterMap();
+	}
+
+	@Override
+	public Enumeration<String> getProperties(String arg0) {
+		return request.getProperties(arg0);
+	}
+
+	@Override
+	public String getProperty(String arg0) {
+		return request.getProperty(arg0);
+	}
+
+	@Override
+	public Enumeration<String> getPropertyNames() {
+		return request.getPropertyNames();
+	}
+
+	@Override
+	public Map<String, String[]> getPublicParameterMap() {
+		return request.getPublicParameterMap();
+	}
+
+	@Override
+	public String getRemoteUser() {
+		return request.getRemoteUser();
+	}
+
+	@Override
+	public String getRequestedSessionId() {
+		return request.getRequestedSessionId();
+	}
+
+	@Override
+	public String getResponseContentType() {
+		return request.getResponseContentType();
+	}
+
+	@Override
+	public Enumeration<String> getResponseContentTypes() {
+		return request.getResponseContentTypes();
+	}
+
+	@Override
+	public String getScheme() {
+		return request.getScheme();
+	}
+
+	@Override
+	public String getServerName() {
+		return request.getServerName();
+	}
+
+	@Override
+	public int getServerPort() {
+		return request.getServerPort();
+	}
+
+	@Override
+	public Principal getUserPrincipal() {
+		return request.getUserPrincipal();
+	}
+
+	@Override
+	public String getWindowID() {
+		return request.getWindowID();
+	}
+
+	@Override
+	public WindowState getWindowState() {
+		return request.getWindowState();
+	}
+
+	@Override
+	public boolean isPortletModeAllowed(PortletMode arg0) {
+		return request.isPortletModeAllowed(arg0);
+	}
+
+	@Override
+	public boolean isRequestedSessionIdValid() {
+		return request.isRequestedSessionIdValid();
+	}
+
+	@Override
+	public boolean isSecure() {
+		return request.isSecure();
+	}
+
+	@Override
+	public boolean isUserInRole(String arg0) {
+		return request.isUserInRole(arg0);
+	}
+
+	@Override
+	public boolean isWindowStateAllowed(WindowState arg0) {
+		return request.isWindowStateAllowed(arg0);
+	}
+
+	@Override
+	public void removeAttribute(String arg0) {
+		request.removeAttribute(arg0);
+	}
+
+	@Override
+	public void setAttribute(String arg0, Object arg1) {
+		request.setAttribute(arg0, arg1);
+	}
+
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/ActionResourceRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java Thu Nov 25 08:00:59 2010
@@ -0,0 +1,323 @@
+package org.apache.geronimo.console.portlet;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.WindowState;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.portlet.PortletFileUpload;
+import org.apache.geronimo.console.javabean.OSGiBundle;
+import org.apache.geronimo.console.json.GridJSONObject;
+import org.apache.geronimo.console.json.HeadersJSONObject;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.startlevel.StartLevel;
+
+public class BundlesPortlet extends GenericPortlet {
+
+    private static final String NORMALVIEW_JSP = "/WEB-INF/view/BundlesView.jsp";
+    private static final String MAXIMIZEDVIEW_JSP = "/WEB-INF/view/BundlesView.jsp";
+    private static final String HELPVIEW_JSP = "/WEB-INF/view/BundlesView.jsp";
+    private PortletRequestDispatcher normalView;
+    private PortletRequestDispatcher maximizedView;
+    private PortletRequestDispatcher helpView;
+
+    
+    public void init(PortletConfig portletConfig) throws PortletException {
+        super.init(portletConfig);
+        normalView = portletConfig.getPortletContext().getRequestDispatcher(NORMALVIEW_JSP);
+        maximizedView = portletConfig.getPortletContext().getRequestDispatcher(MAXIMIZEDVIEW_JSP);
+        helpView = portletConfig.getPortletContext().getRequestDispatcher(HELPVIEW_JSP);
+    }
+
+    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException,
+            IOException {
+        // this portlet use dojo/ajax to process action. so all the actions are in serverResource method.
+    }
+
+    protected void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException,
+            PortletException {
+        if (WindowState.MINIMIZED.equals(renderRequest.getWindowState())) {
+            return;
+        } else if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
+            try {
+                doBundlesView(renderRequest, renderResponse);
+            } catch (Exception e) {
+                e.printStackTrace();
+                throw new PortletException(e);
+            }
+            normalView.include(renderRequest, renderResponse);
+        } else {
+            maximizedView.include(renderRequest, renderResponse);
+        }
+    }
+
+    protected void doHelp(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException,
+            IOException {
+        helpView.include(renderRequest, renderResponse);
+    }
+
+    private void doBundlesView(RenderRequest request, RenderResponse response) {
+
+        BundleContext bundleContext = (BundleContext) request.getPortletSession().getPortletContext().getAttribute(
+                "osgi-bundlecontext");
+
+        Bundle[] bundles = bundleContext.getBundles();
+
+        // list contains bundles converted from Bundle objects
+        ArrayList<OSGiBundle> OSGiBundleList = new ArrayList<OSGiBundle>();
+
+        // convert Bundle to OSGiBundle
+        for (Bundle bundle : bundles) {
+            OSGiBundle osgiBundle = new OSGiBundle(bundle);
+            OSGiBundleList.add(osgiBundle);
+        }
+
+        try {
+            JSONObject grid = new GridJSONObject(OSGiBundleList);
+            request.setAttribute("GridJSONObject", grid);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException {
+        
+        BundleContext bundleContext = (BundleContext) request.getPortletSession().getPortletContext().getAttribute(
+                "osgi-bundlecontext");
+        
+        String resourceId = request.getResourceID();
+  
+        if (resourceId.equals("bundlesAction")) {
+            
+            String jsonData = request.getParameter("bundlesActionParam");
+            try {
+                /*
+                 * The format of a request json looks like { "action":"start" "items":[ {"id":0} {"id":25} ] }
+                 */
+                JSONObject jo = new JSONObject(jsonData);
+                String action = jo.getString("action");
+                JSONArray items = jo.getJSONArray("items");
+
+                /*
+                 * The format of a response json looks like { "items":[ {"id":0, "state":"Active"} {"id":25, "state":"Resolved"} ] }
+                 * PS:  {"id":0, "state":"err"} means the state maybe not change, need user refresh the portlet.
+                 */
+                LinkedList<JSONObject> resultItems = new LinkedList<JSONObject>();
+                
+                if (action.equals("start")){
+                    for (int i = 0; i < items.length(); i++) {
+                        Long id = items.getJSONObject(i).getLong("id");
+                        
+                        // start the bundle
+                        bundleContext.getBundle(id).start();
+                        
+                        // prepare response
+                        JSONObject resultItem = new JSONObject();
+                        resultItem.put("id", id);
+                        
+                        resultItem.put("state", "err");
+                        for (int j = 0; j<5; j++){ // give system 5 times to check the new status
+                            if (bundleContext.getBundle(id).getState() == Bundle.ACTIVE){
+                                resultItem.put("state", "Active");
+                                break;
+                            } else {
+                                Thread.sleep(500L);
+                            }
+                        }
+                        
+                        resultItems.add(resultItem);
+                    }
+                } else if (action.equals("stop")){
+                    for (int i = 0; i < items.length(); i++) {
+                        Long id = items.getJSONObject(i).getLong("id");
+                        
+                        // stop the bundle
+                        bundleContext.getBundle(id).stop();
+                        
+                        // prepare response
+                        JSONObject resultItem = new JSONObject();
+                        resultItem.put("id", id);
+                        
+                        resultItem.put("state", "err");
+                        for (int j = 0; j<5; j++){ // give system 5 times to check the new status
+                            if (bundleContext.getBundle(id).getState() == Bundle.RESOLVED){
+                                resultItem.put("state", "Resolved");
+                                break;
+                            } else {
+                                Thread.sleep(500L);
+                            }
+                        }
+                        
+                        resultItems.add(resultItem);
+                    }
+                                        
+                } else if (action.equals("uninstall")){
+                    for (int i = 0; i < items.length(); i++) {
+                        Long id = items.getJSONObject(i).getLong("id");
+                        
+                        // uninstall the bundle
+                        bundleContext.getBundle(id).uninstall();
+                        
+                        // prepare response
+                        JSONObject resultItem = new JSONObject();
+                        resultItem.put("id", id);
+                        
+                        resultItem.put("state", "err");
+                        for (int j = 0; j<5; j++){ // give system 5 times to check the new status
+                            if (bundleContext.getBundle(id) == null){
+                                resultItem.put("state", "Uninstalled");
+                                break;
+                            } else {
+                                Thread.sleep(500L);
+                            }
+                        }
+                        
+                        resultItems.add(resultItem);
+                    }
+                }
+
+                JSONObject result = new JSONObject();
+                result.put("items", resultItems);
+                
+                PrintWriter writer = response.getWriter();
+                writer.print(result.toString());
+                
+            } catch (JSONException e) {
+                e.printStackTrace();
+            } catch (BundleException e) {
+                e.printStackTrace();
+            }catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        } else if (resourceId.equals("showSingleBundle")) {
+            String str_id = request.getParameter("id");
+            long id = Long.parseLong(str_id);
+
+            try {
+                PrintWriter writer = response.getWriter();
+                writer.print(new HeadersJSONObject(bundleContext.getBundle(id).getHeaders()));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+            
+        } else if (resourceId.equals("installAction")) {
+            String result = processInstallAction(new ActionResourceRequest(request), bundleContext);
+            PrintWriter writer = response.getWriter();
+            writer.print(result);
+            
+        }
+    }
+
+    private String processInstallAction(ActionRequest request, BundleContext bundleContext) throws PortletException, IOException {
+        if (!PortletFileUpload.isMultipartContent(request)) {
+            throw new PortletException("Expected file upload");
+        }
+
+        // use commons-fileupload to process the request
+        File rootDir = new File(System.getProperty("java.io.tmpdir"));
+        PortletFileUpload uploader = new PortletFileUpload(new DiskFileItemFactory(10240, rootDir));
+        File bundleFile = null;
+        String startAfterInstalled = null;
+        String str_startLevel = null;
+
+        try {
+            List<?> items = uploader.parseRequest(request);
+            for (Iterator<?> i = items.iterator(); i.hasNext();) {
+                FileItem item = (FileItem) i.next();
+                if (!item.isFormField()) {
+                    String fieldName = item.getFieldName();
+                    String fileName = item.getName().trim();
+                    if (fileName.length() != 0) {
+                        int index = fileName.lastIndexOf('\\');
+                        if (index != -1) {
+                            fileName = fileName.substring(index + 1);
+                        }
+                        if ("bundleFile".equals(fieldName)) {
+                            bundleFile = new File(rootDir, fileName);
+                        }
+                    }
+                    if (bundleFile != null) {
+                        try {
+                            item.write(bundleFile);
+                        } catch (Exception e) {
+                            throw new PortletException(e);
+                        }
+                    } else {
+                        return null;
+                    }
+                } else {
+                    if ("startAfterInstalled".equalsIgnoreCase(item.getFieldName())) {
+                        startAfterInstalled = item.getString();
+                    } else if ("startLevel".equalsIgnoreCase(item.getFieldName())) {
+                        str_startLevel = item.getString();
+                    }
+                }
+            }
+
+        } catch (FileUploadException e) {
+            throw new PortletException(e);
+        }
+
+        // install the uploaded bundle file
+        String url = "file:///" + bundleFile.getCanonicalPath();
+        try {
+            Bundle installedBundle =  bundleContext.installBundle(url);
+            
+            //get the StartLeval object
+            ServiceReference startLevelRef = bundleContext.getServiceReference(StartLevel.class.getCanonicalName());
+            StartLevel startLevelService = (StartLevel) bundleContext.getService(startLevelRef);
+            
+            int defaultStartLevel = startLevelService.getInitialBundleStartLevel(); 
+            int startLevel = -1;
+            try {
+                startLevel = Integer.parseInt(str_startLevel);
+            } catch (NumberFormatException e) {
+                // if can't generated, use the default initialBundleStartLevel
+            }
+            if (startLevel != defaultStartLevel && startLevel != -1) {
+                startLevelService.setBundleStartLevel(installedBundle, startLevel);
+            }
+
+            // if check box "Start" checked, then start the bundle
+            if ("yes".equals(startAfterInstalled)) {
+                installedBundle.start();
+            }
+
+            // response the installed bundle's json data
+            /*
+             * The format of the json data looks like {"id":0, "symbolicName":"a.b.c", "version":"1.0.0", "state":"Active"}
+             */
+            String jsonStr = "<textarea>" + "{\"id\":" + installedBundle.getBundleId() + ", \"symbolicName\":\"" + installedBundle.getSymbolicName()
+                    + "\", \"version\":\"" + installedBundle.getVersion().toString() + "\", \"state\":\"" + OSGiBundle.getStateName(installedBundle.getState()) + "\"}" + "</textarea>";
+
+            return jsonStr;
+        } catch (Exception e) {
+            throw new PortletException(e);
+        }
+    }
+}

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/java/org/apache/geronimo/console/portlet/BundlesPortlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml?rev=1038945&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml (added)
+++ geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml Thu Nov 25 08:00:59 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed  under the  License is distributed on an "AS IS" BASIS,
+WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!-- $Rev: 805522 $ $Date: 2009-08-18 14:18:33 -0400 (Tue, 18 Aug 2009) $ -->
+
+<portlet-app version="1.0">
+    <portlet>
+		<description>BundlesPortletDescription</description>
+		<portlet-name>BundlesPortlet</portlet-name>
+		<display-name>OSGi Bundles Portlet</display-name>
+		<portlet-class>
+		    org.apache.geronimo.console.portlet.BundlesPortlet
+		</portlet-class>
+		<expiration-cache>-1</expiration-cache>
+
+		<supports>
+			<mime-type>text/html</mime-type>
+			<portlet-mode>VIEW</portlet-mode>
+		</supports>
+
+		<supported-locale>en</supported-locale>
+
+		<portlet-info>
+			<title>OSGi Bundles</title>
+			<short-title>OSGi Bundles</short-title>
+			<keywords>OSGi Bundles</keywords>
+		</portlet-info>
+	</portlet>
+</portlet-app>

Propchange: geronimo/server/trunk/plugins/console/osgi-portlets/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message